Seitenhistorie
Anker | ||||
---|---|---|---|---|
|
Inhalt |
---|
...
Beschreibung
...
erzeugt Feld 0599 in zu löschenden Sätzen
Zeile 3224 - 3271
Code in WinIBW2 (Makro/VBScript)Sub
...
Auszug |
---|
Neu: Die Funktion setzt in Kategorie 0599 den Status "d". Wenn der Mahnstatus vorhanden ist, wird Status "dm" gesetzt. |
Historie
Datum | geändert von | Beschreibung |
---|---|---|
2011-05-28 | Althaus | neu erstellt |
Datei
dnb_scripts_01.js, dnb_public.js |
Code
Codeblock |
---|
function SetzeStatusD() {
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.simulateIBWKey ("FR");
}
}
function __dnbUpdateStatusPos(pos,status,newDate) {
var intPos = pos - 1;
var intWords = 1;
application.activeWindow.title.startOfBuffer(false);
application.activeWindow.title.findTag("0599", 0, false, true, false);
var strDoppelpunkt = application.activeWindow.title.find(" : ", false, true, false);
if (strDoppelpunkt == true) {
if (newDate) {
application.activeWindow.title.startOfField(false);
application.activeWindow.title.wordRight(1,false);
application.activeWindow.title.wordRight(2,true);
application.activeWindow.title.deleteSelection();
} else {
intWords = 3;
}
}
application.activeWindow.title.startOfField(false);
application.activeWindow.title.wordRight(intWords,false);
application.activeWindow.title.charRight(intPos,false);
application.activeWindow.title.endOfField(true);
var altStatus = application.activeWindow.title.selection;
if (altStatus.charAt(1) == "m") {
status = status + "m";
}
application.activeWindow.title.deleteSelection();
application.activeWindow.title.insertText(status);
}
|
VB-Code
Codeblock |
---|
Sub SetzeStatusd() '*******************************************************************\* |
...
Dim str0599, Pos, |
...
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" |
...
'wenn 0599 vorhanden |
...
dann if Application.ActiveWindow.Title.Find ("0599", True, False, True) |
...
then 'Gehe zum Feldanfang ohne zu markieren Application.ActiveWindow.Title.StartOfField 'Gehe ein Zeichen nach rechts ohne zu markieren Application.ActiveWindow.Title.CharRight 'Gehe ein Wort nach rechts ohne zu markieren Application.ActiveWindow.Title.WordRight |
...
1 'Gehe zum Feldende und markiere Application.ActiveWindow.Title.EndOfField True 'Definiere str0599 als Inhalt der Markierung str0599 = Application.ActiveWindow.Title.GetSelection |
...
'Setze Variable Pos gleich 0 Pos = 0 'Definiere Pos als Suche von "m" in str0599 Pos = InStr(str0599,"m") |
...
'wenn "m" existiert |
...
dann if (Pos) |
...
then 'lösche die Markierung Application.ActiveWindow.Title.DeleteSelection 'füge "dm" ein sonst Application.ActiveWindow.Title.InsertText |
...
"dm" else 'lösche die Markierung Application.ActiveWindow.Title.DeleteSelection 'füge "d" ein Application.ActiveWindow.Title.InsertText |
...
"d" end if 'sonst (wenn 0599 nicht existiert) else 'gehe zum Ende des Datensatzes Application.ActiveWindow.Title.EndOfBuffer 'füge "0599 d" ein Application.ActiveWindow.Title.InsertText "0599 d" |
...
end if 'Enter und Datensatz abschicken Application.ActiveWindow.SimulateIBWKey "FR" |
...
End Sub |
...
|
Code in WinIBW3 (Javascript)
...
Überblick
Inhalte