Skip to Content
avatar image
Former Member

Adding rows in ALV

Hi All.

I wanted to add 3 rows in an ALV .ie after each material group I wanted to display the line items total and 2 more additional rows.How can I do it.

This is a dynamic table.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Apr 01, 2006 at 12:45 PM

    Hi ,

    A warm welcome to SDN.

    Tell me which methodology u r using. Is it Object Oriented technology or using REUSE_ALV_GRID_DISPLAY. I have worked with ALV using Object Oriented method.

    The class used is CL_GUI_ALV_GRID.

    You can dynamically add rows in ALV by appending the extra rows in field catalog and then calling the method of the class refresh_table_display.

    Regards,

    Sylendra.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 02, 2006 at 01:40 AM

    a a,

    As you are saying that its a dynamic internal table, I am sure you also will have work area for this internal table.

    So, you can insert the work area into the internal table.

    INSERT workarea INTO itab INDEX 3.

    However, when you are trying to insert blank lines and display the same on the output, the display might create a problem, if the user tries to use the SORT / Total functions of the ALV Grid.

    Once the internal table is updated, you can use the method REFRESH_TABLE_DISPLAY to refresh the screen data.

    If you can explain the requirement in more detail, I am sure, we will be able to help you.

    Regards,

    Ravi

    Note : Please mark the helpful answers.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 02, 2006 at 06:05 PM

    Hi a a,

    I think you have to use Hirarchical sequential ALV. Here you can display the list with subtotals, and you can select fields to display at level break. here you will have to prepare two tables, one header table and one item table. and link the two tables using proper keys.

    Go through the FM documentation for the function module REUSE_ALV_HIERSEQ_LIST_DISPLAY

    Thanks

    Deepak

    • Reward useful answers. 😊

    Add comment
    10|10000 characters needed characters exceeded