如何动态调用单元格而不是调用相同的单元格
How to make calls to a cell dynamic instead of calling the same cells
我正在尝试使用 excel sheet 通过宏将大量信息批量加载到 SAP 中。
宏在第一行运行良好,但我无法让宏转到下一行。
宏需要从第 2 行动态提取所有数据,然后是第三行,依此类推,直到列表末尾。
谁能指出我正确的方向?我试过偏移量,但是在定义它应该在哪里寻找数据时,它保持静态。
Sub Enter_calla()
Range("A1").Select
Call Enter_call
End Sub
Sub Enter_call()
Set sapguiauto = GetObject("SAPGUI")
Set SAPApp = sapguiauto.GetScriptingEngine
Set SAPCon = SAPApp.Children(0)
Set session = SAPCon.Children(0)
If IsObject(wscript) Then
wscript.ConnectObject session, "on"
wscript.ConnectObject Application, "on"
End If
'Below are the cells I want dynamic EX bp_number should start at 2, 23 then 3, 23, etc.
ActiveCell.Offset(2, 0).Select
bp_number = Cells(2, 23).Value
PROBLEM = Cells(2, 24).Value
CUSTOMER_CONTACT = Cells(2, 17).Value
CONTACT_number = Cells(2, 18).Value
Warr_or_non = Cells(2, 48).Value
ot = Cells(2, 49).Value
AUTHORIZATION = Cells(2, 21).Value
COMPONENT = Cells(2, 27).Value
INTERNAL = Cells(2, 29).Value
BP = Cells(2, 22).Value
Prob_desc = Cells(2, 28).Value
LINE1 = Cells(2, 42).Value
LINE2 = Cells(2, 43).Value
LINE3 = Cells(2, 44).Value
LINE4 = Cells(2, 45).Value
LINE5 = Cells(2, 46).Value
LINE6 = Cells(2, 47).Value
Do Until ActiveCell.Value = vbNullString
session.findById("wnd[0]/tbar[1]/btn[6]").press
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/ctxtCCMSEARCH_STRUCT-BP1_PARTNER").Text = BP
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/ctxtCCMSEARCH_STRUCT-BP1_PARTNER").SetFocus
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/ctxtCCMSEARCH_STRUCT-BP1_PARTNER").caretPosition = 7
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/btnFIND").press
session.findById("wnd[0]").resizeWorkingPane 133, 31, False
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_COMMON:SAPLCRM_1O_UI:3150/subSCR_1O_TBAR_CREATE:SAPLCRM_1O_UI:7160/cntlCONTAINER_1O_TBAR0/shellcont/shell").pressContextButton "1OMAIN_CREATE"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_COMMON:SAPLCRM_1O_UI:3150/subSCR_1O_TBAR_CREATE:SAPLCRM_1O_UI:7160/cntlCONTAINER_1O_TBAR0/shellcont/shell").selectContextMenuItem "BUS2000116@ZSRV@1OMAIN_CREATE"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-DESCRIPTION").Text = PROBLEM
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-DESCRIPTION").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-DESCRIPTION").caretPosition = 40
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-PO_NUMBER_SOLD").Text = AUTHORIZATION
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-PO_NUMBER_SOLD").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-PO_NUMBER_SOLD").caretPosition = 8
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA3:SAPLCRM_TSRV_UI:3161/subSCRAREA: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_3-PARTNER_NUMBER").Text = bp_number
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA3:SAPLCRM_TSRV_UI:3161/subSCRAREA: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_3-PARTNER_NUMBER").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA3:SAPLCRM_TSRV_UI:3161/subSCRAREA: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_3-PARTNER_NUMBER").caretPosition = 5
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA4:SAPLCRM_TSRV_UI:3131/subSCRAREA:SAPLCRM_SERVICE_ROB_UI:7112/ctxtCRMT_7100_SRV_REFOBJ_UI-IB_INSTANCE").Text = COMPONENT
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA4:SAPLCRM_TSRV_UI:3131/subSCRAREA:SAPLCRM_SERVICE_ROB_UI:7112/cmbCRMT_7100_SRV_SUBJECT_UI-LISTCODE").Key = "Z Z0000001199"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA2:SAPLCRM_TSRV_UI:2200/tabsTABSTRIP_TSRV_IC/tabpT\TSRV_IC02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:4200/cntlSRV_ITEM_LIST/shellcont/shell").doubleClickCurrentCell
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1220/subSCRAREA2:SAPLCRM_TSRV_UI:2300/tabsTABSTRIP_TSRV_ID/tabpT\TSRV_ID01/ssubITEM_DETAIL:SAPLCRM_TSRV_UI:1140/subSCRAREA1:SAPLCRM_TSRV_UI:6040/subSCRAREA:SAPLCRM_STATUS_UI:0131/cntlSTATUSCONT_0131/shellcont/shell").pressContextButton "BT_STATUS_EXTERN"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1220/subSCRAREA2:SAPLCRM_TSRV_UI:2300/tabsTABSTRIP_TSRV_ID/tabpT\TSRV_ID01/ssubITEM_DETAIL:SAPLCRM_TSRV_UI:1140/subSCRAREA1:SAPLCRM_TSRV_UI:6040/subSCRAREA:SAPLCRM_STATUS_UI:0131/cntlSTATUSCONT_0131/shellcont/shell").selectContextMenuItem "E0002"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA1:SAPLCRM_1O_GEN_UI:5010/cntlFCODE_TB_AREA/shellcont/shell").pressButton "TSRV_HDIL"
'text
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = LINE1 + vbCr + LINE2 + vbCr + LINE3 + vbCr + LINE4 + vbCr + LINE5 + vbCr + LINE6 + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 425, 425
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").firstVisibleLine = "6"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZCCN", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "ZCCN", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "ZCCN", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = CUSTOMER_CONTACT + vbCr + "" + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 13, 13
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZCCP", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "ZCCP", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "ZCCP", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = CONTACT_number + vbCr
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 29, 29
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZNMT", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "ZNMT", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "ZNMT", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = nte + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 4, 4
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 4, 4
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "S002", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "S002", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").topNode = "ZWO#"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "S002", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = INTERNAL + "" + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 53, 53
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZSPL", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01").Select
'PLANNED/OT
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-CATEGORY").Key = Warr_or_non
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-CATEGORY").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-PRIORITY").Key = ot
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-PRIORITY").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01").Select
'partner field and NDA
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_USAGE_TYPE").Text = " "
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_DLV_PRIO").Text = " "
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_DLV_PRIO").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_DLV_PRIO").caretPosition = 1
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA2:SAPLCRM_TSRV_UI:3150/subSCRAREA:SAPLCRM_STATUS_UI:0114/cntlSTATUSCONT_0114/shellcont/shell").pressButton "BT_STATUS_RELEASE"
'saving service order
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/subSUB_BUT:SAPLCCM21:0109/btnAA_BUT1").press
ActiveCell.Offset(1, 19).Value = session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-OBJECT_ID").Text
ActiveCell.Offset(2, 0).Select
Loop
End Sub
您可以尝试以下方法:
Sub Enter_call()
Set sapguiauto = GetObject("SAPGUI")
Set SAPApp = sapguiauto.GetScriptingEngine
Set SAPCon = SAPApp.Children(0)
Set session = SAPCon.Children(0)
'If IsObject(wscript) Then
' wscript.ConnectObject session, "on"
' wscript.ConnectObject Application, "on"
'End If
'Below are the cells I want dynamic EX bp_number should start at 2, 23 then 3, 23, etc.
'ActiveCell.Offset(2, 0).Select
for i = 2 to ActiveCell.SpecialCells(xlLastCell).Row
if ActiveCell.Value = vbNullString then exit for
bp_number = Cells(i, 23).Value
PROBLEM = Cells(i, 24).Value
CUSTOMER_CONTACT = Cells(i, 17).Value
CONTACT_number = Cells(i, 18).Value
Warr_or_non = Cells(i, 48).Value
ot = Cells(i, 49).Value
AUTHORIZATION = Cells(i, 21).Value
COMPONENT = Cells(i, 27).Value
INTERNAL = Cells(i, 29).Value
BP = Cells(i, 22).Value
Prob_desc = Cells(i, 28).Value
LINE1 = Cells(i, 42).Value
LINE2 = Cells(i, 43).Value
LINE3 = Cells(i, 44).Value
LINE4 = Cells(i, 45).Value
LINE5 = Cells(i, 46).Value
LINE6 = Cells(i, 47).Value
'Do Until ActiveCell.Value = vbNullString
session.findById("wnd[0]/tbar[1]/btn[6]").press
...
'Loop
next
End Sub
问候,ScriptMan
我正在尝试使用 excel sheet 通过宏将大量信息批量加载到 SAP 中。 宏在第一行运行良好,但我无法让宏转到下一行。 宏需要从第 2 行动态提取所有数据,然后是第三行,依此类推,直到列表末尾。
谁能指出我正确的方向?我试过偏移量,但是在定义它应该在哪里寻找数据时,它保持静态。
Sub Enter_calla()
Range("A1").Select
Call Enter_call
End Sub
Sub Enter_call()
Set sapguiauto = GetObject("SAPGUI")
Set SAPApp = sapguiauto.GetScriptingEngine
Set SAPCon = SAPApp.Children(0)
Set session = SAPCon.Children(0)
If IsObject(wscript) Then
wscript.ConnectObject session, "on"
wscript.ConnectObject Application, "on"
End If
'Below are the cells I want dynamic EX bp_number should start at 2, 23 then 3, 23, etc.
ActiveCell.Offset(2, 0).Select
bp_number = Cells(2, 23).Value
PROBLEM = Cells(2, 24).Value
CUSTOMER_CONTACT = Cells(2, 17).Value
CONTACT_number = Cells(2, 18).Value
Warr_or_non = Cells(2, 48).Value
ot = Cells(2, 49).Value
AUTHORIZATION = Cells(2, 21).Value
COMPONENT = Cells(2, 27).Value
INTERNAL = Cells(2, 29).Value
BP = Cells(2, 22).Value
Prob_desc = Cells(2, 28).Value
LINE1 = Cells(2, 42).Value
LINE2 = Cells(2, 43).Value
LINE3 = Cells(2, 44).Value
LINE4 = Cells(2, 45).Value
LINE5 = Cells(2, 46).Value
LINE6 = Cells(2, 47).Value
Do Until ActiveCell.Value = vbNullString
session.findById("wnd[0]/tbar[1]/btn[6]").press
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/ctxtCCMSEARCH_STRUCT-BP1_PARTNER").Text = BP
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/ctxtCCMSEARCH_STRUCT-BP1_PARTNER").SetFocus
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/ctxtCCMSEARCH_STRUCT-BP1_PARTNER").caretPosition = 7
session.findById("wnd[0]/usr/subAREA01:SAPLCCM1:0202/subSEARCH_DISPLAY:SAPLCRM_CIC_BP_SUB:0122/btnFIND").press
session.findById("wnd[0]").resizeWorkingPane 133, 31, False
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_COMMON:SAPLCRM_1O_UI:3150/subSCR_1O_TBAR_CREATE:SAPLCRM_1O_UI:7160/cntlCONTAINER_1O_TBAR0/shellcont/shell").pressContextButton "1OMAIN_CREATE"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_COMMON:SAPLCRM_1O_UI:3150/subSCR_1O_TBAR_CREATE:SAPLCRM_1O_UI:7160/cntlCONTAINER_1O_TBAR0/shellcont/shell").selectContextMenuItem "BUS2000116@ZSRV@1OMAIN_CREATE"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-DESCRIPTION").Text = PROBLEM
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-DESCRIPTION").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-DESCRIPTION").caretPosition = 40
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-PO_NUMBER_SOLD").Text = AUTHORIZATION
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-PO_NUMBER_SOLD").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-PO_NUMBER_SOLD").caretPosition = 8
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA3:SAPLCRM_TSRV_UI:3161/subSCRAREA: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_3-PARTNER_NUMBER").Text = bp_number
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA3:SAPLCRM_TSRV_UI:3161/subSCRAREA: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_3-PARTNER_NUMBER").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA3:SAPLCRM_TSRV_UI:3161/subSCRAREA: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_3-PARTNER_NUMBER").caretPosition = 5
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA4:SAPLCRM_TSRV_UI:3131/subSCRAREA:SAPLCRM_SERVICE_ROB_UI:7112/ctxtCRMT_7100_SRV_REFOBJ_UI-IB_INSTANCE").Text = COMPONENT
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA4:SAPLCRM_TSRV_UI:3131/subSCRAREA:SAPLCRM_SERVICE_ROB_UI:7112/cmbCRMT_7100_SRV_SUBJECT_UI-LISTCODE").Key = "Z Z0000001199"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA2:SAPLCRM_TSRV_UI:2200/tabsTABSTRIP_TSRV_IC/tabpT\TSRV_IC02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:4200/cntlSRV_ITEM_LIST/shellcont/shell").doubleClickCurrentCell
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1220/subSCRAREA2:SAPLCRM_TSRV_UI:2300/tabsTABSTRIP_TSRV_ID/tabpT\TSRV_ID01/ssubITEM_DETAIL:SAPLCRM_TSRV_UI:1140/subSCRAREA1:SAPLCRM_TSRV_UI:6040/subSCRAREA:SAPLCRM_STATUS_UI:0131/cntlSTATUSCONT_0131/shellcont/shell").pressContextButton "BT_STATUS_EXTERN"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1220/subSCRAREA2:SAPLCRM_TSRV_UI:2300/tabsTABSTRIP_TSRV_ID/tabpT\TSRV_ID01/ssubITEM_DETAIL:SAPLCRM_TSRV_UI:1140/subSCRAREA1:SAPLCRM_TSRV_UI:6040/subSCRAREA:SAPLCRM_STATUS_UI:0131/cntlSTATUSCONT_0131/shellcont/shell").selectContextMenuItem "E0002"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA1:SAPLCRM_1O_GEN_UI:5010/cntlFCODE_TB_AREA/shellcont/shell").pressButton "TSRV_HDIL"
'text
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = LINE1 + vbCr + LINE2 + vbCr + LINE3 + vbCr + LINE4 + vbCr + LINE5 + vbCr + LINE6 + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 425, 425
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").firstVisibleLine = "6"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZCCN", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "ZCCN", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "ZCCN", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = CUSTOMER_CONTACT + vbCr + "" + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 13, 13
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZCCP", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "ZCCP", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "ZCCP", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = CONTACT_number + vbCr
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 29, 29
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZNMT", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "ZNMT", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "ZNMT", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = nte + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 4, 4
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 4, 4
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "S002", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").ensureVisibleHorizontalItem "S002", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").topNode = "ZWO#"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").doubleClickItem "S002", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").Text = INTERNAL + "" + vbCr + ""
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[1]/shell").setSelectionIndexes 53, 53
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD02/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:3120/subSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2100/ssubSCRAREA:SAPLCOM_TEXT_MAINTENANCE:2101/cntlSPLITTER_CONTAINER_2101/shellcont/shellcont/shell/shellcont[0]/shell").selectItem "ZSPL", "Column1"
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01").Select
'PLANNED/OT
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-CATEGORY").Key = Warr_or_non
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-CATEGORY").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-PRIORITY").Key = ot
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD05/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1130/subSCRAREA2:SAPLCRM_TSRV_UI:3140/cmbCRMT_3140_TSRV_UI-PRIORITY").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01").Select
'partner field and NDA
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_USAGE_TYPE").Text = " "
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_DLV_PRIO").Text = " "
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_DLV_PRIO").SetFocus
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD07/ssubHEADER_DETAIL:SAPLCRM_1O_GEN_UI:3010/ssubCUSTOMER_H:SAPLCRM_BTX_EEW_UI_FRAME:1000/subSUB10:SAPLZCRM_BTX_EEW_UI10:0100/ctxtZCRMT_0100_BTX_UI10-ZZSH_DLV_PRIO").caretPosition = 1
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01").Select
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA2:SAPLCRM_TSRV_UI:3150/subSCRAREA:SAPLCRM_STATUS_UI:0114/cntlSTATUSCONT_0114/shellcont/shell").pressButton "BT_STATUS_RELEASE"
'saving service order
session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/subSUB_BUT:SAPLCCM21:0109/btnAA_BUT1").press
ActiveCell.Offset(1, 19).Value = session.findById("wnd[0]/usr/subAREA06:SAPLCCM21:0101/tabsTABSTRIP/tabpAA_TAB3/ssubSUB_TAB:SAPLCCM21:0104/ssubCCM21_CUST_SUB:SAPLCRM_1O_UI:1100/subSCR_1O_MAINTAIN:SAPLCRM_TSRV_UI:0100/subSCRAREA2:SAPLCRM_TSRV_UI:1240/subSCRAREA1:SAPLCRM_TSRV_UI:2100/tabsTABSTRIP_TSRV_HD/tabpT\TSRV_HD01/ssubHEADER_DETAIL:SAPLCRM_TSRV_UI:1150/subSCRAREA1:SAPLCRM_TSRV_UI:3110/txtCRMT_3100_TSRV_UI-OBJECT_ID").Text
ActiveCell.Offset(2, 0).Select
Loop
End Sub
您可以尝试以下方法:
Sub Enter_call()
Set sapguiauto = GetObject("SAPGUI")
Set SAPApp = sapguiauto.GetScriptingEngine
Set SAPCon = SAPApp.Children(0)
Set session = SAPCon.Children(0)
'If IsObject(wscript) Then
' wscript.ConnectObject session, "on"
' wscript.ConnectObject Application, "on"
'End If
'Below are the cells I want dynamic EX bp_number should start at 2, 23 then 3, 23, etc.
'ActiveCell.Offset(2, 0).Select
for i = 2 to ActiveCell.SpecialCells(xlLastCell).Row
if ActiveCell.Value = vbNullString then exit for
bp_number = Cells(i, 23).Value
PROBLEM = Cells(i, 24).Value
CUSTOMER_CONTACT = Cells(i, 17).Value
CONTACT_number = Cells(i, 18).Value
Warr_or_non = Cells(i, 48).Value
ot = Cells(i, 49).Value
AUTHORIZATION = Cells(i, 21).Value
COMPONENT = Cells(i, 27).Value
INTERNAL = Cells(i, 29).Value
BP = Cells(i, 22).Value
Prob_desc = Cells(i, 28).Value
LINE1 = Cells(i, 42).Value
LINE2 = Cells(i, 43).Value
LINE3 = Cells(i, 44).Value
LINE4 = Cells(i, 45).Value
LINE5 = Cells(i, 46).Value
LINE6 = Cells(i, 47).Value
'Do Until ActiveCell.Value = vbNullString
session.findById("wnd[0]/tbar[1]/btn[6]").press
...
'Loop
next
End Sub
问候,ScriptMan