Skip to Content

Checking and unchecking a checkbox in a table with Personas 3 SP5

Nov 24, 2017 at 04:34 PM


avatar image


First of all I am using ECC 6.0 EHP 7 with SAP Personas 3 SP5. In EHP 5, IW32 displayed the data I needed in objects that I could select in the Personas code editor with the inspector. Now in EHP 7 the data is in tables, so I have to change my Personas script.

Below is my code and the resulting table. Notice the table has an 'X' in it instead of checking the check box.

Anyone have experience with this?

Thanks, Brian

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Brian Wills Dec 07, 2017 at 08:29 PM

I submitted this as a SAP Incident and have a solution. Thanks SAP!!

This is the solution:

session.findById("wnd[0]/usr/tabsTABSTRIP_0300/tabpANWS/ssubSUBSCREEN:SAPLBSVA:0302/tblSAPLBSVATC_EO/chkJ_STMAINT-ANWSO[0,0]").selected = true;

Even though I cannot use the Inspector to click on the specific object because it is in a table, I can still get the object info from the recording.

  1. Record the action and check the box.
  2. The result is: session.findById("wnd[0]/usr/tabsTABSTRIP_0300/tabpANWS/ssubSUBSCREEN:SAPLBSVA:0302/tblSAPLBSVATC_EO/chkJ_STMAINT-ANWSO[0,0]").executeWebRequest("post", "action", "7", null, null);
  3. Use everything up to the executeWebRequest. For example: session.findById("wnd[0]/usr/tabsTABSTRIP_0300/tabpANWS/ssubSUBSCREEN:SAPLBSVA:0302/tblSAPLBSVATC_EO/chkJ_STMAINT-ANWSO[0,0]")
  4. Now add ".selected = true" or ".selected = false". to check and uncheck the checkbox.
  5. Note: In the [0,0] the first 0 is the column and the second 0 is the row (index base is 0). You can change the second number to what ever row you want to change.

Hope this is helpful to the Personas developers.

Cheers, Brian

10 |10000 characters needed characters left characters exceeded
Tamas Hoznek
Nov 25, 2017 at 10:10 PM

Try recording the action when you check the box and use that instead of putting the X into the field.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Tamas,

Thanks for the tip. That works in the web browser, unfortunately it does not work in SAPGui. The line created from Personas executes a web request.

This is the line created:

session.findById("wnd[0]/usr/tabsTABSTRIP_0300/tabpANWS/ssubSUBSCREEN:SAPLBSVA:0302/tblSAPLBSVATC_EO/chkJ_STMAINT-ANWSO[0,0]").executeWebRequest("post", "action", "7", null, null);

Any other ideas?

Thanks, Brian