I want to write a code where the script selects the correct processes (e.g. A07) in the transaction MIGO in SAP GUI.
But apparently the SAPLMIGO:0007 in the code below is dynamic and can change.
Is there a way that I can check the actual ID and use this in the line of code?
session.findById("wnd[0]/usr/ssubSUB_MAIN_CARRIER:SAPLMIGO:0007/subSUB_FIRSTLINE:SAPLMIGO:0011/cmbGODYNPRO-ACTION").Key = "A07"
The following code will return the ID of the object in question.
Let's assume
sessionis a GUI session which points to a SAPGUI session with MIGO just started. ThenDebug.Print session.FindById("wnd[0]/usr").Children(0).IDwill return you the complete ID like/app/con[0]/ses[0]/wnd[0]/usr/ssubSUB_MAIN_CARRIER:SAPLMIGO:0007You could now check the string forSAPLMIGO:and return the part you are interested in.