Application Development and Automation 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: 
Read only

Tax Classification for Material - MLAN update / insert

Former Member
0 Likes
6,745

Hello all,

Does anyone know how I can make an update/insert into MLAN and make the changes appear on MM04?

I'm trying bapi_material_savedata but it's always giving me errors as "Tax category LCFR does not define classification 1" or "Tax category does not define classification 1"

MOVE: MLAN-ALAND TO LT_BAPI_MLAN-DEPCOUNTRY,

MLAN-TAXIM TO LT_BAPI_MLAN-TAX_IND,

  • lv_class TO LT_BAPI_MLAN-TAX_TYPE_1,

MLAN-TAXM1 TO LT_BAPI_MLAN-TAXCLASS_1,

  • lv_class TO LT_BAPI_MLAN-TAX_TYPE_2,

MLAN-TAXM2 TO LT_BAPI_MLAN-TAXCLASS_2.

APPEND LT_BAPI_MLAN.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

HEADDATA = LT_BAPI_MM

  • SALESDATA = LT_BAPI_MVKE

  • SALESDATAX = LT_BAPI_MVKEX

IMPORTING

RETURN = LT_BAPIRET

TABLES

  • MATERIALDESCRIPTION = LT_MAT_DESC

TAXCLASSIFICATIONS = LT_BAPI_MLAN

RETURNMESSAGES = LT_RET_MSG.

1 ACCEPTED SOLUTION
Read only

brad_bohn
Active Contributor
0 Likes
4,320

Why don't you fix the configuration issue instead (or use the correct value)?

SD -> Basic functions -> Taxes -> Define Tax Relevancy...

Hello all,

Does anyone know how I can make an update/insert into MLAN and make the changes appear on MM04?

I'm trying bapi_material_savedata but it's always giving me errors as "Tax category LCFR does not define classification 1" or "Tax category does not define classification 1"

MOVE: MLAN-ALAND TO LT_BAPI_MLAN-DEPCOUNTRY,

MLAN-TAXIM TO LT_BAPI_MLAN-TAX_IND,

  • lv_class TO LT_BAPI_MLAN-TAX_TYPE_1,

MLAN-TAXM1 TO LT_BAPI_MLAN-TAXCLASS_1,

  • lv_class TO LT_BAPI_MLAN-TAX_TYPE_2,

MLAN-TAXM2 TO LT_BAPI_MLAN-TAXCLASS_2.

APPEND LT_BAPI_MLAN.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

HEADDATA = LT_BAPI_MM

  • SALESDATA = LT_BAPI_MVKE

  • SALESDATAX = LT_BAPI_MVKEX

IMPORTING

RETURN = LT_BAPIRET

TABLES

  • MATERIALDESCRIPTION = LT_MAT_DESC

TAXCLASSIFICATIONS = LT_BAPI_MLAN

RETURNMESSAGES = LT_RET_MSG.

5 REPLIES 5
Read only

brad_bohn
Active Contributor
0 Likes
4,321

Why don't you fix the configuration issue instead (or use the correct value)?

SD -> Basic functions -> Taxes -> Define Tax Relevancy...

Read only

Former Member
0 Likes
4,320

The idea is to have a report that corrects the values of the taxes for a list of material automatically.

Read only

0 Likes
4,320

Of course...but the combination of values that you're trying to use isn't configured in your system, so either the config is missing or your BAPI call is wrong. This is why we don't do direct updates, so we don't bypass validations like this. Have you reviewed the configuration or debugged to understand the source of the error message?

Read only

0 Likes
4,320

yes...but I was not sure if the problem was customization! I don't even know if totaly customizing this is an option to the client! Before, the customer was doing a direct update!

Do you know here I can customize this, so that I don't get the error?

Read only

0 Likes
4,320

Yes, it is possible - I gave you the IMG path in my previous post - just choose 'Material Taxes' after following the path. I can't comment on whether the combination makes sense for your implementation though, as I'm not familiar with LCFR.