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: 

Issue with BAPI_MATERIAL_SAVEREPLICA in ECC 6.0

Former Member
0 Kudos
504

Hi All,

I am facing a strange issue in creating a Material using BAPI_MATERIAL_SAVEREPLICA.

When I try creating a Material with this BAPI, the Material does get created, but the problem is, I am not able to update the Net Weight field with this approach.

The funny thing is, I am able to update this same field with the same set of code in SAP 4.7 version.

I am facing this issue only in the ECC 6.0 environment.

I am passing the Net Weight field in the CLIENTDATA structure.

Is there any additional field that I need to pass to any structure in ECC6.0 to achieve this?

I dont get a clarity from reading the BAPI's documentation.

Any pointers in this direction will be highly helpful.

Thanks & Regards,

Keerthi

8 REPLIES 8

Former Member
0 Kudos
170

Are you populating BAPIE1MARAX parameter?

When updating the material pass the UPD as function...



BAPIE1MARA-FUNCTION = 'UPD'.

BAPIE1MARAX-FUNCTION = 'UPD'.
BAPIE1MARAX-NET_WEIGHT = abap_true.


Edited by: gvsastry on Aug 12, 2010 12:08 PM

prasenjit_sharma
Active Contributor
0 Kudos
170

Hi,

Why don't you try and debug this. You may set a break-point at the statement 'message'. But most likely there are some data issues,

Regards

Prasenjit

0 Kudos
170

Hi,

I tried implementing the suggestion - passing the additional parameters to the BAPIE1MARA and BAPIE1MARAX structures.

It did not work.

And I dont think that is a data issue either, because the code seems to work for the same set of data in SAP 4.7 system.

Alternate suggestions please.

Regards,

Keerthi

Former Member
0 Kudos
170

keerthi,

if your fields are Z fields then it should be available in below path

SPRO->SAP Reference IMG->logistics-General->Material Master->Field Selection -> Assign fields to field selection groups

if it not available then configure those Z fields. try pass to BAPIE1MARA and BAPIE1MARAX structures and execute the BAPI

0 Kudos
170

Hi,

Its not a Z field that I am talking about.

Its the Net Weight field - MARA-NTGEW.

This field is not getting updated though I am passing this field as part of the MARA structure to the BAPI - BAPI_MATERIAL_SAVEREPLICA.

The material I am trying to create is a Service type material.

For Service type materials, the Std. Screen for usually does not show the Weight fields at all, but on passing the value in the BAPI updates the MARA table in the database.

Moreover, the same piece of code is working in my SAP 4.7 system and the issue is only seen in the SAP ECC 6.0 system.

Any suggestions in the direction of finding a resolution to this problem will be of great help.

Thanks & Regards,

Keerthi

Former Member
0 Kudos
170

Hello Keerthi,

We face a similar issue in our upgrade. When we update the weights with other fields, it gets updated. But not individually using the same BAPI. Can you please let me know how you fixed this issue?

Thanks,

SriB K

0 Kudos
170

Hi,

Try passing values for the Net Weight as well as the 2 unit fields - Unit of Weight and Unit of Weight in ISO. I think in my case, we were passing only the Unit of Weight and not the ISO unit in the 4.7 environment but I had to pass both these values in ECC.

But if I were to be honest, I do not exactly remember if that is the only thing I did to fix the problem - it was 2 years back and I have not used that BAPI one single time since then .

Regards,

Keerthi

Former Member
0 Kudos
170

The Net Weight Field ( MARA- NTGEW ) gets automatically updated using your net weight value. if you go to MM01 or MM02 and try maitaining the field, it will not allow . it is greyed out because the value is computed internally.