cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Personas - dynamic selection of line from report

Former Member
0 Kudos

Hi there,

  I am stuck in a scenario, where I am searching for the list of PO via ME2N

And when the list is shown, I have edited it via personas and moved around the columns

I want to capture the line selected by the user so when the hit the button “Choose Selected”, I bring the PO related info back to the original screen. The overall goal is to integrate the GR to GI via Reservation as shown in the design:

Currently, I the script is only bringing line 10 as the recording captured the first line and is kind of hard-coded.

Thanks & regards,

Aravindan K

Accepted Solutions (0)

Answers (1)

Answers (1)

TobiasQueck
Advisor
Advisor
0 Kudos

Hi Aravindan,

Great scenario! I haven't used ME2N before but I had a look how to do this using VA05N, which seems to be very similar.

To solve this problem using Personas, you need to use the Copy Table action (copies the whole table in to a two dimensional array), and some simple JavaScript to extract the content that you are interested in. The only thing that is missing is the information about the currently selected row. To get this information you need to bind the script (button) to the grid using the PushOnEnter property. By doing so, the script (button) is executed, when the table is focused and the enter key is pressed.

An example JavaScript snippet is args.value = args.table[3][parseInt(args.row) + 1] if you want to copy the value of the third column of the currently selected row (+1 because the row index starts with 0 but when copying the table row 0 contains the headers).

Please have a look at , this similar example shows step by step how to solve such a problem.

Cheers,
Tobias.

Former Member
0 Kudos

Hi Tobias,

  Thanks for the link tot eh video, the scenario is a perfect fit. The tip on the property "PushonEnter" will help in a lot of other scenarios too.

Thanks & regards,

Aravindan K