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

Using AT LINE-SELECTION in an ALV

I am trying to add functionality to an existing program that is currently displaying the information using ALV with a CALL to FUNCTION 'REUSE_ALV_GRID_DISPLAY'. I wanted to simply use the HIDE and AT LINE-SELECTION to drill down on the detail for the particular owner. However, this does not work. Is there a specific parameter I need to pass?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jan 08, 2004 at 12:26 PM

    Hi

    You should define a form with the following interface:

    FORM user_command USING r_ucomm LIKE sy-ucomm

    rs_selfield TYPE slis_selfield.

    ENDFORM.

    Then pass the form-name to the parameter: I_CALLBACK_USER_COMMAND.

    NOTE!! Remember to pass your calling program name in the parameter: I_CALLBACK_PROGRAM, and do not use the sy-repid directly but use an variable!!

    Jakob Steen-Petersen

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2004 at 06:45 PM

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = G_REPID

    IT_FIELDCAT = GT_FIELDCATALOG

    I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'

    I_CALLBACK_HTML_END_OF_LIST = G_HTML_END_OF_LIST

    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

    I_GRID_SETTINGS = GS_SETTINGS

    IS_LAYOUT = GS_LAYOUT

    I_SAVE = G_SAVE

    IS_VARIANT = GS_VARIANT

    IT_EVENTS = GT_EVENTS[]

    * I_SCREEN_START_COLUMN = 0 "Use coordinates for

    * I_SCREEN_START_LINE = 0 "display as dialog box

    * I_SCREEN_END_COLUMN = 0

    * I_SCREEN_END_LINE = 0

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER = G_EXIT_CAUSED_BY_CALLER

    ES_EXIT_CAUSED_BY_USER = GS_EXIT_CAUSED_BY_USER

    TABLES

    T_OUTTAB = I_REP

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2.

    FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM

    RS_SELFIELD TYPE SLIS_SELFIELD.

    CASE R_UCOMM.

    WHEN '&IC1'.

    CASE RS_SELFIELD-FIELDNAME.

    WHEN 'XXXXX'.

    READ TABLE I_xxx INTO V_xxx

    WITH KEY XXX = RS_SELFIELD-VALUE.

    IF SY-SUBRC = 0.

    ENDIF.

    WHEN OTHERS

    ENDCASE.

    ENDCASE.

    ENDFORM.

    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.