11-27-2005 9:50 AM
hi!
I am using an ALV report.
when using the double click i need to go to transaction MM19.
When i am passing the parameters through the set parameter id and call transaction, only the matnr is being passed and the date field is not.
the code is:
set parameter id 'MAT' field xxxx
set parameter id 'STICH' field xxxx
CALL TRANSACTION 'MM19'.
what am i doing wrong?
regards
yifat
11-27-2005 10:13 AM
Hi,
The following code works, I found out from the program that the parameter id STICH is considered only under certain conditions..
REPORT zsritest.
PARAMETERS: p_matnr LIKE rmmg1-matnr OBLIGATORY,
p_dline LIKE rmmg1-dline DEFAULT sy-datum.
****The following two are required to tell the system
****to accept Date
SET PARAMETER ID 'MXX' FIELD 'BUS1001.DISPLAY'.
SET PARAMETER ID 'CALL_TRANS_MODE' FIELD 'ECM_MAT_SHOW'.
SET PARAMETER ID 'MAT' FIELD p_matnr.
SET PARAMETER ID 'STICH' FIELD p_dline.
CALL TRANSACTION 'MM19'.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
11-27-2005 10:04 AM
what is the data type of the parameter you have used for the variable used with
set parameter id 'STICH' field <b>xxxx</b>
is it type D?
Regards
Raja
11-27-2005 10:10 AM
11-27-2005 10:14 AM
i just checked and found that it dosent work. (type d, type with user format) investigating the cause for the problem. will get back.
Regards
Raja
11-27-2005 10:13 AM
Hi,
The following code works, I found out from the program that the parameter id STICH is considered only under certain conditions..
REPORT zsritest.
PARAMETERS: p_matnr LIKE rmmg1-matnr OBLIGATORY,
p_dline LIKE rmmg1-dline DEFAULT sy-datum.
****The following two are required to tell the system
****to accept Date
SET PARAMETER ID 'MXX' FIELD 'BUS1001.DISPLAY'.
SET PARAMETER ID 'CALL_TRANS_MODE' FIELD 'ECM_MAT_SHOW'.
SET PARAMETER ID 'MAT' FIELD p_matnr.
SET PARAMETER ID 'STICH' FIELD p_dline.
CALL TRANSACTION 'MM19'.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
11-27-2005 10:15 AM
good find Srikanth Pinnamaneni. How did you find that out.
Regards
Raja
11-27-2005 10:19 AM
Hi Raja,
I debugged it till the point where the parameter ids are considered using GET PARAMETER..
Program SAPLMGMM and PBO module INITIALISIERUNG has this code...
Sri
11-27-2005 10:22 AM
11-27-2005 10:14 AM
I tried this code in my system.
start-of-selection.
set parameter id 'MAT' field 'CPB11300'.
set parameter id 'STICH' field '11/27/2005'.
CALL TRANSACTION 'MM19' and skip first screen.
it's working.
Probably you should delare a variable of length 10.
Write the date to this field.
write <KEY_DATE> to v_date.
and then pass the value.
May be you have declare the value that is being passed to date as like sy-datum.
Try this,
data: v_date(10) value '11/27/2005'.
start-of-selection.
set parameter id 'MAT' field 'CPB11300'.
set parameter id 'STICH' field v_date.
CALL TRANSACTION 'MM19' and skip first screen.
Regards,
Ravi Kanth
11-27-2005 10:39 AM
I check with both type sy-datum as well as 10 char long date with user specific format, it didnt work, but the solution given by Srikanth works
Regards
Raja
11-27-2005 10:42 AM
Hi Raja,
I've executed this code in my system just now.
Its working fine.Why is it not working for you?
data: v_date(10) value '11/27/2005'.
start-of-selection.
set parameter id 'MAT' field 'CPB11300'.
set parameter id 'STICH' field v_date.
CALL TRANSACTION 'MM19' and skip first screen.
Regards,
Ravi
11-27-2005 10:45 AM
Hi raja,
I've checked it for another date.
It's not working.
You were right.
We have to use Srikanth's Logic.
Regards,
Ravi
11-27-2005 10:45 AM
just change the date value to other than current date.
for example pass 10/20/2004 to v_date and check the behaviour, it will still default to current date in MM19.
Regards
Raja
11-27-2005 10:54 AM