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 321

Former Member
0 Kudos

Hey Experts,

I'm having an issue with a 321 movement for a special stock 'E'.
when I use the mb1b with the same data the movement do not fail, but when I try in in my report I do have the message: msgid m7 msgno 073 type E asking to add the client order (kdauf).
I'm calling the bapI like this:

i_goodsmvt_item-stge_loc = v_lgort. " recuperare dal l'ordine
i_goodsmvt_item-vendor = wa_zqu14_tabconflmi-codforn.
i_goodsmvt_item-move_type = '321'.
i_goodsmvt_item-po_number = wa_zqu14_tabconflmi-testolib3.
i_goodsmvt_item-po_item = wa_zqu14_tabconflmi-testolib4.
i_goodsmvt_item-entry_qnt = wa_zqu14_tabconflmi-qtacons.
* i_goodsmvt_item-entry_uom = 'ST'.
IF wa_zqu14_tabconflmi-testolib5 <> ' '.
i_goodsmvt_item-spec_stock = 'E'.
i_goodsmvt_item-sales_ord = wa_zqu14_tabconflmi-testolib5.
i_goodsmvt_item-s_ord_item = wa_zqu14_tabconflmi-kdpos.
ENDIF.

APPEND i_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = l_goodsmvt_header
goodsmvt_code = l_goodsmvt_code
IMPORTING
goodsmvt_headret = l_goodsmvt_headret
materialdocument = l_materialdocument
matdocumentyear = l_matdocumentyear
TABLES
goodsmvt_item = i_goodsmvt_item
goodsmvt_serialnumber = i_gm_serialnumber
return = i_return.
IF i_return IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = i_return2.
what do I miss?
in debug the i_goodsmvt_item-sales_ord is filled.
Any ideas?
thanx

1 ACCEPTED SOLUTION

Former Member
0 Kudos

no pb problem, i've my issue filling also

  i_goodsmvt_item-val_sales_ord   = wa_zqu14_tabconflmi-testolib5.
  i_goodsmvt_item-val_s_ord_item  = wa_zqu14_tabconflmi-kdpos.

1 REPLY 1

Former Member
0 Kudos

no pb problem, i've my issue filling also

  i_goodsmvt_item-val_sales_ord   = wa_zqu14_tabconflmi-testolib5.
  i_goodsmvt_item-val_s_ord_item  = wa_zqu14_tabconflmi-kdpos.