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 bapi_goodsmvt_create for goods receipt of process order

Former Member
0 Kudos

Hello All ,

I am trying to a GR with MIGO for a process order .Its giving me error like

Content of order 2000002339: 100001374 transferred to interface (IMSEG): 100001374

I am not able to trace the error out .I am passing the below parameters .pls check

gmhead-pstng_date = sy-datum.

gmhead-doc_date = sy-datum.

gmhead-pr_uname = sy-uname.

gmcode-gm_code = '02'. "01 - MB01 - Goods Receipts for Purchase Order

itab-move_type = '101'.

itab-mvt_ind = 'F'.

itab-plant = '1AAE'.

itab-material = '100001374'.

itab-entry_qnt = '1'.

itab-move_stloc = 'B100'.

itab-stge_loc = 'B100'.

itab-orderid = '002000002339'.

append itab .

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = gmhead

goodsmvt_code = gmcode

  • TESTRUN = ' '

IMPORTING

goodsmvt_headret = wa_head

materialdocument = lv_mblnr

  • MATDOCUMENTYEAR =

TABLES

goodsmvt_item = itab

  • GOODSMVT_SERIALNUMBER =

return = errmsg

.

Pls reply ..

Thanks .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

For Mb01 GMCODE is '01'

Check This T158G table....

so ur GMCODE shoud be gmcode-gm_code = '01' for mb01

Regards

ABG

2 REPLIES 2

Former Member
0 Kudos

Hi

For Mb01 GMCODE is '01'

Check This T158G table....

so ur GMCODE shoud be gmcode-gm_code = '01' for mb01

Regards

ABG

Former Member
0 Kudos

HI ...

Since this is a production order ,i used the GM code as '02'.bcoz the documentation says the same .

There are the following types of transactions/events:

1. GM_Code 01: Goods receipt for purchase order

2. GM_Code 02: Goods receipt for production order

3. GM_Code 03: Goods issue

4. GM_Code 04: Transfer posting

i also tried changing it to '01' ,its not working still...

Pls reply

Thanks .