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

ALV header !! urgent

Hi guys,

I have a requirement in which i have to display the records fetched from PLAF table using an ALV program (this ALV program fetched records from PLAF table and show it as an ALV report.

I have given the TITLE of this program as 'Customised transaction to convert planned orders' (which is asked while creating a new program in SE38).

The requirement is such that when u go to SE11 and fetch some records from PLAF table u see a message:-

'DATA BROWSER: TABLE PLAF Select Entries 14'

this means that 14 entries were selected from PLAF table.

Similarly i have to display how many records were fetched from PLAF table and i have to display it in the title of the program. I dont have to use ALV GRID.

Can this be done ? if yes then please tell me how to do that.

Regards

Rahul

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2008 at 04:54 AM

    Hi

    This can be done. Once you get the records from PLAF hold the systme variables SY-DBCNT into a global variable.

    While passing the arguements to ALV FM, pass a sub-routine name for I_CALLBACK_TOP_OF_PAGE. Create a new sub-routine in your program in the same as what you passed before. There you use the FM REUSE_ALV_COMMENTARY_WRITE by passing the Sy-DBCNT variable data. This write the number of records selected from PLAF in you output.

    Let me know if you need more info.

    ~ Ranganath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2008 at 05:12 AM

    Hi Rahul,

    I will send a sample code for how to place HEADER

    in ALV check it once ok.Instead of GRID DISPLAY use LIST DISPLAY ok.

    Code:

    DATA: gt_header TYPE slis_t_listheader, "For Headings

    wa_header TYPE slis_listheader.

    perform place_events.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER =

    • I_BUFFER_ACTIVE = ' '

    i_callback_program = sy-cprog

    • I_CALLBACK_PF_STATUS_SET = ' '

    i_callback_user_command = 'USERCOMMAND'

    • I_STRUCTURE_NAME =

    is_layout = wa_layout

    it_fieldcat = gt_fieldcat

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    • IT_SORT =

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    • I_SAVE = ' '

    • IS_VARIANT =

    it_events = gt_events

    • IT_EVENT_EXIT =

    • IS_PRINT =

    • 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 = gt_headerdat

    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. " display_list

    &----


    *& Form place_events

    &----


    • text

    ----


    • --> p1 text

    • <-- p2 text

    ----


    FORM place_events .

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    i_list_type = 0

    IMPORTING

    et_events = gt_events

    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 gt_events INTO wa_events WITH KEY name = 'TOP_OF_PAGE'.

    IF sy-subrc = 0.

    wa_events-form = 'HEADING'.

    MODIFY gt_events FROM wa_events INDEX sy-tabix.

    ENDIF.

    FORM heading.

    WRITE:/6 'THIS REPORT DISPLAYS THE PURCHASE ORDER DETAILS'.

    WRITE:/6 'CLICK ON PURCHASE DOC NO FIELD(INTERACTIVE LIST)'.

    ENDFORM. "heading

    Award points if helpful.

    Kiran Kumar.G.A

    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.