‎2014 Dec 19 7:31 AM
Hi All,
In my alv report, i am changing the Delivery qty and doing a Goods receipt to create material document for Open items using the FM MB_CREATE_GOODS_MOVEMENT and MB_POST_GOODS_MOVEMENT. I do not have a BAPI as this is a lower version of sap. It is giving me the below error:
Below is my code:
call function 'MB_CREATE_GOODS_MOVEMENT'
exporting
imkpf = r_imkpf
xallp = 'X'
* XALLB = ' '
* XALLR = ' '
ctcod = 'MB0A'
* XQMCL = ' '
* OLD_SUBRC = ' '
* IPKCOM =
* X_AUTHORITY = ' '
* XLISU = X
importing
emkpf = r_emkpf
* E_LVS_TAFKZ =
tables
emseg = t_emseg
imseg = t_imseg
exceptions
others = 1.
if sy-subrc = 0.
endif.
call function 'MB_POST_GOODS_MOVEMENT'
exporting
xblnr_sd = r_imkpf
importing
emkpf = r_emkpf
exceptions
others = 1.
Please help me.
Thanks,
Haritha
‎2014 Dec 19 10:55 AM
Hi Haritha,
Can you please tell me what is the value being populated in theEMKPF-SUBRC field on execution?
Regards,
Gayatri
‎2014 Dec 19 7:38 AM
Hello Haritha,
Please check in SE37 is this BApi avaliable in your System.
As you Mentioned you are using lower version of SAP, try Using BApi
BAPI_GOODSMVT_CREATE
Regards
Ashraf usmani
‎2014 Dec 19 9:01 AM
‎2014 Dec 19 8:29 AM
Hello Haritha,
The error suggest there must be function module could not complete the processing due to internal error. you need to check the exporting parameters are correctly assigned and all the required parameters are passed to the function module.
Regards,
Rahul
‎2014 Dec 19 9:12 AM
Hi Haritha,
Please go through the documentation of the FM , check the code what you are passing (for ctcod) is correct or not.
Regards,
Krishna
‎2014 Dec 19 10:55 AM
Hi Haritha,
Can you please tell me what is the value being populated in theEMKPF-SUBRC field on execution?
Regards,
Gayatri
‎2014 Dec 19 11:17 AM
Hi Gayatri,
After executing the FM MB_CREATE_GOODS_MOVEMENT, the value in sy-subrc is 5 .
Thanks,
Haritha
‎2014 Dec 19 11:41 AM
Hi Haritha,
Please check the discussion thread:
http://scn.sap.com/thread/930773
This might help you solve your problem.
Because ideally it should be returning the value 1 as per SAP Help.
Changes in the function module MB_CREATE_GOODS_MOVEMENT
Hope this helps!
Regards,
Gayatri
‎2014 Dec 19 2:55 PM
HI Gayatri,
I checked the tcode MB0A and movement type 101 maintained in tables T158 and T158B.
but still i am getting the sy-subrc values as 5.
Thanks,
Haritha
‎2014 Dec 19 11:47 AM
Did you look for olllllllllllllllllld OSS notes like 357661 - M7260: MB_CREATE_GOODS_MOVEMENT not processed in your system ? (I won't be able to help much, no longer access to such old system)
Also remove this short OTHERS = 1 and try to actually manage error messages and returned parameters, eg subfields related to message of EMKPF (as a IF EMKPF-MSGTY EQ 'E')
Regards,
Raymond
‎2014 Dec 20 7:51 AM
hii Harshitha
please check authorization for tcode they might be missing
Regards
Gaurav