on 06-25-2015 2:37 PM
Hi Personas 2.0 experts,
Here is the usecase: start tcode "ME51N", expend the icon "Item Overview" to display the table. I added a text field where user will type a free text. Then by pressing a button, I want the free text to be copied into all the lines of a column of the table, eg, into each line of column "Requested by".
Anyone know hwo to do this? I know how to get info from a table, but not write info into the table.
Thanks a lot!
Dong Zhu
The problem, in Personas 2 at least, is the "all lines" bit. There's no way to build a loop in Personas 2 that can iterate over all the lines in a table to write to it. You can do this in Personas 3, but not in Personas 2.
The best you can do is unroll the loop - assume a maximum number of rows in the table and write code like:
if cell in row 1 exists
paste into row 1
if cell in row 2 exists
paste into row 2
if cell in row 3 exists
paste into row 3
...
It isn't pretty, but it should work if you pick a large enough number.
If the requisition might have more rows than fit on the screen at once, and so you have to scroll to get to a 2nd or 3rd screenful, this gets more complex, and I'm not sure I'd recommend it.
Again, Personas 3 can manage this. You don't have long to wait... 🙂
Steve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steve,
Thanks very much for the reply. The Personas 3.0 is definitely better but we cannot wait for that, so far I have to use Personas 2.0, unfortunately.
Just for now, could you please provide more detail of script code, for a simple case, say I want to press a script button, then text "value 1" and "value 2" will be written to the first line and second line of the column "Short Text" in the table (of Item Overview) of tcode "ME51N"?
I can see the id of the column but how I can enter a value in a cell using script? Thanks so much!
Dong Zhu
Hi Steve,
Thanks a lot! I guess I was doing just one cell first why I did not see any script recorded. Later I did a nit more action filling more cells and I got the script recorded.
All in all it has to be a "static id" of the cell that cannot be variable. I have to apply the copy/paste to each specific cell with given row and column numbers.
Set to answered.
Dong
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.