cancel
Showing results for 
Search instead for 
Did you mean: 

The control cannot be found by ID

Former Member
0 Kudos

Dear Experts,

I have an issue with SAP scripting where it works in 1 environment but fails to work in another. I have the code written as follow:-

session.findById("wnd[0]/usr/ctxtLFM1-KALSK").Text = Schema_group_vendor

it works fine with one of the Development client, however, not working for Quality client. The error I received during execution was "This control cannot be found by ID". I investigated this issue and tried to record the SAP scripting in both environment, results shown as follow:-

Development client (Where it is not working): session.findById("wnd[0]/usr/ctxt[0]").text = "80411" (Format A)

Quality Client (working fine): session.findById("wnd[0]/usr/ctxtRF02K-LIFNR").text = "80411" (Format B)

I now stucked with issue that I have combination of VBA files which written in both formats above, which can only work on 1 particular client i.e. if I run format B VBA in Development client, the code will stop and produce error message mentioned.

Anyone has any insight into this? Is it due to SAP GUI setting or client setting that I need to change?

many thanks for your help

Accepted Solutions (0)

Answers (1)

Answers (1)

RMW
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

when recording the script with ctxt[0], the field name information was missing and has been replaced by an index.

This might have been caused by the option "slow connection" for the connection (please check in SAP Logon, properties of the connection). This option causes several informations not to be sent to the SAP GUI, including field names.

Best regards

Rolf-Martin