I have searched long time before I asked you for help.
I am searching for Material Characrteristic coordinates to use them for pasting the value.
How to get location/coordinates of marked place?
Please see the code I am using during manual maintenance (macro recording)
session.findById("wnd[0]/usr/subSUBSCR_BEWERT:SAPLCTMS:5000/tabsTABSTRIP_CHAR/tabpTAB1/ssubTABSTRIP_CHAR_GR:SAPLCTMS:5100/tblSAPLCTMSCHARS_S/ctxtRCTMS-MWERT[1,4]").Text = col3
col3 is variable which I put in the place (MWERT[1,4]
)
Location of transport condition characteristic is different for every material, in this case it is MWERT[1,4]
. How to get it every time and put into the code:
session.findById("wnd[0]/usr/subSUBSCR_BEWERT:SAPLCTMS:5000/tabsTABSTRIP_CHAR/tabpTAB1/ssubTABSTRIP_CHAR_GR:SAPLCTMS:5100/tblSAPLCTMSCHARS_S/ctxtRCTMS-MWERT[x,y]").Text = col3
(x,y) - new coordinates took by VBA.
I tried
myKey = session.ActiveWindow.GuiFocus.ID
- it doesn't give me coordinates of the characteristc value which is focused.
I tried .getFocusedNodeKey()
but also it is not working
session.findById("wnd[0]/usr/subSUBSCR_BEWERT:SAPLCTMS:5000/tabsTABSTRIP_CHAR/tabpTAB1/ssubTABSTRIP_CHAR_GR:SAPLCTMS:5100/tblSAPLCTMSCHARS_S/ctxtRCTMS-MWERT").getFocusedNodeKey()
I tried few others configurations and test myself but nothing worth to mention.
Thank you in advance for you help. Lukas