on 04-14-2015 2:08 PM
Hello,
i am trying to figure out if it is possible to get/process all selected lines in SAP Personas for table with multiple line selection enabled. i found only posts where actual selected line can be identified in script - e.g. in this post:
I am currently working with SAP Personas 2.0, but I am interested also in Personas 3.0 functionality.
Thank you in advance,
Jan Weissensteiner
Hello,
Not sure if this post would be the best place to ask this, but i would like to know if it is possible to create a flavour/script that can enable the user to apply multiple equipment records (for example) and then run transaction code MIGO with them all assigned on one material document? Like a table for end user to apply records (upto 20 for example) and press a `SEND` button?
Can the script check back on the flavour table to see if there is another entry (equipment record) before posting the material document?
Hope this makes sense.
Many Thanks,
Ben
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think it'd be better to create a new thread and explain your exact requirement, instead of referencing this old thread.
In Personas 2.0, it depends on how do you want to process the marked table entries.
Since the Personas 2.0 scripting engine doesn't support looping, you can only read the entire content of the table into an array using a JavaScript step and then evaluate this and determine which lines have been selected. Then you could process the result, for instance you could add field values from the selected rows or something like this, since it is possible to perform looping in JavaScript. However you cannot do certain actions like pressing a script button for each selected row, for instance.
In Personas 3.0, you can pretty much do anything you want since the scripting engine uses JavaScript and you can rely on JS functionality to have much more freedom, including pressing buttons.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Tamas,
It seems to me that javascript copy of a table in Personas 2.0 doesnt contain a row selection field, according which I could be able to deterime if it was selected by the user. Anyway i would need to run webrfc for each selected row in a loop from javascript in my scenario to validate the rows before save, which also seems to be a problem in personas 2.0.
Jan
Hi Jan
As you have mentioned
"It seems to me that JavaScript copy of a table in Personas 2.0 doesn't contain a row selection field, according which I could be able to determine if it was selected by the user."
Can you please confirm how did you determine the row selected by the user in case of Personas 2.0
Regards
Hello Suraj,
My conclusion is that you are not able to determine all selected rows in a table with enabled multiple selection of rows in personas 2. you are only able to determine last selected single row. the solution for it is described in a link i provided in my first post of this thread.
Jan
Well, you could certainly determine the selected rows if you copy the table and process it as an array using a JavaScript step. Then I can imagine building a variable in your JS logic that lists the selected rows, for example comma delimited. This would then be available for the Personas scripting engine.
Not exactly the most straightforward method but at least it is possible... using this information is of course another matter, because at some point in time, the lack of looping will probably become a problem.
Hello Tamas,
could you please specify based on what column in the javascript copy of a table it is possible to determine if the row is selected in personas 2.0? i was not able to find it, and the javascript part of personas is not documented well. in abap side, there is a row selection field which seem to be not passed to personas.
e.g. actually seclected row is visible in javascript via built-in variable args.row, but besides some SCN blogs it is not documented in official personas documentation. so may be there is another built-in column in javascript copy of a table, which is not obvious..
Jan
Hello Tamas,
i am trying to enhance transaction FBCJ (cash journal) - which uses table control type of table on the screen. i copied table to javascript table lt_fbcj and then made few tests to show a column label on the screen:
args.lv_fldname = args.lt_fbcj[0][0]; - this assigns first visible column label to lv_fldname
args.lv_fldname = args.lt_fbcj[70][0]; - this assigns last visible column label to lv_fldname
args.lv_fldname = args.lt_fbcj[71][0]; - this gives runtime error
so it seems that row selection field is not passed to javascript copy of a table in personas 2.
i also figured out (by accident) that by doublecliking on the table area (on the row selection column) it is possible to define rules for highlighting rows in table also in personas 2.0. however row selection field is not among table fields available for definition of the rules.
so Tamas, could you please make a test on some personas 2.0 system and confirm if row selection field is accessible in personas 2.0? it would be fine for me to know it for sure and it would help me a lot in my scenario if i have at least comma delimited list of selected rows...
thank you,
Jan
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.