Dear Friends
i will show you how to use to open Document from ALV Interactive Report
We have 2 way To open Purchase Requisition
Note :here Ebeln is Purchase Requisition Number
1. Using Dialog Code Parameter ID
set parameter id 'BES' field wa_ekko_temp-ebeln.
call transaction 'ME23N' and skip first screen.
2. Using Function Module
call function 'ME_DISPLAY_PURCHASE_DOCUMENT'
exporting
i_ebeln = ebeln
* i_ebelp = it_final-ebelp
exceptions
not_found = 1
no_authority = 2
invalid_call = 3
preview_not_possible = 4
.
Please Use One of this Code
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_user_command = 'GETDAILY'
it_fieldcat = fieldtab[]
tables
t_outtab = it_final.
.
form getdaily using ucomm like sy-ucomm selfield type slis_selfield.
read table it_final index selfield-tabindex.
case selfield-fieldname.
when 'EBELN' .
set parameter id 'BES' field wa_ekko_temp-ebeln.
call transaction 'ME23N' and skip first screen.
or
call function 'ME_DISPLAY_PURCHASE_DOCUMENT'
exporting
i_ebeln = ebeln
* i_ebelp = it_final-ebelp
exceptions
not_found = 1
no_authority = 2
invalid_call = 3
preview_not_possible = 4
.
endcase.
endform.