cancel
Showing results for 
Search instead for 
Did you mean: 

Access Check Boxes in GuiTableControl in MM41

0 Kudos

Hi All,

I'm Try to automate MM41 process (Material Creation). But Desktop Studio application does not allow to capture check Box items in the view list. How can I selected these check box items(Mark in red in the image) in my automation. Even DOM Tree is showing "Text Field" of the Check box Only in the leaf level. Screen Shot attached.

Please Advise !

Thank You

Accepted Solutions (1)

Accepted Solutions (1)

peterengel
Advisor
Advisor

Hi,

please download the latest version of the Desktop Studio here. Withe the latest version there are new activities to work on a GUITableContrl.

screenshot-2020-04-17-at-113834.png

Br,

Peter

Answers (1)

Answers (1)

former_member651484
Participant
0 Kudos

Hi,

In the actual version there are no methods available for selecting row in a GuiTableControl Component.

but you can tried this workaround :

SetFocus on an element of the ligne and after make a keyStroke

SAP.pDispStandOrderSOP15.edDMateriel.i(0).setFocus();
SAP.pDispStandOrderSOP15.keyStroke(e.SAPScripting.key._F9_);

a method for selecting a line in a GuiTableControl component must be implemented in a future version.

0 Kudos

Hello Sabine,

Thank you for the feedback for the issue. I tried your approach in my code but it does not tick the check boxes. And I tried manually click the “Basic Data” check box by focusing the Check Box (pleas referrer the image – “Basic Data”) and press “F9” key. But still it does not checked. Seems I missing something here. Code and Element structures are attached for your reference.

Please advise.

Thanks You !

former_member651484
Participant
0 Kudos

Hi,

it's just a workaround.

To possibly find the right key, you have to try without the robot with the keyboard keys, put the focus on an element and then keyboard key F9 or another key.

If it doesn't work without the robot, it won't work with the robot either.

But in the next version there should be a method that selects a row of an array

0 Kudos

Hello,

sabinesmai I was having a similar issue and this workaround worked for me! Thank you a lot.

However, I didn't use the keystroke command as this was not working (for WEB technology). This is the code I filanlly used:

S4HanaCloud.pAssociationsList.execScript("var f9Event = new KeyboardEvent('keydown', {altKey:false,bubbles: true, cancelBubble: false, cancelable: true, charCode: 0, code: 'f9', composed: true, ctrlKey: false, currentTarget: null, defaultPrevented: true, detail: 0, eventPhase: 0, isComposing: false, isTrusted: true, key: 'f9', keyCode: 120, location: 0, metaKey: false, repeat: false, returnValue: false, shiftKey: false, type: 'keydown',which: 120});");

S4HanaCloud.pAssociationsList.oFirstTableField_Field.scriptItem('dispatchEvent(f9Event)');

Please notice the pointed item is not the checkbox but the first element of the table (see attached picture). This worked for me

untitled.jpg

Hope this is useful for someone in the future 🙂

Bests,

Victoria Bonzon