Application Development 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: 

Hi All How 2 add empty record to table control

Former Member
0 Kudos

Hi All,

If my table control has 10 records , and I want to add an empty record when i click a push button for that what is the procedure to do it. please send me the source code for that its Urgent.

Thanks&Regards.

Bharat Kumar .

1 ACCEPTED SOLUTION

varma_narayana
Active Contributor
0 Kudos

Hi..

In the PBO Module which is called before the LOOP on Table control .

Give the code like this..

DESCRIBE TABLE ITAB.

if OK_CODE = 'ADD'.

TABCON-LINES = SY-TFILL + 1.

ELSE.

TABCON-LINES = SY-TFILL .

ENDIF.

This will give the Additional line always when you click the ADD(some) button.

<b>Reward if Helpful</b>

3 REPLIES 3

0 Kudos

Hi,

In the PAI module that you call on this push button, just append a empty record to the itab as follows.

APPEND INITIAL LINE TO itab.

Then this emplty line will be shown to the user as PBO will pck up the updated itab.

Regards,

Sesh

0 Kudos

its not workingwith the statement which u have given :

Append lines

varma_narayana
Active Contributor
0 Kudos

Hi..

In the PBO Module which is called before the LOOP on Table control .

Give the code like this..

DESCRIBE TABLE ITAB.

if OK_CODE = 'ADD'.

TABCON-LINES = SY-TFILL + 1.

ELSE.

TABCON-LINES = SY-TFILL .

ENDIF.

This will give the Additional line always when you click the ADD(some) button.

<b>Reward if Helpful</b>