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

Interactive alv

Hi,

In interactive alv ,if i want to get fieldname or column postion which i am clicking , based on this i want to display drill dowm alv .

plz help me.

with regards .

prince elvis

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 12:07 PM

    Hello,

    IN the usercommand routine do like this:

    FORM ALV_USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
    
      CASE R_UCOMM.
        WHEN '&IC1'.
    *--- Hotspot selektion
          CASE RS_SELFIELD-FIELDNAME.
            WHEN 'NOTE'.
              SELECT * FROM  Z48M_NOTE_LIST INTO TABLE IT_TC01.
              READ TABLE G_T_EKPO INDEX RS_SELFIELD-TABINDEX.
              SELECT SINGLE * FROM Z48M_LIEF_NOTE
                          WHERE EBELN = G_T_EKPO-EBELN
                            AND EBELP = G_T_EKPO-EBELP.
              IF SY-SUBRC = 0.
                LOOP AT IT_TC01.
                  IF IT_TC01-KRITER = 'QUALITÄT'.
                    IT_TC01-NOTE = Z48M_LIEF_NOTE-QUALI.
                  ENDIF.
                  IF IT_TC01-KRITER = 'KOSTEN'.
                    IT_TC01-NOTE = Z48M_LIEF_NOTE-KOSTE.
                  ENDIF.
                  IF IT_TC01-KRITER = 'LIEFERTERMIN'.
                    IT_TC01-NOTE = Z48M_LIEF_NOTE-LIEFE.
                  ENDIF.
                  IF IT_TC01-KRITER = 'FLEXIBILITÄT'.
                    IT_TC01-NOTE = Z48M_LIEF_NOTE-FLEXI.
                  ENDIF.
                  IF IT_TC01-KRITER = 'ZUSAMMENARBEIT'.
                    IT_TC01-NOTE = Z48M_LIEF_NOTE-ZUSAM.
                  ENDIF.
                  IF IT_TC01-KRITER = 'SCHWIERIGKEITSGRAD'.
                    IT_TC01-NOTE = Z48M_LIEF_NOTE-SCHWI.
                  ENDIF.
                  MODIFY IT_TC01.
                ENDLOOP.
    *            MESSAGE I999(Z48MM) WITH TEXT-004 G_T_EKPO-EBELN
    *                                              G_T_EKPO-EBELP.
                CALL SCREEN 0100 STARTING AT 20 05  ENDING AT 80 14.
                G_T_EKPO-NOTE = G_F_AVG.
                MODIFY G_T_EKPO INDEX RS_SELFIELD-TABINDEX.
                RS_SELFIELD-REFRESH = 'X'.
    
              ELSE.
                CALL SCREEN 0100 STARTING AT 20 05  ENDING AT 80 14.
                G_T_EKPO-NOTE = G_F_AVG.
                MODIFY G_T_EKPO INDEX RS_SELFIELD-TABINDEX.
                RS_SELFIELD-REFRESH = 'X'.
              ENDIF.
          ENDCASE.
      ENDCASE.
    ENDFORM. "USER_COMMAND_ALV
    
    
    

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 12:10 PM

    In this code RS_SELFIELD gives the field name

    &----


    *& Form USER_COMMAND

    &----


    • text

    ----


    • -->R_UCOMM text

    • -->RS_SELFIELD text

    ----


    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

    RS_SELFIELD TYPE SLIS_SELFIELD.

    CASE R_UCOMM.

    WHEN 'BACK' OR 'CANC' OR 'EXIT'.

    LEAVE TO SCREEN 0.

    WHEN '&IC1'.

    SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.

    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

    ENDCASE.

    ENDFORM. "USER_COMMAND

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 12:13 PM

    Hello,

    Check this:

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

    Regards,

    Beejal

    **Reward if this helps

    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.