Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 2 Nächste Version anzeigen »

Beschreibung

Die Funktion setzt den Status "d" in Kategorie 0599 (Status "cm", wenn Datensatz im Mahnverfahren) und kopiert die Inhalte der Kategorien 2000, 2150 und 4715 in die Zwischenablage. Die Funktion wird in der Vollanzeige ausgeführt und speichert den geänderten Datensatz ab.

Historie

Datum

geändert von

Beschreibung

2011-05-28

Althaus

neu erstellt

Datei

dnb_scripts_01.js

Code
function NDDubletten() {

	var str2000 = "";
	var str2150 = "";
	var str4715 = "";
	var strDublette = "";
	
	if (application.activeWindow.getVariable("scr") != "8A"){
		application.messageBox("Datensatzkopie","Der Datensatz muss sich in der Vollanzeige befinden!", "alert-icon");
	} else {
		application.activeWindow.command("k",false);
		__dnbUpdateStatusPos(1,"d",true)
		
		application.activeWindow.title.startOfBuffer(false);
		var i = 0
		var strTmp = application.activeWindow.title.findTag("2000", 0, false, true, false);
		while (strTmp != "") {
			str2000 = str2000 + strTmp + "\n";
			i = i+1;
			strTmp = application.activeWindow.title.findTag("2000", i, false, true, false);
			//application.messageBox("strTmp", strTmp , "");	
		}

		str2150 = application.activeWindow.title.findTag("2150", 0, false, true, false);

		application.activeWindow.title.startOfBuffer(false);
		var i = 0
		strTmp = application.activeWindow.title.findTag("4715", 0, false, true, false);
		while (strTmp != "") {
			str4715 = str4715 + strTmp + "\n";
			i = i+1;
			strTmp = application.activeWindow.title.findTag("4715", i, false, true, false);
			//application.messageBox("strTmp", strTmp , "");	
		}
	
	strDublette = str2000 + "\n" + str2150 + "\n" + str4715 + "\n";
	application.activeWindow.clipboard = strDublette;
	application.activeWindow.simulateIBWKey ("FR");
	}
}
VB-Code
Sub NDDubletten()
'********************************************************************
	
	Dim str0599, Pos, str2000, str2150, str4715, strTemp
	
	' Send the command "k" to the system and display the data in the same window
	Application.ActiveWindow.Command "k", False

	' Suche Feld 0599 und setze den Lösch-Status "d"
	Application.ActiveWindow.Title.Find "0599", True, False, True
	Application.ActiveWindow.Title.StartOfField	
	Application.ActiveWindow.Title.CharRight
	Application.ActiveWindow.Title.WordRight 1
	Application.ActiveWindow.Title.EndOfField	True
	str0599 = Application.ActiveWindow.Title.GetSelection
	' msgbox str0599
	Pos = 0
	Pos = InStr(str0599,"m")
	if (Pos) then
		msgbox ("Statusänderung nicht erlaubt, da Status m!")
	else	
		Application.ActiveWindow.Title.DeleteSelection	
		Application.ActiveWindow.Title.InsertText "d"

		' Kopiere alle Felder 2000 in die Variable str2000
		Application.ActiveWindow.Title.StartOfBuffer
		i = 0
		strTmp2000 = Application.PicaToLatin(Application.ActiveWindow.Title.FindTag ("2000", 0, True, False))
		do until (strTmp2000 = "")
			str2000 = str2000 & strTmp2000 & vbCR
			' msgbox str4715
			i = i + 1
			strTmp2000 = Application.PicaToLatin(Application.ActiveWindow.Title.FindTag ("2000", i, True, False))
		loop


		' Kopiere Feld 2150 (VLB-ID) in die Variable str2150
		Application.ActiveWindow.Title.StartOfBuffer
		str2150 = Application.ActiveWindow.Title.FindTag ("2150", 0, True, False)
		
		' Kopiere alle Felder 4715 (URL-Adressen) in die Variable str4715
		Application.ActiveWindow.Title.StartOfBuffer
		i = 0
		strTemp = Application.PicaToLatin(Application.ActiveWindow.Title.FindTag ("4715", i, True, False))
		do until (strTemp = "")
			str4715 = str4715 & strTemp & vbCR
			' msgbox str4715
			i = i + 1
			strTemp = Application.PicaToLatin(Application.ActiveWindow.Title.FindTag ("4715", i, True, False))
		loop
		
		' Kopiere alle Kategorien 2150 und 4715 in die Zwischenablage
		Application.ActiveWindow.ClipBoard = str2000 & vbCRlf & str2150 & vbCRlf & str4715 & vbCRlf
		' msgbox Application.ActiveWindow.ClipBoard
		 Application.ActiveWindow.SimulateIBWKey "FR"
	end if	


End Sub

Seitenanfang

  • Keine Stichwörter