Skip to Content
avatar image
Former Member

Hi All How to add an empty record into an table control in mpp

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 .

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Aug 21, 2007 at 10:39 AM

    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

    Add comment
    10|10000 characters needed characters exceeded