2012 Dec 23 11:17 AM
Hi Expert,
I have developed a Alv report by using function module REUSE_ALV_GRID_DISPLAY in my output i am getting following field i.e
MATERIAL NUMBER MATERIAL TYPE PLANT STORAGE LOCATION.................
my requirement is if user double clik on MATERIAL NUMBER.it should go to transaction code MM03.
can anyone suggest me how to proceed this.
Regards,
Addu
Moderator message : Not enough re-search before posting, discussion locked.
Message was edited by: Vinod Kumar
2012 Dec 23 11:24 AM
Hi,
Follow this 2 steps
1) at first in , function module do like this
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
it_fieldcat = i_fcat
TABLES
t_outtab = it_final "final table name.
then at last of your report 2) write a subroutine,
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
READ TABLE IT_FINAL INTO WA_FINAL
INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SET PARAMETER ID 'MAT' FIELD WA_FINAL-MATNR. "mat is the parametr id for matnr
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ENDIF.
ENDFORM.
Hope it will solve your problem.
Thanks
Gourav.
2012 Dec 23 11:24 AM
Hi,
Follow this 2 steps
1) at first in , function module do like this
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
it_fieldcat = i_fcat
TABLES
t_outtab = it_final "final table name.
then at last of your report 2) write a subroutine,
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
READ TABLE IT_FINAL INTO WA_FINAL
INDEX RS_SELFIELD-TABINDEX.
IF SY-SUBRC = 0.
SET PARAMETER ID 'MAT' FIELD WA_FINAL-MATNR. "mat is the parametr id for matnr
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ENDIF.
ENDFORM.
Hope it will solve your problem.
Thanks
Gourav.
2012 Dec 23 1:02 PM
Hi Gurav,
I have little bit confusion in the second step parameter id means same 'MAT' i have to write or
wa_final-matnr i have to write.
Regards,
Addu
2012 Dec 23 1:06 PM
Hi,
Just copy paste my code,
instead of it_final or wa_final write your final internal table name & in field catalog also changes accordingly.
It will works.
After got solution,close this thread & mark it as answered.
Thanks.
Gourav.
2012 Dec 23 8:11 PM
Hi md addu,
here 'MAT' IS PARAMETER ID which you find in data dictionary(SE11) or you can TPARA table. hope your prob will solve. if its useful then give point.
Thanks
Sabyasachi
Message was edited by: Sabyasachi Karforma