Using QTP 8.2 to record SAP Windows on WinXP SP2 for creation of testing data:
In creating scripts for SAP-MM, the Purchase Req is created and the number written to the DataTable. Same script then calls up the Purchase Req number from the DataTable to create a Purchase Order. Problem is, the script is writing leading zeros on the PReq number, which when read by the script as a node in the SAP TableTreeControl, is looking for Node 0010015866 instead of 10015866, creating a failure error. I have tried every kind of number formatting both inside the QTP DataTable AND outside QTP modifying the Default using Excel. How can I get QTP to not write/read the leading zeros?
Expert View Writing to DataTable:
0010015866 is written
Reads 0010015866, SAP ignores the leading zeros, finds the correct PReq, creates it as the one item in the TableTree as 10015866
Selecting the Node:
Looks for 0010015866, cannot find it, Failure error.
(attachment: Keyword view, Working write, QTP error)
Thanks for looking/help. -Bodd
In creating scripts for SAP-MM, the Purchase Req is created and the number written to the DataTable. Same script then calls up the Purchase Req number from the DataTable to create a Purchase Order. Problem is, the script is writing leading zeros on the PReq number, which when read by the script as a node in the SAP TableTreeControl, is looking for Node 0010015866 instead of 10015866, creating a failure error. I have tried every kind of number formatting both inside the QTP DataTable AND outside QTP modifying the Default using Excel. How can I get QTP to not write/read the leading zeros?
Expert View Writing to DataTable:
Code:
SAPGuiSession("Session").SAPGuiWindow("Create Purchase Requisition").SAPGuiStatusBar("StatusBar").Output CheckPoint("StatusBar")
Code:
Reading from DataTable into an SAP input field:
SAPGuiSession("Session").SAPGuiWindow("Purchase requisitions").SAPGuiEdit("Purchase requisition number").Set DataTable("Purch_Req_Num", dtGlobalSheet)
Selecting the Node:
Code:
SAPGuiSession("Session").SAPGuiWindow("Create Purchase Order").SAPGuiTree("TableTreeControl").SelectNode DataTable("Purch_Req_Num", dtGlobalSheet)
(attachment: Keyword view, Working write, QTP error)
Thanks for looking/help. -Bodd