2013 Aug 22 8:24 AM
hI,
I want to call 'ME5A' from abap program by giving release date,material number as a parameter but report executes without taking the effect of release date parameters.
Material and p_lstub parameters(report type) are working and report is showing only those material which I am passing through the following code but date parameters are not working.
SUBMIT RM06BA00
"
WITH BA_MATNR-LOW = WA_FORECAST_OUT-IDNRK
WITH S_FRGDT-LOW = WA_FORECAST_OUT-FROMDATE--------> these parameter is not working
WITH S_FRGDT-HIGH = WA_FORECAST_OUT-TODATE--------------> these parameter is not working
WITH P_LSTUB = 'ALV' AND RETURN.
I have tried to give constant parameter but it did not work.
Please let me know How to resolve this issue.
Regards
M.Waqas Khan
2013 Aug 27 7:15 AM
Hi Muhammad,
Try this.
SUBMIT RM06BA00
"
WITH BA_MATNR-LOW = WA_FORECAST_OUT-IDNRK
WITH S_FRGDT-SIGN = 'I'
WITH S_FRGDT-OPTION = 'BT'
WITH S_FRGDT-LOW = WA_FORECAST_OUT-FROMDATE
WITH S_FRGDT-HIGH = WA_FORECAST_OUT-TODATE
WITH P_LSTUB = 'ALV' AND RETURN.
I hope this will help you.
Regards,
Ashish Kumar
2013 Aug 23 9:23 AM
Hello Waqas Khan.
Refer this sample code and analyse your case.
DATA: BEGIN OF RS OCCURS 0.
INCLUDE STRUCTURE RSPARAMS.
DATA: END OF RS.
RS-SELNAME = 'P_LSTUB'.
RS-KIND = 'P'. "Parameter
RS-SIGN = 'I'.
RS-OPTION = 'EQ'.
RS-LOW = 'ALV'.
APPEND RS.
RS-SELNAME = 'BA_MATNR-LOW'.
RS-KIND = 'S'. "Select-options
RS-SIGN = 'I'.
RS-OPTION = 'EQ'.
RS-LOW = 'MATERIAL'.
APPEND RS.
RS-SELNAME = 'S_FRGDT'.
RS-KIND = 'S'. "Select-options
RS-SIGN = 'I'.
RS-OPTION = 'BT'.
RS-LOW = '20120210'.
RS-HIGH = '20120211'.
APPEND RS.
SUBMIT RM06BA00 WITH SELECTION-TABLE RS AND RETURN.
Regards.
2013 Aug 27 7:05 AM
2013 Aug 27 10:25 AM
To get the field names of a standard tcode,
Press F1 on that field->Click Technical information->Screen field.
Then pass appropriate values(P-Parameter/S-Select options etc) to variable of structure RSPARAMS.
Through this, you can call standard tcodes with the data without any hit and try approach .
2013 Aug 23 9:54 AM
Hi,
SUBMIT rm06ba00 TO SAP-SPOOL WITHOUT SPOOL.
Regards,
Sujeet
2013 Aug 27 7:15 AM
Hi Muhammad,
Try this.
SUBMIT RM06BA00
"
WITH BA_MATNR-LOW = WA_FORECAST_OUT-IDNRK
WITH S_FRGDT-SIGN = 'I'
WITH S_FRGDT-OPTION = 'BT'
WITH S_FRGDT-LOW = WA_FORECAST_OUT-FROMDATE
WITH S_FRGDT-HIGH = WA_FORECAST_OUT-TODATE
WITH P_LSTUB = 'ALV' AND RETURN.
I hope this will help you.
Regards,
Ashish Kumar
2013 Aug 27 7:53 AM
I did it with the following code but I am not clear with the logic,
I did it with hit and try, Can anyone explain the me what is the actual mechanism
FOR ME55
SUBMIT RM06BA00
WITH P_LSTUB = 'ALV'
WITH BA_MATNR-LOW = WA_FORECAST_OUT-IDNRK
WITH BA_FRGDT-LOW BETWEEN WA_FORECAST_OUT-F_DATE2 AND WA_FORECAST_OUT-END_DATE1
"WITH BA_FRGDT-HIGH = WA_FORECAST_OUT-END_DATE1
AND RETURN .
FOR ME5A
SUBMIT RM06BF00
WITH S_MATNR = WA_FORECAST_OUT-IDNRK
WITH S_FRGDT BETWEEN WA_FORECAST_OUT-FROMDATE AND WA_FORECAST_OUT-TODATE
WITH P_FRGAB = '01'
WITH P_LSTUB = 'ALV' AND RETURN .
2013 Aug 27 8:54 AM
After the above solution I am facing one issue.
PR showing with the status : Release only via indiv.release.
Although when I executed the report ME55 ( PR Release) from tcode then it is showing release option .
Why this happens in calling .