Skip to Content
avatar image
Former Member

Execute report when you click on a line of another report

Hi,

I want to execute one report when user clicks on a particular field of an already executed report.the data of the corresponding row should be taken as the input to execute the new report.how to achieve this in ALV?pls give sample code.

usefull suggestions surely rewarded.

Regards,

FAROOK

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 22, 2007 at 11:27 AM

    Do a search on this forum for

    ALV Line Selection and SUBMIT report

    That is what I would of tried.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 11:31 AM

    hi,

    try this one.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_bypassing_buffer = 'X'

    i_callback_program = sy-repid

    is_layout = wa_layout

    it_fieldcat = it_fieldcat[]

    i_save = 'X'

    <b>i_callback_user_command = 'MY_USER_COMMAND'</b>

    • IT_EVENTS = 'X'

    • I_CALLBACK_PF_STATUS_SET = 'PFSTATUS'

    TABLES

    t_outtab = itab

    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.

    FORM my_user_command USING r_ucomm LIKE sy-ucomm

    rs_selfield TYPE slis_selfield.

    DATA: rspar_tab TYPE TABLE OF rsparams,

    rspar_line LIKE LINE OF rspar_tab.

    DATA: indx TYPE i.

    CASE r_ucomm.

    WHEN '&IC1'. " DOUBLE CLICK

    CALL TRANSACTION ''<tcode>' AND submit.

    endcase.

    endform.

    <b><i>regards

    Debjani

    reward point for helpful answers</i></b>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 11:34 AM

    Hi,

    Use Submit to execute the other report from the actual report. U need to write a subroutine and pass the subroutine to the ALV FM as below :

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER = ' '

    • I_BUFFER_ACTIVE = ' '

    i_callback_program = gv_repid

    • I_CALLBACK_PF_STATUS_SET = gv_status

    i_callback_user_command = 'F_USER_COMMAND'

    Create subroutine as F_USER_COMMAND. In this subroutine you need to write Submit statement as below with necessary parameters.

    SUBMIT Program name

    WITH selection screen parameter = values.

    AND RETURN.

    Thanks,

    Sriram Ponna.

    Add comment
    10|10000 characters needed characters exceeded