‎2008 May 05 5:25 AM
hi experts,
i need to have a table control in my screen, & i need to allow user to enter values into it. after entering values, i need to insert them into db table.
hope the question is clear.
plz some one help me to slove this.
thanks in advance.
‎2008 May 05 5:27 AM
‎2008 May 05 5:27 AM
‎2008 May 05 5:29 AM
HI
The question is pretty clear , but are you looking for a complete code here?
‎2008 May 05 5:31 AM
Hi Mytri,
Please refer to the following sample programes in se38.
These has got all the concepts, refer to the program which suits ur requirement..
DEMO_DYNPRO_TABCONT_LOOP
DEMO_DYNPRO_TABCONT_LOOP_AT
DEMO_DYNPRO_TABLE_CONTROL_1
DEMO_DYNPRO_TABLE_CONTROL_2
For any further help revert back to me.
Regards,
Nishant
‎2008 May 05 10:58 AM
You want user can change the data onto the Table control and want to save it into the database.
After display the table control as output,Change the data and when save it,The PAI event is triggered.
Modify the internal table and then modify the database table.
LOOP AT itab.
MODULE MODIFY.
ENDLOOP.
And in module modify,
MODIFY itab INDEX tablecontrol-CURRENT_LINE.
IF SY-SUBRC <> 0.
APPEND itab.
ENDIF.
data : wa_itab like itab.
case ok_code.
WHEN 'SAVE'.
SELECT SINGLE *
FROM DB
INTO WA_itab
WHERE..................... .
WA_itab_(Field_name) = itab-(Field_name)
MODIFY DB FROM WA_itab.
‎2008 May 08 3:54 AM