SAP for Retail Discussions
Join conversations about personalization, omnichannel strategies, and operational excellence in retail using SAP for Retail software.
cancel
Showing results for 
Search instead for 
Did you mean: 

Mass update of New Tax indicator

Former Member
0 Kudos

Could someone share what would be the best way to update a tax indicator for a new tax for about 3,000 retail materials.

I created a LSMW that i found, but does not work for retail even when I change the transaction from MM02 to MM42.

Thank you, Regards,

Carlos

1 ACCEPTED SOLUTION

eduardo_hinojosa
Active Contributor
0 Kudos

Hi Juan Carlos,

I am not sure about your requirement, but reseach bapi BAPI_MATERIAL_MAINTAINDATA_RT, structure TAXCLASSIFICATIONS (structure BAPIE1MLANRT)

I hope this helps you

Regards

Eduardo

View solution in original post

5 REPLIES 5

Former Member
0 Kudos

I found this report, but the field I want to change is not on the basic view, is in additional values:

Example Report for BAPI_MATERIAL_SAVEDATA

*&---------------------------------------------------------------------*

*& Report  Z_EXAMPLE_BAPI_MATERIAL_SAVEDATA

*&

*&---------------------------------------------------------------------*

*&

*& This report reads material client datas, and doubles the net weights.

*&

*&---------------------------------------------------------------------*

REPORT  Z_EXAMPLE_BAPI_MATERIAL_SAVEDATA.

* Data Declarations

DATA:       CLIDAINP  LIKE  BAPI_MARA_GA,

            CLIDAOUT  LIKE  BAPI_MARA,

            CLIDAOUTX LIKE  BAPI_MARAX,

            HEADDATA  LIKE  BAPIMATHEAD,

            RETURN    LIKE  BAPIRET2,

            RETURNMES LIKE BAPI_MATRETURN2 OCCURS 0 WITH HEADER LINE.

* Get Material Number to be processed

PARAMETERS: MATERIAL LIKE  BAPI_MARA_GA-MATERIAL.

* Read Material Data

CALL FUNCTION 'BAPI_MATERIAL_GET_ALL'

  EXPORTING

    MATERIAL                   = MATERIAL

  IMPORTING

    CLIENTDATA                 = CLIDAINP

  TABLES

    RETURN                     = RETURNMES.

* Header Data: Material and View to maintain

HEADDATA-MATERIAL    = MATERIAL.

HEADDATA-BASIC_VIEW  = 'X'.

* Detail Data: Field Value, and 'X'-Structure to mark the field for maintenance

CLIDAOUT-NET_WEIGHT  = CLIDAINP-NET_WEIGHT * 2.

CLIDAOUTX-NET_WEIGHT = 'X'.

* Call the BAPI

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

  EXPORTING

    HEADDATA                   = HEADDATA

    CLIENTDATA                 = CLIDAOUT

    CLIENTDATAX                = CLIDAOUTX

  IMPORTING

    RETURN                     = RETURN

  TABLES

    RETURNMESSAGES             = RETURNMES.

* Commit to release the locks

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

* RETURN-TYPE is 'E' in case of error, else 'S'.

IF RETURN-TYPE = 'E'.

  LOOP AT RETURNMES.

    WRITE: / RETURNMES-MESSAGE.

  ENDLOOP.

ELSEIF RETURN-TYPE = 'S'..

  WRITE: / 'Weight of material ', MATERIAL, 'Sucessfully doubled'.

ENDIF.

0 Kudos

I will try with a LSMW with this variables:

Business Object:      BUS10001001

Method:                   CLONE

Message Type:         ARTMAS

Basic Type:               ARTMAS05

I understand I will have to add code in this structures but I am not sure how, I would appreciate if somebody could help:

E1BPE1MARART/E1BPE1MARARTX

Thank you, Regards,

Carlos 

eduardo_hinojosa
Active Contributor
0 Kudos

Hi Juan Carlos,

I am not sure about your requirement, but reseach bapi BAPI_MATERIAL_MAINTAINDATA_RT, structure TAXCLASSIFICATIONS (structure BAPIE1MLANRT)

I hope this helps you

Regards

Eduardo

0 Kudos

Try to use t-code MASS.

Select the Object Type and the Variant Name.

Former Member
0 Kudos

Thank you both, I used LSMW and it worked.