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

issue with BAPI_GOODSMVT_CREATE

Former Member
0 Likes
1,706

I am using BAPI_GOODSMVT_CREATE to post goods receipt. I donot have PO number but the inbound delivery number.So I am filling the data as below:

GOODSMVT_HEADER

PSTNG_DATE=sy-datum or current date

DOC_DATE=LIKP-LFDAT

REF_DOC_NO=LIPS-VGBEL

GOODSMVT_CODE

GM_CODE= '01'

GOODSMVT_ITEM

MATERIAL=LIPS-MATNR

PLANT=LIPS-WERKS

STGE_LOC=LIPS-LGORT

DELIV_NUMB_TO_SEARCH=LIKP-VBELN

DELIV_ITEM_TO_SEARCH=LIPS-POSNR

ENTRY_UOM=LIPS-VRKME

ENTRY_QNT= LIPS-LFIMG

MVT_IND = 'B'

MOVE_TYPE = '101'

The BAPI runs fine and returns the material document number. But when u check the inbound delivery in transaction vl33n, under the tab "Goods Movement Data" field TotalGdsMvtStat is not updated to 'B' or 'C'.it either remains blank or 'A". Am i missing out on something? plz help me.

Thanks in advance

Shweta

9 REPLIES 9
Read only

Former Member
0 Likes
1,184

Are you calling the BAPI, BAPI_TRANSACTION_COMMIT after the goods movement BAPI?

-Kiran

Read only

Former Member
0 Likes
1,184

After the BAPI Run.

Have u used COMMIT WORK AND WAIT

If useful reward points.

Rgeards,

Vasanth

Read only

Former Member
0 Likes
1,184

have you given BAPI_COMMIT after the func module call ??

if not,give it.

if sy-subrc = 0.

call function 'BAPI_TRANSACTION_COMMIT'

endif.

regards

srikanth

Message was edited by: Srikanth Kidambi

Read only

Former Member
0 Likes
1,184

yes i m calling bapi_transaction_commit and thats why i can view the material doc no in transaction MB03.

Read only

0 Likes
1,184

Hello,

Then U check for the where used list.

U can find a list of program where this BAPI is used.

May be ur developers used this BAPI which is similar to ur requirement. From that do the same in ur report.

Hope this will be useful fro u.

Rgeards,

Vasanth

Read only

Former Member
0 Likes
1,184

Hi,

after your BAPI call...

check this...


if not it_return[] is initial.

loop at it_return where TYPE = 'S'.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

endloop.
ENDIF.

Regards

vijay

Read only

Former Member
0 Likes
1,184

Document flow is not update using BAPI_GOODSMVT_CREATE and that is why you will not see that reflected on the delivery.

You can try a couple of things. Pass the delivery and item number to DELIV_NUMB and DELIV_ITEM fields also. Another thing to check is to get the PO and PO item numbers from LIPS-VGBEL and LIPS-VGPOS. Pass that to the BAPI.

Read only

0 Likes
1,184

Thanks for confirming that document flow status is not updated by this BAPI. I tried sending the PO number and item but it didnt help.When i am filling DELIV_NUMB and DELIV_ITEM fields with del no & item no. the FM MB_POST_GOODS_MOVEMENT is throwing a error of type X, message class VL and message no 143.

Could you suggest me some other function module to do a GR against an inbound delivery..I dont want to use a BDC to do this posting.Is there a FM to update doc flow status which i can call after calling this BAPI?

Read only

0 Likes
1,184

Hi Shweta,

Were you able to resolve this. I have the same issue. Please let me know how you handled this.