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

ALV List Viewer - HEADER

Dear all,

My requirement is to group three columns under a common header. Pls send in some sample code demonstrating how to do it.

my requirement is:

-


..........................................|..........Transfers........|.........Recipts.................|

Material No.|....Description...|----


|

.........................................|..Quantity..|..Amount..|...Quantity...|...Amount... |

-


.................|........................|...............|..............|....................|..................|

.................|........................|...............|..............|....................|..................|

.................|........................|...............|..............|....................|...................|

The fields material no., description, t_quantity, t_amount, r_quantity and r_amount are in a internal table. This is the output format i need to print.

I am ready to use either LIST o/p or GRID o/p.

Any help will be appreciated.

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 03:44 AM

    hi col heading breaking is not possible for alv but you can do it in top-of-page .

    i dont know whether it will solve your problem or not.....

    data : ievents type slis_t_event,

    wevent type slis_alv_event.

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    I_LIST_TYPE = 0

    IMPORTING

    ET_EVENTS = ievents

    EXCEPTIONS

    LIST_TYPE_WRONG = 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.

    ilayout-no_colhead = 'X'.

    read table ievents into wevent with key name = 'TOP_OF_PAGE'.

    if sy-subrc eq 0.

    wevent-form = 'TOP_OF_PAGE'.

    modify ievents from wevent index sy-tabix.

    endif.

    perform show.

    form TOP_OF_PAGE.

    write : / sy-vline no-gap,(10) 'Production' no-gap,sy-vline no-gap,

    (18) 'Material No' no-gap,sy-vline..

    write : / sy-vline no-gap,(10) 'Order No.' no-gap,sy-vline,(17) ' ' no-gap,sy-vline.

    write : /(31) sy-uline.

    endform.

    form show.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER =

    • I_BUFFER_ACTIVE = sy-repid

    I_CALLBACK_PROGRAM = prepid

    • I_CALLBACK_PF_STATUS_SET = ' '

    • I_CALLBACK_USER_COMMAND = ' '

    • I_STRUCTURE_NAME =

    IS_LAYOUT = ilayout

    IT_FIELDCAT = ifieldcat

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    • IT_SORT =

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    • I_SAVE = 'A'

    • IS_VARIANT =

    IT_EVENTS = ievents[]

    • IT_EVENT_EXIT =

    IS_PRINT = iprint

    • IS_REPREP_ID =

    • I_SCREEN_START_COLUMN = 0

    • I_SCREEN_START_LINE = 0

    • I_SCREEN_END_COLUMN = 0

    • I_SCREEN_END_LINE = 0

    • IMPORTING

    • E_EXIT_CAUSED_BY_CALLER =

    • ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = itab

    • 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.

    here full coding is not there....

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 12:42 AM

    Hi,

    I believe this is not possible in ALV to have multiple lines in the header..

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 04:32 AM

    Hi ,

    In TOP-OF-PAGE event display your header data using WRITE statements,

    then call REUSE_ALV_LIST_DISPLAY , to display the actual data.

    Regards,

    Raghavendra

    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.