12-14-2006 12:39 PM
I have created a ALV with materials. I want that when i click on the material appear MM03 about it.
I have this sentence on the click. But always is showing me the same material. Someone knows why? I forget to refresh something?
Thanks a lot!
&----
*& Form USER_COMMAND
&----
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE
SLIS_SELFIELD.
case UCOMM.
when '&IC1'. "this is for double click.
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
ENDCASE.
ENDFORM. "USER_COMMAND
12-14-2006 12:44 PM
Try this:
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE
SLIS_SELFIELD.
case UCOMM.
when '&IC1'. "this is for double click.
READ TABLE ITAB INDEX selfield-tabindex.
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
ENDCASE.
ENDFORM. "USER_COMMAND
12-14-2006 12:43 PM
Hi Mpm,
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
Here you are assing the material numebr of the table itab... but you are not reading this table when ever the user double clicks.
you have to read this internal table to get the material number. When ever the user double clicks then this itab-matnr will not get populated with the correct material number.
Write the read statement before assing the itab-matnr to parameter id.
<b>read table itab index slis_selfield-tabindex.</b>
Regards,
Satya.
null
12-14-2006 12:44 PM
Try this:
FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE
SLIS_SELFIELD.
case UCOMM.
when '&IC1'. "this is for double click.
READ TABLE ITAB INDEX selfield-tabindex.
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
ENDCASE.
ENDFORM. "USER_COMMAND
12-14-2006 12:45 PM
hi,
you are selecting the material in the header of itab and not the material that you are clicking on...
give
read table itab into itab index rs-tabindex .
before you use
SET PARAMETER ID 'MAT' FIELD ITAB-MATNR.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
regards
Abdullah