‎2008 Mar 13 4:56 AM
Hi can any one give me a detailed example of table control with all those fuctionalities like "select all rows"
"deselect all rows", "add a new row","delete all rows"......
‎2008 Mar 13 5:09 AM
Hi
Ref below prg
demo_dynpro_tabcont_loop
demo_dynpro_tabcont_loop_at
demo_dynpro_step_loop
RSDEMO02.
RSDEMO_TABLE_CONTROL
‎2008 Mar 13 5:09 AM
Hi
Ref below prg
demo_dynpro_tabcont_loop
demo_dynpro_tabcont_loop_at
demo_dynpro_step_loop
RSDEMO02.
RSDEMO_TABLE_CONTROL
‎2008 Mar 13 9:26 AM
hi saravanan,
try this piece of code,it may help u.
* Add rows and delete ,select all , deselect all
* button actions in item table
IF TABSTRIP1-ACTIVETAB = 'LINE_ITEMS'.
FLAG = '0'.
CASE OK_CODE1.
* when add button is pressed we add a new line to the table control
WHEN 'ADD'.
LOOP AT LINEITEM.
IF LINEITEM-MARK = 'X'.
INSERT INITIAL LINE INTO LINEITEM.
FLAG = '1'.
ENDIF.
ENDLOOP.
IF FLAG <> '1'.
APPEND INITIAL LINE TO LINEITEM.
ENDIF.
CLEAR OK_CODE1.
* When delete button is clicked delete the line
WHEN 'DELETE'.
LOOP AT LINEITEM.
IF LINEITEM-MARK = 'X'.
MOVE-CORRESPONDING LINEITEM TO LINEITEM_DELETE.
APPEND LINEITEM_DELETE.
CLEAR LINEITEM_DELETE.
CLEAR LINEITEM.
DELETE LINEITEM.
ENDIF.
ENDLOOP.
CLEAR OK_CODE1.
* When select all button is clicked select all the lines which are
* editable .
WHEN 'SELECT_ALL'.
LOOP AT LINEITEM.
LINEITEM-MARK = 'X'.
MODIFY LINEITEM.
ENDLOOP.
CLEAR OK_CODE1.
* When deselect all button is clicked deselect all the lines which are
* editable .
WHEN 'DESELECT_ALL'.
LOOP AT LINEITEM.
LINEITEM-MARK = ' '.
MODIFY LINEITEM.
ENDLOOP.
CLEAR OK_CODE1.
ENDCASE.
ENDIF.Here LINEITEM and LINEITEM_DELETE are internal tables.
Revert back for any queries.
Regards,
Sravanthi.
‎2008 Mar 13 12:14 PM
hi,
refer this site
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
regards,
shylaja
‎2008 Mar 14 11:55 AM
Hi Sarvanan,
While creating the table control, you have the options to create it manually as well as With Wizard.
If you create it with Wizard, you just need to check the respective radio buttons for all the functionalities you want (containing select all, deselect all, delete, add new row).
Wizard writes the code it self for all these functions. So try it as it will save a lot of your effort.
Please revert for any clarification.
Regards,
Ashish