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

Header Data of the ALV

Hi,

Is it possible for the values of header of the ALV to have an output like below:

Plant: mseg-werks From: sy-datum

To: Sy-datum + 10.

Resource: mseg-matnr

The Plant and From on the same row... Thanks a lot!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Apr 12, 2008 at 12:46 PM

    Hi Mark,

    If u r talking about the column headings then it is possible provided this will not change dynamically(i.e one heading for one execution). All u need to do is after building the fieldcatelog

    modify it for the corrosponding column with the required text.

    In fieldcatelog there are fields seltext_s,seltext_m,seltext_l,reptext_ddic. Concatenate ur texts,plant value and date into these fields and modify the field catelog before calling REUSE_ALV FMs.

    READ i_fieldcat INTO wa_fieldcat WITH KEY fieldname = 'ur fieldname'.

    eg: CONCATENATE 'Plant:' mseg-werks 'From:' sy-datum

    INTO wa_fieldcat-reptext_ddic.

    MODIFY i_fieldcat FROm wa_fieldcat.

    Another possible solution would be display this data in top of page event by calling REUSE_ALV_COMMENTARY_WRITE fm.

    Thanks,

    Vinod.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      just add as many spaces as you can before FROM and after first single quotes like this

      concatenate g_werks ' ' FROM ' into wa_header-info

      i think there is limit of 60 characters only.

      Thank you...

      Edited by: Abap-fresher on Apr 12, 2008 3:20 PM

  • Posted on Apr 12, 2008 at 12:42 PM

    This should be possible, however I'm not quite sure how much characters are available for header text.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 12, 2008 at 01:03 PM

    hi

    *I think Two headings in single line is not possible .*but u want to display like this then u can do like

    define :

    g_werks = mseg-werks.

    wa_header-typ = 'H'.

    wa_header-key = 'Plant: '.

    concatenate g_werks 'FRO ' into wa_header-info.

    *again concatenate date to that

    concatenate sy-datum+6(2) '.'

    sy-datum+4(2) '.'

    sy-datum(4) into wa_header-info.

    append wa_header to t_header.

    clear: wa_header.

    I hope u got my logic:)

    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.