04-23-2007 9:04 AM
Hi gurus,
Im displaying set of records using tablecontrol. In that, if the user selects single record and click on display button it should be displayed in Subscreen.
How should i get the specific selected record details. Can anyone help me regarding this?
I set the table control attribute Line_sel as Single and also given the name for that column as <b>sel_rec</b> in the attribute w/selColumn.
04-23-2007 9:06 AM
WHEN 'DISPLAY'.
LOOP AT itab WHERE sel_rec = 'X'.
MOVE: itab-field1 to subsc-field1,
...
..
ENDLOOP.
If you have line selection set to one, you could also use READ TABLE itab WITH KEY sel_rec = 'X'.
Hope this helps.
Sudha
Message was edited by:
Sudha Mohan
04-23-2007 9:10 AM
In this case, Should i delcare the SEL_REC filed in internal table structure?
04-23-2007 9:16 AM
Yes, you need to declare the same in the internal table structure.
Sudha