‎2007 Feb 19 10:49 AM
Hi,
I created a table control with 5 columns.I want to update the values in the Table control (that is I want to change the value of one column).Then i want to post the values to a BAPI.How to do this?
‎2007 Feb 19 10:54 AM
Hi,
You can change the screen attributes by looping at the screen elements.
Use LOOP AT SCREEN.
and based on the condition, change the attributes of the requireed elements and make them input enabled in the PBO of the screen.
ENDLOOP.
After PAI, when ever you do some operation, immediate update the internal table with the work area in between the loop and endlooop of the PAI.. so that the internal table behind table controle gets updated with the modiied values.
And later you can transfer the modified contents to the BAPI in your required format...
Hope this helps....
Regards,
Sankar.
‎2007 Feb 19 11:06 AM
Hi,
how do i capture the data(that is changed) from the screen to my Internal table?
‎2007 Feb 19 11:13 AM
Hi,
In the Table Control Internal table Loop in the PAI Event, Create a module and insert following code in it.
MODIFY T_ITAB FROM WA_ITAM INDEX TC_CNTL-CURRENT_LINE.
this will modify the value that the User has input in the Screen.
regards,
Mahesh
‎2007 Feb 19 11:15 AM
Hi Krish, if u see in the debugging,
when u enter new values into your table control in the PAI event btw
loop at table
module some_module.
put a break point in the module above n see you will have all the values u entered row by row in the work area using which u created this table control which u populate into ur internal table
endloop.
‎2007 Feb 19 11:15 AM
the content changed can be captured using the work area of the internal table..
In PAI.. in each and every iteration, each and every line can be updated with the curent loop's work area..
By using MODIFY T_ITAB FROM WA_ITAM INDEX TC_CNTL-CURRENT_LINE
you can modify the internal table with the content modified...
Regards,
Sankar.
‎2007 Feb 19 11:01 AM
in the PAI event.
as u have a
loop at table
*add here a module
module user_cmd_update.
endloop
module populate_bapi
*****************************************************
*in ur program
module user_cmd_update.
append the workarea to table.
endmodule.
module populate_bapi.
call function 'bapi'
endmodule.
santhosh