Skip to Content

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

Problem with BAPI_MATERIAL_SAVEDATA

Hello!

I'm using BAPI_MATERIAL_SAVEDATA in order to change the 'cross-plant material status'. Below the relevant code lines:

-

-


DATA: lst_headdata TYPE bapimathead,

lst_clientdata TYPE bapi_mara,

lst_clientdatax TYPE bapi_marax,

lst_return TYPE bapiret2.

DATA: lit_return_msg TYPE TABLE OF bapi_matreturn2.

lst_headdata-material = i_matnr.

lst_headdata-basic_view = 'X'.

lst_clientdata-pur_status = i_new_mstae. " NEW cross-plant material status

lst_clientdatax-pur_status = 'X'.

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = lst_headdata

clientdata = lst_clientdata

clientdatax = lst_clientdatax

IMPORTING

return = lst_return

TABLES

returnmessages = lit_return_msg.

-

-


The error table 'lit_return_msg' of type bapi_matreturn2 contains the following error message:

H MK 102 trying to create: 6000191 ____ ____ ____ __________ ____ __ ___ ___

S MG 160 The material cannot be maintained since no maintainable data transferred

H MK 103 Trying to change: 6000191 ____ ____ ____ __________ ____ __ ___ ___

E 00 001 Falsche Aktivit├Ąt!

I also tried to test BAPI_MATERIAL_SAVEDATA with transaction SE37 - the same result (in our development system)! Now comes the strange: In our test system the test in SE37 (with an identically created material!) works without an error message - although the two systems are supposed to be identical!

Has somebody any advice? Thanks in advance!

Greetings

Wolfgang

Tags:
Not what you were looking for? View more on this topic or Ask a question