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

BAPI_GOODSMVT_CREATE with code 04 and special indicator E

Former Member
0 Likes
621

Hi Everybody

My requirement is like when we create sales order and put Item category ZXLC local branch transfer and save the sale order..It creates purchase requisation and we pass supply plant there. It shold create document through MB1B. We are using BAPI BAPI_GOODSMVT_CREATE for that but it is not creating document.

We are passing code 04 goods movement code and special indicator E.

My problem is that where I have to call this BAPI. I mean user exit or enhancement and what are the parameter we should pass. Can any body send me the piece of code for that...

3 REPLIES 3
Read only

Former Member
0 Likes
515

Please read the BAPI return message. Btw where are u writing this BAPI enhancement.

The probale resons are

1) Material is locked by user xxx or

2) You should use BAPI_TRANSACTION_COMMITT for the document to be posted to databse.

Please send me the return messages for further help.

Krishnan

Read only

0 Likes
515

Hi Krishnan

I called this BAPI in the user exit USEREXIT_SAVE_DOCUMENT. in the include MV45AFZZ I got message "Pass the sales order number"

whereas I passed the sales order number correctly to GOODSMVT_ITEM table. When I removed the special indicator E. It was creating the document...

I have even called BAPI_TRANSACTION_COMMITT for commit work.

Pls help me out in this

Read only

0 Likes
515

1)

Please remove BAPI_TRANSACTION_COMMITT from the user exit, it is a wrong way of using it.

Generally it is a practice to not to use BAPI_TRANSACTION_COMMITT / Committ work in any user exits. it will lead to database inconsistency.

2) If you are using the material same as sales orders item , threre is a possibility that material gets locked out..

3) Please consult your functional person to know what the special stock indicator is about?

4) generally we need to pass sales order number with leading zeroes.. for ex: if order number is 1234 , you should pass it as 0000001234.

Krishnan