cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update control error - BAPI_GOODSMVT_CREATE

Former Member
0 Likes
12,017

Hi Folks,

while trying to post a GR using BAPI_GOODSMVT_CREATE, i am getting an error.

E M7 226 Update control of movement type is incorrect (entry 101 X X)

can someone let me know why and whts the solution to post the GR using this bapi.

thanks a ton

Raj

View Entire Topic
Former Member
0 Likes

Check this sample code for BAPI.

See if you are passing every informatino accordingly -

Sample Code for BAPI_GOODSMVT_CREATE

  • Populate header data

  • Posting date

x_goodsmvt_hdr-pstng_date = <deldate>.

  • Document date

x_goodsmvt_hdr-doc_date = <doc_date>.

  • User Name

x_goodsmvt_hdr-pr_uname = <ernam>.

  • User Name

x_goodsmvt_hdr-ref_doc_no = <PO/Delivery No).

  • Bill of lading

x_goodsmvt_hdr-bill_of_lading =<BOL>.

  • Populate item data

  • Purchase order number

i_goodsmvt_item-po_number = ebeln.

  • Line item number

i_goodsmvt_item-po_item = ebelp.

  • Plant

i_goodsmvt_item-plant = werks.

  • Movement type

i_goodsmvt_item-move_type =movtype.

  • Movement indicator

i_goodsmvt_item-mvt_ind = mvt_ind.

  • GR quantity

if p_movtype = c_101.

i_goodsmvt_item-entry_qnt = menge.

  • else.

  • i_goodsmvt_item-entry_qnt = menge * -1.

endif.

  • GR UOM

i_goodsmvt_item-entry_uom = meins.

  • Storage location

i_goodsmvt_item-stge_loc = lgort.

  • Production date

i_goodsmvt_item-prod_date = doc_date.

  • Delivery completion indicator

i_goodsmvt_item-no_more_gr = c_x.

  • Movement Reason

if p_movtype = c_122.

i_goodsmvt_item-move_reas = c_12.

endif.

endloop.

  • For each PO create a GR document

if not i_goodsmvt_item[] is initial.

call function 'TRANSACTION_BEGIN'

importing

transaction_id = l_trans_id.

call function 'BAPI_GOODSMVT_CREATE'

exporting

goodsmvt_header = x_goodsmvt_hdr

goodsmvt_code = x_mvt_code

importing

materialdocument = l_mat_doc

matdocumentyear = l_mat_doc_year

tables

goodsmvt_item = i_goodsmvt_item

return = i_bapireturn.

endif.