2008 Mar 05 1:17 PM
Dear all
I have developed a table control with selection column in module pool programming with single line selection attribute and named that selection column as 'mark'. Now, how can I capture which row is selected from the table control as I want to enter that row in some work area having same structure.
thanks
Dear all
I have developed a table control with selection column in module pool programming with single line selection attribute and named that selection column as 'mark'. Now, how can I capture which row is selected from the table control as I want to enter that row in some work area having same structure.
thanks
2008 Mar 05 4:29 PM
Hi Mohit
1.in your internal table add one new field called 'mark'.
2.in the screen, table control properties give w/selcolumn as workarea-mark.(your work area name)
3.modify the internal table in your PAI
4.now you can find out which line you selected by looping the internal table and check if wrk_area-mark = 'X'. then you can transfer the current line content to another work area with same structure
hop this will help
regards
shibu
2008 Mar 06 7:30 AM
hi
Ur answer was a great help to me..but there is one problem.
Can u plzz tell me how will the value of mark be moved to wa and how will we move it at runtime.
thanks
2008 Mar 05 11:56 PM
Hi there,
You can use Get Cursor to findout the which record you have selected. and you will be having the same record in the internal table which you are passing to your table control,
so read the internal table with the line number you are getting from the Get Cursor. and put those values in the header line or work area.
Hope this will help.
thanks-
Rahul.
2008 Mar 06 3:24 AM
Hi Mohit,
when ever you are going to provide the facility of selecting a row in the table control always provide a field of one character for e.g SEL in the structure which you want to use for table control.
In screen painter , check the selcol option in table control element and provide the field workarea-SEL in that.
Now in the screen logic in PAI , in any module write the code for selection. for e.g.
Loop at itab where sel = 'X'.
endloop.
or suppose you want to delete that record write code as
Delete itab where sel = 'X'.
2008 Mar 09 11:10 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |