Skip to Content

Different scripting on same SAP GUI and Windows version

Hello,

I have developed one tool based on SAP scriping. On my PC it works great but when I run in on different PC with same Windows and SAP GUI and language.

I receive error in VBA The control cound not be found by id. Transaction is normally opened but when I want to do any modification in the selection (tr. COOIS) I receive this error.

I have tried to record script on the "problematic" PC but the code is different to mine. I am wondering how it's possible (see snippet)

My PC:

session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_COMPO-LOW").Text = "12345"
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub%_SUBSCREEN_SELBLOCK:PPIO_ENTRY:1200/ctxtS_CWERK-LOW").Text = "0001"

"Problematic" PC:

session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub/2/3/ctxt[12]").text = "12345"
session.findById("wnd[0]/usr/tabsTABSTRIP_SELBLOCK/tabpSEL_00/ssub/2/3/ctxt[14]").text = "0001"
 

Any hint from your side experts? I am desperate cause the creation of tool was very time consuming :-(

Many thanks in advance for reply

David

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Dec 07, 2016 at 05:51 AM

    Hello David,

    please take a look here, I hope this is the solution for your problem.

    Cheers
    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2016 at 11:30 AM

    I have also logged on SAP of the "problematic" user id on my PC and it also works. There's some problem somewhere in the "problematic" user PC settings.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 04, 2016 at 05:05 PM

    It looks as if the SAP GUI doesn't work correctly. "[12]" or "[14]" aren't any correct field names. Try to focus one of theses fields on the "problematic" PC, press "F1" and choose technical information. There the correct fieldname is shown. Normally it should be "S_COMPO-LOW" or "S_CWERK-LOW".

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 04, 2016 at 07:28 PM

    Hello Rüdiger,

    thanks for reply. I have checked this before I wrote this topic. "Problematic" PC shows S_COMPO-LOW or S_CWERK-LOW like my PC :-(

    Regards

    David

    Add comment
    10|10000 characters needed characters exceeded