Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Re: Interactive alv report

Former Member
0 Likes
727

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

1 ACCEPTED SOLUTION
Read only

gouravkumar64
Active Contributor
0 Likes
691

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.

4 REPLIES 4
Read only

gouravkumar64
Active Contributor
0 Likes
692

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.

Read only

0 Likes
691

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

Read only

0 Likes
691

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.

Read only

Former Member
0 Likes
691

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