10-09-2008 8:15 AM
Hi ABAP gurus,
Based on the project id entered by the user,I am displaying the records in the table control from database table.
Now the user can add the new entries in the table control and they can delete the existing entries in the table control.
These changes should immediately reflect in the table control.
But it should affect the database table when the user clicks save button .
I have done the coding for deletion and save.
For insertion I am not getting the expected output.
Could u pls help me?
10-09-2008 8:18 AM
Hi,
In the PAI module are you modifying/inserting records properly.
Thanks & Regards,
Navneeth K.
10-09-2008 8:42 AM
Hi,
on Insert click if you are appending blank row to your internal table then in PBO event you need to set toal rows of yout table control is equal to total no. of rows of your internal table.
You can use statement describe table with addition lines to get total no. of rows of internal table.
Regards,
Vishal Jadhav.
10-09-2008 8:36 AM
10-09-2008 8:41 AM
I need to insert the record into table control.Pls provide the code if possible
10-09-2008 8:48 AM
I used these things in PBO.
The problem is,when I press the INSERT key,the newly added record is not appended to the internal table.
10-09-2008 8:54 AM
Show your program code regarding the INSERT you mentioned. Maybe we can see what you did wrong or forgot to do.
10-09-2008 8:59 AM
WHEN 'INSR'.
To Insert in the internal table
DATA: ls TYPE ly.
IF gt[] IS INITIAL.
INSERT ls INTO lt INDEX 1.
ENDIF.
LOOP AT gt INTO ls.
CLEAR ls.
INSERT ls INTO lt INDEX sy-tabix.
CLEAR ls.
MODIFY gt FROM ls.
CLEAR: ls.
EXIT.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM gt.
10-09-2008 9:15 AM
10-09-2008 10:30 AM
In table control, in PAI you modify the table content inside your LOOP WITH CONTROL statement give another button in your menu to save the table. when user press save you use modify database table to update the database table.
Regards,
Jey
10-22-2010 5:47 AM