‎2008 Dec 17 9:35 AM
Hello Friends,
in my dialog prog i have one change button which will fetch the data from database table and will put it in table control in screen.
In the table control i want the provisison of adding more data but except first row all the other rows are in grey mode kindly guide me how to make the rows editable so the user can add more rows of data.
Regards,
Sunny
‎2008 Dec 17 9:43 AM
Hi Sunny ,
Incase u have made the table control with wizard then do the following :
when you go through the coding of table control which wizard has done u will find one OK_CODE
i.e. 'INSR;,specify the button with fcode 'INSR' & debug it I am sure u will get the solution to add one more line and in this way u can ask user to add number of lines as per the reuirement .
Thnks
Sahil
‎2008 Dec 17 9:49 AM
In the PBO module, inside the table control loop.. endloop write a module and in that module, write the below piece of code
DESCRIBE TABLE <internal_table_name> LINES tablecontrolname-lines.
tablecontrolname-lines = tablecontrolname-lines + 1. " here, 1 blank line will be added after the display of all the records.
‎2008 Dec 17 9:58 AM
Hi Sunny,
If you are fetching the data from internal table say itab into the table control and you want that the number of blank lines should be created after the last record, then you can use this code:-
DATA : line_count TYPE i. "variable to store the number of records in internal table
In the PBO of the screen in which the data is being displayed in the table control, use code:-
DESCRIBE TABLE itab "itab is the internal table
LINES line_count. "number of records populated into the internal table
tab_ctrl-lines = line-count + 10. "will insert 10 blank line after the internal table records
"tab_ctrl is the name of the table control on the screen
Hope this solves your problem.
Thanks & Regards
Tarun Gambhir
‎2008 Dec 17 11:22 AM