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 for code 04 and special ind E

Former Member
0 Likes
2,385

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...

5 REPLIES 5
Read only

Former Member
0 Likes
1,206

hi Nikhilesh,

how the purchase requistion and stock transfer po creation happening in the system . it is happening through user exit ?

which user exit and what are r the fields u r pasing to it .

rgds

Chalam.

Read only

0 Likes
1,206

I m calling this BAPI thru user exit USEREXIT_SAVE_DOCUMENT in the include program MV45AFZZ. I m passing posting date, doc date, user name movement type 412 at header level. I passed GOODSMVT_CODE as '04'.

LT_GOODSMVT_ITEM-material = xvbap-matnr.

LT_GOODSMVT_ITEM-plant = eban-RESWK.

if xvbap-lgort is initial.

LT_GOODSMVT_ITEM-stge_loc = '0001'.

else.

LT_GOODSMVT_ITEM-stge_loc = xvbap-lgort.

endif.

LT_GOODSMVT_ITEM-spec_stock = 'E'.

LT_GOODSMVT_ITEM-SALES_ORD = xvbap-vbeln.

LT_GOODSMVT_ITEM-S_ORD_ITEM = xvbap-POSNR.

LT_GOODSMVT_ITEM-VAL_SALES_ORD = xvbap-vbeln.

LT_GOODSMVT_ITEM-VAL_S_ORD_ITEM = xvbap-POSNR.

*quantity

LT_GOODSMVT_ITEM-entry_qnt = xvbap-KWMENG.

LT_GOODSMVT_ITEM-entry_uom = xvbap-meins.

AT ITEM LEVEL.

Is this the right place for calling this BAPI and for code 04 and special ind E r these the sufficient parameters. It shows error msg

pass the sales order number whereas I m passing the sales order no. correctly even I tested this with existing sales order in debug mode..

Read only

0 Likes
1,206

hi ,

i think it should not be called in sales order user exit .

it should be called in po user exit .

since after sales order saving u can trigger for purchase requisition creation.

but before purchase requisition u cannot call for transfer posting . it is logically not correct .

just tell your process how it is actually happening.

rgds

Chalam

Read only

0 Likes
1,206

Hey I am transfer posting after purchase requsition. Process is when we save sales order with item category local branch transfer. It creates purchase requsition and I put supply plant and continuethen it shud create transfer posting so I am calling BAPI after puch req create in one of user exit.

Read only

Former Member
0 Likes
1,206

hi

good

go through this link, this will give you the complete idea bou this particular bapi with a example,

http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm

hope this will help you to give the idea to use this bapi.

thanks

mrutyun^