Application Development 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: 

updating new customer fields with BAPI_MATERIAL_SAVEDATA

Former Member
0 Kudos

Hi,

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'.

APPEND extensionin.

APPEND extensioninx.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = headdata

IMPORTING

return = return

TABLES

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 !!!

Maria

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

after calling BAPI use

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

IMPORTING

return = return.

Regards

Raju chitale

4 REPLIES 4

Former Member
0 Kudos

Hi,

after calling BAPI use

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

IMPORTING

return = return.

Regards

Raju chitale

0 Kudos

I've already used that function but didn't work....

Former Member
0 Kudos

Hi Maria,

How did you solve this problem?

Regards,

Shreya

Former Member
0 Kudos

hi,

      if u found the solution means post the mistke which u done. which ll be helpful for freshers who learn.

Regards,

Gopi