Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

code to modify commodity code of a material

HI ,

Could any one send me the code( Parameters to be passed to the BAPI_MATERIAL_SAVEDATA) to modify only the commodity code of a material.

Tags:
Former Member
Former Member replied

Hi,

DATA:
  ls_marc  TYPE bapi_marc,
  ls_marcx TYPE bapi_marcx,
  ls_head  TYPE bapimathead.

ls_head-material = <matnr>.
ls_head-ind_sector = <ind_sect>.
ls_head-matl_type = <matl_type>.
ls_head-sales_view = 'X'.

ls_marc-plant = <plant>.
ls_marc-comm_code = <comm_code>.

ls_marcx-plant = <plant>.
ls_marcx-comm_code = 'X'.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
  EXPORTING
    headdata = ls_head
    plant_data = ls_marc
    plant_datax = ls_marcx
...

Hope this helps (please reward me if it does).

Regards, Joerg

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question