2019 Feb 20 10:11 AM
Hi All,
Trying to Create Requisitions ME51N (screenshot) from excel/access via SAP GUI Scripting and have an issue with the dynamic path to the controls on form. For example it is required to choose few tabs
Valuation tab
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:XXXX/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:3303/tabsREQ_ITEM_DETAIL/tabpTABREQDT5").Select
Text tab
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:XXXX/subSUB3:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1301/subSUB2:SAPLMEGUI:3303/tabsREQ_ITEM_DETAIL/tabpTABREQDT13").Select
XXXX depends on the amount of controls on form, e.g.:
0013/0010 - 1st item of requisition
0020/0010 - item's account type (Account Assignment tab appears)
0019/0015 - if header section is collapsed that happens automatically (sic!) if content does not fit SAP window
Please advise how to avoid multiple if/else and maybe select controls by their names in this transaction rather than by id.
2019 Feb 20 6:36 PM
Hi,
Please try post that topic in ABAP community, they will help you better on this for sure.
Att,
Leonardo de Freitas
2019 Feb 21 5:22 AM
Hi Leonardo,
Thanks for advise, but how can I move this topic there?
Shall I just delete it and post new one with correct tags?
This forum structure is slightly confusing..