I have a requirement where I had a table control. The table control shows the data related to the purchase order we select from search help. ( an input field is created for purch order search help). The table control is working successfully in showing the details as per the purch order.
When we select a particular row(s) or record(s) from table control, it should show the selected records in some other screen.
my approach : I have created linesel variable in the table control properties. Is my approach is correct?
Iam not getting the idea of using this table control to pick the selected records.
please help me out.
thanks in advance and regards
declare the field for example 'SEL' in internal assigned to tha table control.
Then in the screen attributes give the field name say like 'WA_PO-SEL'. (with multiple or single line selection option).
Now when you select a row in table control this field gets marked as 'X', for this in PAI modify the itab from table control.
Later read internal table where SEL = 'X'.
You can also search in SCN, lots of threads are available regarding this .
link:[capture line selection of a SAP dynpro table control|http://www.sapdev.co.uk/dialog/tabcontrol/tc_mark.htm]
First delcare the Sel in your internal table which is used for creating table control,
and give that name sel name Line Selection Col.
Selection col. fld in this filed it will appear while creating a table control wizard and select the radio button like single selection or multiple selection.
when u select a sel in table control it becomes 'Xi
Eg: tb_table-Sel = 'X'.
it may help ful for u
Edited by: Suri551 on Dec 31, 2009 11:32 AM
You are going right you have create a sel column in table control
now in the PAI When you loop the table control Inside it
use a modify module which Check the if Sy-ucomm = 'PICK '
and if sel = 'X' you get the selected record go ahead and you will get .
Have Great year Ahead