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

Linking of hotspot in ALV to a program

Hi All...

How can i Navigate to a program from a field of ALV list,

on which Hotspot in selected??

it_t-col_pos = '2'.

it_t-fieldname = 'PROGNAME'.

*IT_T-ref_fieldname = 'P_CODE'.

*IT_T-ref_tabname = 'I_ALL'.

it_t-seltext_m = 'Program Name'.

it_t-hotspot = 'X'.

APPEND it_t.

CLEAR IT_T.

My aim is to naviagte to a program on whcih hotspot is selected..

Thanks in Advance..

Puneet Chopra

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Aug 11, 2008 at 11:48 AM

    with the help of user_command it is possible.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program       = sy-repid
        is_layout                = l_layout
        i_callback_user_command  = 'USER_COMMAND' "<--This is must
        it_fieldcat              = it_fieldcat
      TABLES
        t_outtab                 = itab
      EXCEPTIONS
        program_error            = 1
        OTHERS                   = 2.
    IF sy-subrc NE 0.
    
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    
    case r_ucomm.
    when '&IC1'.
    "using the set parameter and call the transaction
     or
    "using the record values and SUBMIT and go to another program
    SUBMIT SUBMITTABLE with parameter = rs_selfield-value
     and RETURN.
    
    endcase.
      rs_selfield-refresh = 'X'.
      BREAK-POINT.
    
    ENDFORM. "USER_COMMAND

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 11, 2008 at 11:36 AM

    Hi Puneet,

    use the user-command event and inside this user command

    do one thing.

    SET PARAMETER ID " PARAMETER ID".

    CALL TRANSACTION <TCODE> .

    This will resolve your problem

    Thanks,

    Chidanand

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 11:39 AM

    Hi ,

    FORM user_command1 USING v_ucomm

    rs_selfield .

    CASE v_ucomm.

    WHEN '&IC1'.

    CALL TRANSACTION 'ZIN01' AND SKIP FIRST SCREEN.

    or

    submit program <prog name>

    In the prog name pass the rs_selfield-value.

    ENDCASE.

    Edited by: A kumar on Aug 11, 2008 1:50 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 11:46 AM

    i have list of programs... and i want to navigate when ever i click on any program name.

    regards

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 11, 2008 at 11:47 AM

    Hello Puneet,

    If your are using the FM 'REUSE_ALV_GRID_DISPLAY', there is a parameter 'i_callback_user_command'. You pass the name of the sub-routine for user-command here.

    In the user comman routine (f_user_command) try this bit of code:

    FORM f_user_command  USING   fp_v_ucomm   TYPE syucomm
                                 fp_selfield  TYPE slis_selfield.
    
      CASE fp_v_ucomm.
        WHEN '&IC1'. "U-Comm for Double Click
          READ TABLE IT_ALV INDEX fp_selfield-tabindex. "IT_ALV - Table for ALV Display
          IF SY-SUBRC = 0.
            SET PARAMETER ID 'RID' FIELD IT_ALV-REPID. "Program Name
            CALL TRANSACTION 'SE38'.
          ENDIF.
      ENDCASE.
    ENDFORM.
    

    Hope it is clear to u.

    BR,

    Suhas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 12:13 PM

    Hi,

    First check the data element for the field you want to use hotspot. go to se11.

    enter the data element. Go with display, you will find Parameter Id, Use this parameter ID and follow the above posts for logic.

    Regards,

    Santosh Kumar M.

    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.