Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

We all have encountered issues with Expand and collapse for standard t-codes ME51N,ME21N when automating SAPGUI scripts using Loadrunner

I always recommend and use conditional statements , it would also be useful to fix the layout for these screens prior to automation and use shortcuts as much possible with "Expand and collapse" , testing with more than one unique user will enable developing a robust script and will work as long as there are no to minimal changes in the screens

if(!sapgui_is_object_available("") is quite handy

Example is shown below:

if(!sapgui_is_object_available"usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1211/tblSAPLMEGUITC_1211")) {    sapgui_press_button("Expand Items Ctrl+F3","usr/subSUB0:SAPLMEGUI:0013/subSUB2:SAPLMEVIEWS:1100/subSUB1:SAPLMEVIEWS:4001/btnDYN_4000-      BUTTON",       BEGIN_OPTIONAL,       "AdditionalInfo=sapgui1098",       END_OPTIONAL); }


Dilip , SAP BLR