Application Development 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: 

BAPI_GOODSMVT_CREATE and Product Brand

Former Member
0 Kudos

Hi all,

I have a requirement to create a Material Document using a custom Movement type. The issue is the Product Brand in MB1A has been made as a mandaory field by a user-exit. but in the BAPI i am using (BAPI_GOODSMVT_CREATE) there is no field to pass the Product Brand. So is there any alternative way so that i can create the Material Document with Product Brand.

Thanks and Regards,

Anoop R.S

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

Try with BDC

3 REPLIES 3

kesavadas_thekkillath
Active Contributor
0 Kudos

Try with BDC

Former Member
0 Kudos

Hello Anoop,

You can either go for BDC.

OR.

Delete the code from Userexit temporarily , upload the data first then again put the code back and activate the Userxit.

This are the 2 possible solution in your case. Hope the discussion is helpful.

Cheers,

Suvendu

former_member215870
Participant
0 Kudos

Behind the BAPI there is a set of 2 FM that used to create and post the Material Document. These FM are the:

MB_CREATE_GOODS_MOVEMENT

MB_POST_GOODS_MOVEMENT

First you should create the material document by using the first FM and then you will post the document by using the second one FM.

Check the following code.

CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'

EXPORTING

IMKPF = T_IMKPF

XALLP = 'X'

  • XALLB = ' '

  • XALLR = ' '

CTCOD = W_CODE

IMPORTING

EMKPF = T_EMKPF

  • E_LVS_TAFKZ =

TABLES

EMSEG = T_EMSEG

IMSEG = T_IMSEG

.

IF T_EMKPF-SUBRC = 1.

CALL FUNCTION 'MB_POST_GOODS_MOVEMENT'

IMPORTING

EMKPF = T_EMKPF

EXCEPTIONS

OTHERS = 0.

IF T_EMKPF-SUBRC = 0.

COMMIT WORK AND WAIT.

ENDIF.

ELSE.

DO SOMETHING....

ENDIF.

-


With Regards

George