Skip to Content
0

Script in Personas is not Selecting Row in a Table

Feb 06 at 11:06 AM

51

avatar image
Former Member

Hi Experts,

We are trying to implement the attachments functionality in ME51N and for this we're scripting.

In this, the development idea is to record the key strokes of us selecting the row of a table and on clicking the attachment icon, we should get a pop up window to enter fields.

Although when recording, the script is being mapped in the console, but upon executing, the row is not being selected because of which the next step where we would get a pop up window is not coming.

Below are the steps I'm doing

1)Enter A and I before recording the script and hit Enter

2)We would then arrive at the screen as below

3)Start Recording the script for keystrokes. Need to select the row by clicking at the left. PFB

4)Then click the attachments icon

and a pop up window should be generated as below where we would enter the details

So on recording all the keystrokes and executing, this pop up window is not being generated.

//select the first row

session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").clearSelection();
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").selectedRows = "0";
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=1&column_index=0", null);
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").clearSelection();
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").selectedRows = "0";
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=1&column_index=0", null);
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").clearSelection();
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").clearSelection();
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").selectedRows = "0";
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell").executeWebRequest("post", "action", "53", "row_index=1&column_index=0", null);

//click the attachment icon
session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:*/subSUB2:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:3212/cntlGRIDCONTROL/shellcont/shell/tbar/btnMEREQDMS").press();


1.png (34.9 kB)
2.png (32.8 kB)
3.png (33.7 kB)
dbv3e.png (43.7 kB)
80b09.png (46.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Cristiano Hansen
Mar 31 at 05:27 PM
0

Hello Chandra,

Please use alerts and messages to write details in the log, so you can see what is happening during the script.
Please also check the available API and examples about its use.

Kind regards,
Cris

Share
10 |10000 characters needed characters left characters exceeded