12-20-2006 6:54 AM
Hi,
I have created a Table control with push buttons modify and insert. The records displayed in the table control is from different tables. For example from mara, mard,makt. I have declared a internal table say itab for the fields from these tables.
Now suggest me how to write code in modify pushbutton as well as insert push button, so that the updation will be reflected in these tables.
Thanx in advance.
Arun.
01-24-2007 1:40 PM
Hello,
Since u r modify the material u can use tha BAPI_MATERIAL_SAVEDATA.
Write it in the PAI event of the screen
12-20-2006 6:57 AM
hi,
for examples on table control
demo_dynpro_tabcont_loop
demo_dynpro_tabcont_loop_at
RSDEMO_TABLE_CONTROL
Rgds
Anver
12-20-2006 7:16 AM
Hi anversha,
I have already checked those programs, but i couldn't find the solution.
Since three tables r involved in that table control, i am little bit confused.
I need to write code for that modify push button.
Arun.
12-20-2006 7:29 AM
Hi ,
Try like this .
READ TABLE ITAB INDEX TC1-CURRENT_LINE .
Now u will get the values in the ITAB of that corresponding row .
Now u can able to modify or insert the tables as ur wish .
Hope it is helpful for u .
Regards ,
Senthil
12-20-2006 8:25 AM
PAI
case sy-ucomm.
when 'insert'.
move-corresponding it_dest to itab_mara.
move-corresponding it_dest to itab_mard.
move-corresponding it_dest to itab_makt.
insert into mara values itab_mara.
insert into mara values itab_mard.
insert into mara values itab_makt.
endcase.
Hope it helps.
Cheers.
01-24-2007 1:40 PM
Hello,
Since u r modify the material u can use tha BAPI_MATERIAL_SAVEDATA.
Write it in the PAI event of the screen