cancel
Showing results for 
Search instead for 
Did you mean: 

Error when calling BAPI_MATERIAL_SAVEDATA

Former Member
0 Kudos

Hi all,

I'm calling BAPI_MATERIAL_SAVEDATA through a RFC. I use SAP PI to call a function module and the function module calls the BAPI like this:


call function 'BAPI_MATERIAL_SAVEDATA'
      exporting
        headdata             = ls_headdata
        clientdata           = ls_clientdata
        clientdatax          = ls_clientdatax
        plantdata            = ls_plantdata
        plantdatax           = ls_plantdatax
        salesdata            = ls_salesdata
        salesdatax           = ls_salesdatax
        warehousenumberdata  = ls_warehousenumberdata
        warehousenumberdatax = ls_warehousenumberdatax
      tables
        materialdescription  = lt_materialdescription
        unitsofmeasure       = lt_unitsofmeasure
        unitsofmeasurex      = lt_unitsofmeasurex
        internationalartnos  = lt_internationalartnos
        taxclassifications   = lt_taxclassifications
        returnmessages       = lt_return2.

The BAPI stops processing on the line:

UPDATE MARU FROM TABLE MARU_UPD

in function MARA_ARRAY_UPDATE.

I receive the following error message in PI Communication Channel Monitoring: Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZSD_PEPE_CAT_INBOUND in remote system (RfcClient[CC_PepeSAPSDIn]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Data type MARU was found in a newer version than required.: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZSD_PEPE_CAT_INBOUND in remote system (RfcClient[CC_PepeSAPSDIn]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Data type MARU was found in a newer version than required.

ST22 tells me this:

Runtime Error TYPELOAD_NEW_VERSION Occurred on 11.03.2009 at 13:08:11 Data type "MARU" was found in a newer version than required. What happened? Runtime error The current ABAP program, "SAPLMG21", had to be terminated because one of the statements could not be executed at runtime. Information on where terminated The termination occurred in the ABAP program "SAPLMG21" in "MARA_ARRAY_UPDATE". The main program was "SAPMSSY1 ". The termination occurred in line 44 of the source code of the (Include) program "LMG21U02" of the source code of program "LMG21U02" (when calling the editor 440).

Any idea what's wrong with the data type MARU?

Thanks in advance!!

Regards,

Ivo van Ee

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

go to SE14 and adjust and activate the table MARA & view MARU ..

Former Member
0 Kudos

Navneet,

You are right. Activation did the trick. Thanks!

Regards,

Ivo

Answers (2)

Answers (2)

Former Member
0 Kudos

Im assuming ZSD_PEPE_CAT_INBOUND is the function module which you are calling in PI and I suspect this function module is now having sytax errors because the tables and structures used inside it has changed now.

You need to modify this FM to work with the new fields added, then reimport the FM to PI and then adjust your data structures to fill the newly addded field (if they have a source data) and it should work.

And if you are going to have data for the newly added fields in MARA , the present call for BAPI_MATERIAL_SAVEDATA will not work .Some more coding will be required to add the extension parameters of that BAPI (little tricky but so many examples in forum ) .All the customer added fields can only be populated using there extension parameters.

Mathews

Former Member
0 Kudos

Just found out that a colleague added some append fields to the mara structure. This seems to be the cause of the problem. We still don't know how to solve the problem though....

MARA:


.APPEND	ZAMARA_HFL	STRU	0	0	Fashion additional article master data
ZZCOLOR	ZCOLOR	CHAR	3	0	Color code
ZZCOLOR_DESCR	ZCOLOR_DESCR	CHAR	20	0	Color code description
ZZFIT	ZFIT	CHAR	3	0	Fit code
ZZFIT_DESCR	ZFIT_DESCR	CHAR	20	0	Fit code description
ZZSIZE_SCALE	ZSIZE_SCALE	CHAR	1	0	Size scale
ZZSIZE_DESCR	ZSIZE_DESCR	CHAR	20	0	Size description
ZZSIZE_POS	ZSIZE_POS	NUMC	2	0	Position of Size description in matrix
ZZANALYS04	ZANALYS04	CHAR	4	0	Analysis code 04
ZZANALYS04_DESCR	ZANALYS04_DESCR	CHAR	20	0	Analysis code 04 description

MARU:


ZZCOLOR	CHAR	3	Color code
ZZCOLOR_DESCR	CHAR	20	Color code description
ZZFIT	CHAR	3	Fit code
ZZFIT_DESCR	CHAR	20	Fit code description
ZZSIZE_SCALE	CHAR	1	Size scale
ZZSIZE_DESCR	CHAR	20	Size description
ZZSIZE_POS	NUMC	2	Position of Size description in matrix
ZZANALYS04	CHAR	4	Analysis code 04
ZZANALYS04_DESCR	CHAR	20	Analysis code 04 description