I am working on SAP GUI scripting in Loadrunner.
I have one script in an Action which generates a "Delivery Number" Eg:80004600 in the script. I am able to successfully extract the value of the delivery number 80004600 in a variable called "Deliver_Number" using sap_gui functions, as shown below:
sapgui_status_bar_get_type("Delivery_Status",LAST);
sapgui_status_bar_get_text("Delivery",LAST);
sapgui_status_bar_get_param("2","Delivery_Number",LAST);
I need to pass this "Delivery_Number" in the next step in a Table below:
sapgui_table_fill_data("Table",
tblSAPSAMPLE_EX_OBJECT,
"{Delivery_Number}",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui2017",
END_OPTIONAL);
This can't be done as its a table and not able to take any input from a variable. Fetching the below error.
Whereas, if the "Delivery Number" Eg:80004600 is passed via table by creating a parameter Eg:data_2.dat file, the script successfully passes.
sapgui_table_fill_data("Table",
tblSAPSAMPLE_EX_OBJECT,
"{data_2}",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui2017",
END_OPTIONAL);
I would like to have a code in C programming language, that can allow me to save the extracted data 80004600 i.e Delivery Number into the parameter file "data_2.dat" shown above, which can be used in the next action to pass the value to the table mentioned above. Is there any other possible way of doing this? Any aid will be really appreciated.