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

adding a field to field catalog

Hi,

i have a mandatory parameter in my selection screen, for eg: p_date.

how do i add that parameter to the output list, its a list_display alv. how do i do this....

pls help,

thanks,

capc

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 Jan 27, 2007 at 05:02 AM

    Hi,

    In the final internal table, have one more field for the date.

    loop at itab.

    itab-date = p_date.

    modify itab.

    endloop.

    Now generate the fieldcatalog and display the ALV.

    Regards

    Subramanian

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2007 at 05:05 AM

    Hi CAPC,

    In the output internal table ad one more field of type 'dats'.

    Now loop at the internal table and modify the date field to every record.

    And now display.

    Thank you.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2007 at 05:22 AM

    i cant understand whether you want to show it as a field in your list or as a top-of-page?

    if you want to display as field in the list then you have to add one field in your itab which you are passing to alv list.

    now after fetching all the data fill the date field in your itab.

    in fieldcatatlog append that.

    data : wfieldcat type slis_fieldcat_alv,

    ifieldcat type slis_t_fieldcat_alv.

    wfieldcat-fieldname = 'DATE' <which ever your itab date name>.

    wfieldcat-col_pos = 1. < which posn you want>.

    wfieldcat-outputlen = 10.

    wfieldcat-seltext_l = 'Date'.

    append wfieldcat to ifieldcat.

    now if you want that in top-of-page.

    do like this.

    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.

    READ TABLE IEVENTS INTO WEVENT WITH KEY NAME = 'TOP_OF_PAGE'.

    IF SY-SUBRC = 0.

    WEVENT-FORM = 'TOP_OF_PAGE'.

    APPEND WEVENT TO IEVENTS.

    MODIFY IEVENTS FROM WEVENT index sy-tabix.

    ENDIF.

    in reuse list display IT_EVENTS = ievents.

    FORM TOP_OF_PAGE.

    FORMAT COLOR 3.

    WRITE : / 'Date ', p_date.

    FORMAT COLOR OFF.

    or

    data : wlistheader type slis_listheader,

    ilistheader type slis_t_listheader,

    text(30).

    concatenate 'Date' p_date into text separated by space.

    wlistheader-info = text.

    wlistheader-typ = 'H'.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    IT_LIST_COMMENTARY = ilistheader

    • I_LOGO =

    • I_END_OF_LIST_GRID =

    .

    ENDFORM.

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

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

    answered my question

    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.