Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP SAPWindows Leading Zeros
#1
Solved: 11 Years, 4 Months ago
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:
Code:
SAPGuiSession("Session").SAPGuiWindow("Create Purchase Requisition").SAPGuiStatusBar("StatusBar").Output CheckPoint("StatusBar")
0010015866 is written

Code:
Reading from DataTable into an SAP input field:
SAPGuiSession("Session").SAPGuiWindow("Purchase requisitions").SAPGuiEdit("Purchase requisition number").Set DataTable("Purch_Req_Num", dtGlobalSheet)
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:
Code:
SAPGuiSession("Session").SAPGuiWindow("Create Purchase Order").SAPGuiTree("TableTreeControl").SelectNode DataTable("Purch_Req_Num", dtGlobalSheet)
Looks for 0010015866, cannot find it, Failure error.

(attachment: Keyword view, Working write, QTP error)
Thanks for looking/help. -Bodd


Attached Files Image(s)
           
Reply


Messages In This Thread
QTP SAPWindows Leading Zeros - by bodd - 04-17-2008, 08:20 PM
RE: QTP SAPWindows Leading Zeros - by niranjan - 04-17-2008, 09:54 PM
RE: QTP SAPWindows Leading Zeros - by bodd - 04-18-2008, 12:55 AM
RE: QTP SAPWindows Leading Zeros - by niranjan - 04-18-2008, 02:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Enable Leading Zero Nana 5 9,454 06-07-2008, 04:39 AM
Last Post: niranjan

Forum Jump:


Users browsing this thread: 2 Guest(s)