I'm using bapi BAPI_MATERIAL_SAVEDATA in order to modify some new customer fields i've created. First of all I added these 2 new fields to structure BAPI_TE_MARA (append ZABAPI_TE_MARA) as char fields.
I have alse added these fields to structure BAPI_TE_MARA (append ZABAPI_TE_MARAX) as char(1). And activated both appends.
In the report I use the bapi I have added this code:
DATA: headdata LIKE bapimathead,
return LIKE bapiret2,
extensionin LIKE bapiparex OCCURS 0 WITH HEADER LINE,
extensioninx LIKE bapiparexx OCCURS 0 WITH HEADER LINE.
headdata-material = wa_procesar-matnr.
headdata-basic_view = 'X'.
extensionin-structure = 'BAPI_TE_MARA'.
extensionin-valuepart1+0(18) = wa_procesar-matnr.
extensionin-valuepart1+97(8) = wa_procesar-zzfechaenvio.
extensioninx-structure = 'BAPI_TE_MARAX'.
extensioninx-valuepart1+0(18) = wa_procesar-matnr.
extensioninx-valuepart1+29(1) = 'X'.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
headdata = headdata
return = return
extensionin = extensionin
extensioninx = extensioninx.
When I run the program, the bapi's returns the material has been modified, but in MM03 nothing has changed... Does anybody know waht i'm doing wrong ???
Thanks in advance !!!