Skip to Content

This blog was written in Portuguese but in the end of blog is translated to English.

Portuguese Version:

 

Esse BLOG descreve como modificar o material pela BAPI passando o Nº Modificação (campo AENNR) inexistente na BAPI_MATERIAL_SAVEDATA.

Esse BLOG nasceu de uma necessidade real de um cliente que queria mudar o texto do material e que aparecesse no LOG de modificações o Nº Modificação. Eu achei interessante em compartilhar.

  1. Criar Append Z com o campo AENNR nas estruturas BAPI_TE_MARA e BAPI_TE_MATAX. Telas da transação SE11/wp-content/uploads/2013/03/bapi01_198016.jpg/wp-content/uploads/2013/03/bapi02_198056.jpg
  2. Utilize a BAPI_MATERIAL_SAVEDATA passando os parâmetros abaixo: (Telas da transação SE37)

Import Parameters

HEADDATA-MATERIAL     = Numero do Material

HEADDATA-BASIC_VIEW = ‘X’
     /wp-content/uploads/2013/03/bapi03_198054.jpg

Tables MATERIALDESCRIPTION

MATERIALDESCRIPTION-LANGU                 = (Código do Idioma)

MATERIALDESCRIPTION-LANGU_ISO         = (Código do Idioma)

MATERIALDESCRIPTION-MATL_DESC        = (Descrição nova do material)/wp-content/uploads/2013/03/bapi04_198055.jpg

Tables EXTENSIONIN

EXTENSIONIN-STRUCTURE = ‘BAPI_TE_MARA’

EXTENSIONIN-VALUEPART1= Número do Material + Número da Modificação

Nesse caso Material 65 e Número de Modificação 500000000000/wp-content/uploads/2013/03/bapi05_198057.jpg

Tables EXTENSIONINX

EXTENSIONINX-STRUCTURE = ‘BAPI_TE_MARAX’

EXTENSIONINX-VALUEPART1= Número do Material + Número da Modificação

 

Nesse caso Material 65 e Número de Modificação 500000000000
/wp-content/uploads/2013/03/bapi06_198058.jpg

Tables RETURNMESSAGES após a execução da BAPI (Material Modificado)/wp-content/uploads/2013/03/bapi09_198059.jpg

      3. Consultar a transação MM03 e ver a alteração e LOG de Modificação

/wp-content/uploads/2013/03/bapi10_198060.jpg

Texto do Material OK

/wp-content/uploads/2013/03/bapi11_198061.jpg

Menu Enviroment:Display Changes

Número de Modificação OK – Duplo-clique na linha
/wp-content/uploads/2013/03/bapi12_198062.jpg

/wp-content/uploads/2013/03/bapi12_1_198064.jpg

/wp-content/uploads/2013/03/bapi13_198065.jpg

Referência: http://scn.sap.com/thread/623890 Resposta correta de Holger Roth.


——————————————————————————————————————————————————————————————————–
English Version:

This BLOG describes how to modify the material by passing the Change Number (AENNR field) non existent in BAPI_MATERIAL_SAVEDATA.

This BLOG was born of a real need for a client who wanted to change material description and to appears in the log of modifications the Change Number.
I foundit interesting to share.

  1. Create Append Z with the field AENNR in structures BAPI_TE_MARA and BAPI_TE_MATAX. Screens transaction SE11
    /wp-content/uploads/2013/03/bapi01_198016.jpg
    /wp-content/uploads/2013/03/bapi02_198056.jpg
  2. Use the BAPI_MATERIAL_SAVEDATA passing the parameters below: (Screens transaction SE37)

Import Parameters

HEADDATA-MATERIAL     = Number of Material

HEADDATA-BASIC_VIEW = ‘X’
/wp-content/uploads/2013/03/bapi03_198054.jpg    

Tables MATERIALDESCRIPTION

MATERIALDESCRIPTION-LANGU                 = (Code of Language)

MATERIALDESCRIPTION-LANGU_ISO         = (Code of Language)

MATERIALDESCRIPTION-MATL_DESC        = (New Material Description)

/wp-content/uploads/2013/03/bapi04_198055.jpg

Tables EXTENSIONIN

EXTENSIONIN-STRUCTURE = ‘BAPI_TE_MARA’

EXTENSIONIN-VALUEPART1= Material Numer+ Change Number

In this case Material 65 and Change Number 500000000000

/wp-content/uploads/2013/03/bapi05_198057.jpg

Tables EXTENSIONINX

EXTENSIONINX-STRUCTURE = ‘BAPI_TE_MARAX’

EXTENSIONINX-VALUEPART1= Material Numer+ Change Number

 

In this case Material 65 and Change Number 500000000000

/wp-content/uploads/2013/03/bapi06_198058.jpg

Tables RETURNMESSAGES after execution BAPI (Material Changed)

/wp-content/uploads/2013/03/bapi09_198059.jpg

      3. Consult the transaction MM03 and see the change and LOG Modification

/wp-content/uploads/2013/03/bapi10_198060.jpg

Material Description OK

/wp-content/uploads/2013/03/bapi11_198061.jpg

Menu Enviroment:Display Changes

Change Number OK – Double-click in the line

/wp-content/uploads/2013/03/bapi12_198062.jpg

/wp-content/uploads/2013/03/bapi12_1_198064.jpg

/wp-content/uploads/2013/03/bapi13_198065.jpg

Reference:  http://scn.sap.com/thread/623890 Correct answer by Holger Roth.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply