Hallo Zusammen,
Ich habe eine SAP Tabelle mit mehreren Zeilen z.B.
6000691672 HL5270DNG1 K8J801829 26.02.2010
6000689829 MFC9840CDWG1 K7J168076 25.02.2010
6000689536 HL2070NG1 C7J404038 25.02.2010
Aus der ersten Zeile habe ich diese Scribt Aufzeichnung erstellt.
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").doubleClickCurrentCell
session.findById("wnd[0]/usr/ssubSUBSCREEN_1O_MAIN:SAPLCRM_1O_MANAG_UI:0120/subSUBSCREEN_1O_WORKA:SAPLCRM_1O_WORKA_UI:2100/subSCR_1O_MAINTAIN:SAPLCRM_1O_UI:1100/subSCR_1O_COMMON:SAPLCRM_1O_UI:3150/subSCR_1O_TT:SAPLCRM_1O_UI:2600/btnGV_TOGGTRANS").press
session.findById("wnd[0]/usr/ssubSUBSCREEN_1O_MAIN:SAPLCRM_1O_MANAG_UI:0120/subSUBSCREEN_1O_WORKA:SAPLCRM_1O_WORKA_UI:2100/subSCR_1O_MAINTAIN:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_SERVICE_UI:0101/ssubSCRAREA0:SAPLCRM_SERVICE_UI:0213/subSUBSCR01:SAPLCRM_SERVICE_UI:0426/subSUBSCR01:SAPLCRM_SERVICE_UI:7013/subIDENTIFICATION:SAPLCRM_SERVICE_UI:7012/cmbZCRMT_0100_BTX_UI03-ZZTRANCAT").key = "INRQ"
session.findById("wnd[0]/usr/ssubSUBSCREEN_1O_MAIN:SAPLCRM_1O_MANAG_UI:0120/subSUBSCREEN_1O_WORKA:SAPLCRM_1O_WORKA_UI:2100/subSCR_1O_MAINTAIN:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_SERVICE_UI:0101/ssubSCRAREA0:SAPLCRM_SERVICE_UI:0213/subSUBSCR01:SAPLCRM_SERVICE_UI:0426/subSUBSCR02:SAPLCRM_SERVICE_UI:7153/subSUBSCR01:SAPLCOM_PARTNER_UI2:1000/subGS_SUBSCREEN_AREA_1000:SAPLCOM_PARTNER_UI2:1010/subGS_SUBSCREEN_AREA_1010:SAPLCOM_PARTNER_UI2:1001/ctxtGS_DYNP_1000_VARIABLES-PARTNER_4-PARTNER_NUMBER").text = ""
session.findById("wnd[0]/usr/ssubSUBSCREEN_1O_MAIN:SAPLCRM_1O_MANAG_UI:0120/subSUBSCREEN_1O_WORKA:SAPLCRM_1O_WORKA_UI:2100/subSCR_1O_MAINTAIN:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_SERVICE_UI:0101/ssubSCRAREA0:SAPLCRM_SERVICE_UI:0213/subSUBSCR01:SAPLCRM_SERVICE_UI:0426/subSUBSCR02:SAPLCRM_SERVICE_UI:7153/subSUBSCR01:SAPLCOM_PARTNER_UI2:1000/subGS_SUBSCREEN_AREA_1000:SAPLCOM_PARTNER_UI2:1010/subGS_SUBSCREEN_AREA_1010:SAPLCOM_PARTNER_UI2:1001/ctxtGS_DYNP_1000_VARIABLES-PARTNER_4-PARTNER_NUMBER").setFocus
session.findById("wnd[0]/usr/ssubSUBSCREEN_1O_MAIN:SAPLCRM_1O_MANAG_UI:0120/subSUBSCREEN_1O_WORKA:SAPLCRM_1O_WORKA_UI:2100/subSCR_1O_MAINTAIN:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_SERVICE_UI:0101/ssubSCRAREA0:SAPLCRM_SERVICE_UI:0213/subSUBSCR01:SAPLCRM_SERVICE_UI:0426/subSUBSCR02:SAPLCRM_SERVICE_UI:7153/subSUBSCR01:SAPLCOM_PARTNER_UI2:1000/subGS_SUBSCREEN_AREA_1000:SAPLCOM_PARTNER_UI2:1010/subGS_SUBSCREEN_AREA_1010:SAPLCOM_PARTNER_UI2:1001/ctxtGS_DYNP_1000_VARIABLES-PARTNER_4-PARTNER_NUMBER").caretPosition = 0
session.findById("wnd[0]/usr/ssubSUBSCREEN_1O_MAIN:SAPLCRM_1O_MANAG_UI:0120/subSUBSCREEN_1O_WORKA:SAPLCRM_1O_WORKA_UI:2100/subSCR_1O_MAINTAIN:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_SERVICE_UI:0101/ssubSCRAREA0:SAPLCRM_SERVICE_UI:0213/subSUBSCR01:SAPLCRM_SERVICE_UI:0426/subSUBSCR01:SAPLCRM_SERVICE_UI:7013/subIDENTIFICATION:SAPLCRM_SERVICE_UI:7012/subSTATUS:SAPLCRM_STATUS_UI:0114/cntlSTATUSCONT_0114/shellcont/shell").pressContextButton "BT_STATUS_EXTERN"
session.findById("wnd[0]/usr/ssubSUBSCREEN_1O_MAIN:SAPLCRM_1O_MANAG_UI:0120/subSUBSCREEN_1O_WORKA:SAPLCRM_1O_WORKA_UI:2100/subSCR_1O_MAINTAIN:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_SERVICE_UI:0101/ssubSCRAREA0:SAPLCRM_SERVICE_UI:0213/subSUBSCR01:SAPLCRM_SERVICE_UI:0426/subSUBSCR01:SAPLCRM_SERVICE_UI:7013/subIDENTIFICATION:SAPLCRM_SERVICE_UI:7012/subSTATUS:SAPLCRM_STATUS_UI:0114/cntlSTATUSCONT_0114/shellcont/shell").selectContextMenuItem "E0010"
session.findById("wnd[0]/tbar[0]/btn[11]").press
session.findById("wnd[0]/tbar[0]/btn[3]").press
session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").currentCellRow = 1
Nach der (currentCellRow = 1) sollte nun die Schleife (Loop) eingebaut werden.
Wenn ich das Scribt ablaufen lasse, soll es nacheinander
die nächsten Zeilen (Tickets) gleichbleibend abarbeiten bis zum Ende der Liste.
Also gehe zu Zeile 2 führe alles aus was im Script steht, gehe zur Zeile 3 führe aus usw bis zum Ende der Liste
Kann mir da bitte jemand den Loop Befehl einbauen, ich bedanke mich schon mal im Vorraus für die Hilfe.
Gruß R.Kuhn