Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Adding an extra line in the table control

Former Member
0 Likes
321

Hi All,

How can we add an extra record in the table control after the user hits ADD button?We tried doing it by incrementing the lines field in the table control,but it is executing the PBO part again after hitting the ADD button.Any SAP standard program will be helpful.

Thanks,

Rakesh.

2 REPLIES 2
Read only

Former Member
0 Likes
299

Hi,

I think you can do that by inerting new line to Internal table that used in your Table Control. Here the sample:



 TC_DATA = Your Table Control
 IT_DATA = Your Internal Table used for Table Control.

In your MODULE USER_COMMAND INPUT, add this code:
IF OK_CODE = 'ADD'.
  CLEAR: IT_DATA.
  APPEND IT_DATA.
ENDIF.

Regards,

Read only

Former Member
0 Likes
299

Hi

check this program

BCALV_TEST_GRID_EDITABLE

when u execute the program, there is an alv which displays a set of records.

where we have a option to add new row to the alv.check it.

Hope this helps you.

Regards,

Prasanth

  • Reward all helpful replies