Skip to Content
author's profile photo Former Member
Former Member

How to insert blank lines in the ALV output.

Hi Friends,

Could any body help me out How to insert blank lines in the ALV output.?? Any Code pls...

Thank you,

Vikram.C

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 04:48 AM

    append blank record to internal table you are passing to ALV function module

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 04:48 AM

    hi vikram

    do like this

    In the fieldcatalog table all the fields should be in editable mode

    ie lw_fcat-edit = 'X'.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = sy-repid

    i_callback_pf_status_set = 'SET_PF_STATUS'

    i_callback_user_command = 'USER_COMMAND'

    is_layout = lv_layout

    it_fieldcat = lt_fcat[]

    i_save = 'A'

    is_variant = lv_variant

    TABLES

    t_outtab = lt_license[]

    EXCEPTIONS

    program_error = 1

    OTHERS = 2.

    IF sy-subrc 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    ENDFORM. " display_data

    &----


    *& Form user_command

    &----


    FORM user_command USING r_ucomm TYPE sy-ucomm

    rs_selfield TYPE slis_selfield.

    CASE r_ucomm.

    WHEN 'ADD'. "

    data: lv_ind type i.

    data: lv_line type i.

    describe table lt_license lines lv_line.

    loop at lt_license into lw_license.

    lv_ind = sy-tabix.

    if lv_ind = lv_line.

    append initial line to lt_license.

    endif.

    endloop.

    ENDCASE.

    ENDFORM. "user_command

    reward points if useful

    Rohan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 04:49 AM

    hi vikram,

    In the fieldcatalog table all the fields should be in editable mode

    ie lw_fcat-edit = 'X'.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = sy-repid

    i_callback_pf_status_set = 'SET_PF_STATUS'

    i_callback_user_command = 'USER_COMMAND'

    is_layout = lv_layout

    it_fieldcat = lt_fcat[]

    i_save = 'A'

    is_variant = lv_variant

    TABLES

    t_outtab = lt_license[]

    EXCEPTIONS

    program_error = 1

    OTHERS = 2.

    IF sy-subrc 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    ENDFORM. " display_data

    &----


    *& Form user_command

    &----


    FORM user_command USING r_ucomm TYPE sy-ucomm

    rs_selfield TYPE slis_selfield.

    CASE r_ucomm.

    WHEN 'ADD'. "

    data: lv_ind type i.

    data: lv_line type i.

    describe table lt_license lines lv_line.

    loop at lt_license into lw_license.

    lv_ind = sy-tabix.

    if lv_ind = lv_line.

    append initial line to lt_license.

    endif.

    endloop.

    ENDCASE.

    ENDFORM. "user_command

    reward if helpful

    rohan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2012 at 12:31 PM

    Hi,

    Use the below statement in the fieldcatalog.

    wa_fieldcat-no_zero = 'X'.

    This will insert the new line in the ALV.

    Thanks,

    Regards,

    Rahul Gupta.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.