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

Update control error - BAPI_GOODSMVT_CREATE

Former Member
0 Likes
12,005

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

On your item(BAPI2017_GM_ITEM_CREATE) data did you pass 'B' to MVT_IND field?

Former Member
0 Likes

Thanks. let me told you what was my problem and how i could resolved it.

i was creating a good entry with the bapi BAPI_GOODSMVT_CREATE for a production order, and i could't leave for the error mesage M7 226 101 X X, the real problem was that i didn't input MVT_IND F in BAPI2017_GM_ITEM_CREATE. that was my error.

thanks a lot

regards

Answers (5)

Answers (5)

Former Member
0 Likes

THANK you all

RESOLUTION : SOLVED - THESE FIELDS NEED TO BE FILLED IN.

PSTNG_DATE DATE

DOC_DATE DATE

PR_UNAME CHARACTER 12

REF_DOC_NO CHARACTER 16

BILL_OF_LADING CHARACTER 16

PO_NUMBER CHARACTER 10

PO_ITEM NUMC 5

PLANT CHARACTER 4

MOVE_TYPE CHARACTER 3

MVT_IND CHARACTER 1

ENTRY_QNT PACKED 7

ENTRY_UOM CHARACTER 3

STGE_LOC CHARACTER 4

PROD_DATE DAT

NO_MORE_GR CHARACTER 1

MOVE_REAS NUMC 4

*if not relavent to your case you can leave blank

Former Member
0 Likes

hi,

thanks for the replies.

I am able to post GR using tcode MB01 with the same movement type (101). does this give more clues??

Former Member
0 Likes

I guess somewhere some field values are not populated in parameters of BAPI. Populate same values in BAPI function which you have used in MB01 and try again.

Check once in debug mode. It will give clear idea.

Former Member
0 Likes

Hi Raj,

The movement type which you are using might not be configured properly.

Consult your funtional guy in this regard.

Regards,

Raj

Message was edited by: Rajasekhar Dinavahi

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.

Former Member
0 Likes

Hi Raj,

Please take a look at this link for sample code.

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

The error is related to <b>Incorrect Movement Type</b>.

You can try this FM <b>MB_CONTROL_MOVETYPE_GET_SINGLE</b> for testing.

Hope this will help.

Regards,

Ferry Lianto