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 to add an empty record into an table control in mpp

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

Former Member
0 Kudos

WHEN 'INSL'.

  • insert line above cursor position

GET CURSOR FIELD FLD LINE LINNO OFFSET OFF.

SET CURSOR FIELD FLD LINE LINNO OFFSET OFF.

IF FLD CP 'IT_SPFLI*' AND SY-SUBRC = 0.

IF LINNO >= 1.

LINNO = LINNO + TC_SPFLI-TOP_LINE - 1.

CLEAR IT_SPFLI.

INSERT IT_SPFLI INDEX LINNO.

TC_SPFLI-LINES = TC_SPFLI-LINES + 1.

ELSE.

CLEAR IT_SPFLI.

APPEND IT_SPFLI.

TC_SPFLI-LINES = TC_SPFLI-LINES + 1.

ENDIF.

ENDIF.

Use the above code as sample

Reemz

1 REPLY 1

Former Member
0 Kudos

WHEN 'INSL'.

  • insert line above cursor position

GET CURSOR FIELD FLD LINE LINNO OFFSET OFF.

SET CURSOR FIELD FLD LINE LINNO OFFSET OFF.

IF FLD CP 'IT_SPFLI*' AND SY-SUBRC = 0.

IF LINNO >= 1.

LINNO = LINNO + TC_SPFLI-TOP_LINE - 1.

CLEAR IT_SPFLI.

INSERT IT_SPFLI INDEX LINNO.

TC_SPFLI-LINES = TC_SPFLI-LINES + 1.

ELSE.

CLEAR IT_SPFLI.

APPEND IT_SPFLI.

TC_SPFLI-LINES = TC_SPFLI-LINES + 1.

ENDIF.

ENDIF.

Use the above code as sample

Reemz