2009 Jan 28 5:54 AM
Hi,
I am displaying the list of materials.if the user clicks on the particular material. The material number shd copy in MM03 Tcode intial screen and the user can see full details of the material.
<<removed_by_moderator>>
Regards,
Rasheed.
Edited by: Vijay Babu Dudla on Jan 28, 2009 1:03 AM
2009 Jan 28 6:45 AM
Hi,
You can try this code,
Here wa_tab-matnr is the field you are displaying and w_cursor is a variable of type matnr.
AT LINE-SELECTION.
GET CURSOR FIELD wa_tab-matnr VALUE w_cursor.
SET PARAMETER ID 'MAT' FIELD w_cursor.
CALL TRANSACTION 'MM03'.
Note that if you want to use skip first screen you have to choose views,
and if you want to make that also use a simple bdc.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Jan 28, 2009 7:46 AM
2009 Jan 28 5:58 AM
Use this.
SET PARAMETER ID 'MAT' FIELD itab-matnr .
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN .
2009 Jan 28 6:00 AM
Hi,
If u are using alv to display the materials, then the below piece of code will help u.
In FM, use user command.
**Calling the function module for ALV Grid
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
is_layout = it_layout
i_callback_user_command = 'USERCOMMAND'
it_fieldcat = it_fieldcat[]
i_save = 'A'
is_variant = v_variant
tables
t_outtab = it_final
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.
In form usercommand,
**For navigating the screen.
form usercommand using ucomm type sy-ucomm
selfield type slis_selfield.
case ucomm.
when '&IC1'.
if selfield-fieldname = 'MATNR'.
set parameter id 'MAT' field selfield-value.
call transaction 'MM03' and skip first screen.
endif.
endcase.
endform.
Hope this helps u.
Thanks.
2009 Jan 28 6:01 AM
2009 Jan 28 6:45 AM
Hi,
You can try this code,
Here wa_tab-matnr is the field you are displaying and w_cursor is a variable of type matnr.
AT LINE-SELECTION.
GET CURSOR FIELD wa_tab-matnr VALUE w_cursor.
SET PARAMETER ID 'MAT' FIELD w_cursor.
CALL TRANSACTION 'MM03'.
Note that if you want to use skip first screen you have to choose views,
and if you want to make that also use a simple bdc.
Regards,
Manoj Kumar P
Edited by: Manoj Kumar on Jan 28, 2009 7:46 AM
2009 Jan 28 7:08 AM
Hi Manoj,
Can I use the same code for MM01 also.
If i am doing that its not working.
Regards
2009 Jan 28 1:21 PM
Hi,
Yes you can, but make sure that the material number does not exist already.
Regards,
Manoj Kumar P
2009 Jan 30 10:35 AM
Hi
We cant have same code for MM01 also.
we shd write small BDC to input the desired matnr in MM01.
Any have my problem was sloved thanks for all for the inputs
Regards