Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use at-line selection in ALV

Former Member
0 Kudos

Can someone help me about how to use at-line selection in an ALV

2 REPLIES 2

Former Member
0 Kudos
u can try in user_command 

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.

ferry_lianto
Active Contributor
0 Kudos

Hi Vinod,

We can not use at-line selection in ALV.

Please take a look at the example in the link below

http://www.sap-img.com/abap/an-interactive-alv-report.htm

Check the subroutine USER_COMMAND you will get an idea on how to achieve interactive reporting in ALV.

Regards,

Ferry Lianto