Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM MB_CREATE_GOODS_MOVEMENT

Bharath84
Participant
0 Likes
7,305

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

1 ACCEPTED SOLUTION
Read only

Former Member
5,131

Hi Haritha,

Can you please tell me what is the value being populated in theEMKPF-SUBRC field on execution?

Regards,

Gayatri

10 REPLIES 10
Read only

ashraf_usmani
Participant
0 Likes
5,131

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

Read only

0 Likes
5,131

HI,

This BAPI is not available in my version.

Thanks,

Haritha

Read only

Former Member
0 Likes
5,131

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

Read only

krishna_k19
Contributor
0 Likes
5,131

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

Read only

Former Member
5,132

Hi Haritha,

Can you please tell me what is the value being populated in theEMKPF-SUBRC field on execution?

Regards,

Gayatri

Read only

0 Likes
5,131

Hi Gayatri,

After executing the FM MB_CREATE_GOODS_MOVEMENT, the value in sy-subrc is 5 .

Thanks,
Haritha

Read only

0 Likes
5,131

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

Read only

0 Likes
5,131

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
5,131

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

Read only

Former Member
0 Likes
5,131

hii Harshitha

please check authorization for tcode they might be missing

Regards

Gaurav