cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_GOODSMVT_CREATE - error with tax code

09-05-2018 9:22 PM
johnnybmao Explorer
2641 views 4 comments
0 Likes
SAP Managed Tags
Subscribe

Dear all,

I am trying to use BAPI_GOODSMVT_CREATE to do a plant to plant transfer, but it is returning an error "Enter a tax code", even with the field GOODSMVT_ITEM-TAX_CODE filled.

We're using non-standard movement type 901, which is a copy of movement type 301, and a non-standard tax code as well.

ls_header-doc_date   = sy-datum.
ls_header-pstng_date = sy-datum.
ls_item-material     = pt-material.
ls_item-plant        = pt-plant.
ls_item-stge_loc     = pt-storage_loc.
ls_item-move_type    = pt-mov_type.
ls_item-entry_qnt    = pt-entry_qnt.
ls_item-move_plant   = pt-move_plant.
ls_item-move_stloc   = pt-move_stloc.
ls_item-tax_code     = pt-tax_code


APPEND ls_item TO lt_item.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING
   goodsmvt_header  = ls_header
   goodsmvt_code    = '04'
IMPORTING
   materialdocument = lv_matdoc
   matdocumentyear  = lv_docyear
TABLES
   goodsmvt_item    = lt_item
   return           = lt_return.

I tested thru SE37 with 901 mov type and returned the error. I tried with mov 301 and it went well.

The process thru MIGO is running fine with 901.

Isn't GOODSMVT_ITEM-TAX_CODE related to MWSKZ field in MIGO? Do I have to do any additional configuration in 901 movement type?

Thanks in advance and best regards,

Johnny

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

coopersap01
Discoverer
0 Likes

Hello,

Did you solve this I got the same issue

former_member34
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi there,

You have a question and need help by the community? Instead of posting into an old question thread, it is more helpful for you, if you create your own question. Here is how to get started:

  1. Learn about asking and answering questions in SAP Community with this tutorial: https://developers.sap.com/tutorials/community-qa.html
  2. Ask your detailed question here: https://answers.sap.com/questions/ask.html
  3. Wait for a response.

That's it. Thank you!

You may also click the "I have a similar question" button, if you haven't already.

Best regards

Jennifer

Your SAP Community moderator

Former Member
0 Likes

Hi Johnny,

Mvt Type 301 working fine in BAPI post then it should work for Mvt type 901. What you can do run 301 and 901 entries seperately . Cross compare value . check missing value between these movement type . you may get answer for this .

Regards,

Vishnu