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

Hierarchical ALV doubt

i want to print header details and item details, suppose there are some 100 item details for a particular header data, but i dont want to display all 100 item details, just want to display 5 item detials, how can i do this ? can any one help me in this...

Points for sure

thanks and regards

Vijaya

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2008 at 07:19 AM

    Hi vijaya,

    pass the complete table(Header 100 rec) to FM

    REUSE_ALV_BLOCK_LIST_HS_APPEND.

    loop at 2nd table where sy-tabix le 5.

    move-corresponding 2nd table to 3rd table.

    append 3rd table.

    endloop.

    Pass second item table i.e 3rd table to same FM

    REUSE_ALV_BLOCK_LIST_HS_APPEND.

    Try this, i think it works.

    Dont forget to reward points if found useful.

    Thanks,

    Satyesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 28, 2008 at 07:46 AM

    You can also try using Function Module REUSE_ALV_HIERSEQ_LIST_DISPLAY.

    You have to pass the header table and item table.

    To get 5 items only pertaining to a header, you will have to write code: (sample only, may change depending on your needs)

    Loop at Item from 1 to 5.

    move-corresponding item to item1.

    append item1.

    endloop.

    now pass Item1 as Item table in the function module.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2008 at 08:58 AM

    Hi,

    Create the internal table of data dictionary table.

    Retrieve only 5 records data into the above internal table based on your criteria.

    Pass this internal table as item table structure to the parameter value.

    Regards,

    Chandu

    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.