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: 

BAPI_MATERIAL_SAVEDATA

Former Member
0 Kudos

Hi all,

I am using the bapi_material_savedata to update the material.

For the test i created the material.

For updation,

I gave the following details

material code - header

industrial code - header

material type - header

basicview flag - header

material group and its flag - clientdata

Division - clientdata

Then i ran the bapi.

It does not update the division data.

Please anyone help me how to handle this bapi

What r the values has to be furnished.

Regards,

S.Shankar

8 REPLIES 8

Former Member
0 Kudos

Hi,

did you commit your work with the fm

BAPI_TRANSACTION_COMMIT? This should be done after running a bapi.

regards

Siggi

Former Member
0 Kudos

HI,

Yes i wrote the function module to call the bapi.

inside the fm, i have called the bapi_transaction_commit.

with the same input i have chnaged the basic quantity unit and set the flags. it is updating into the material.

But for oldmaterial number, division are all not getting updated.

I dont know what is the problem.

should i have input all the fields in the view selected.

please help.

Regards,

S.Shankar

0 Kudos

Hi,

isn't the division some kind of sales view data, is it? If yes you need also to check the sales_view + some additional fields.

regards

Siggi

0 Kudos

Hi,

Thank you for the reply.

Divivsion field is in basic view.

But as you said i tried by checking the sales view.

It didnt work.

As far as i am testing, i can update only

weight unit, basic quantity unit, material group .

remaining fields are not updated.

i am using X for setting the view flags

I am using 1 for setting the field flags

I am leaving the delete flag as blank. Is it all right.

i tried debugging the bapi also.

since i am new to sap, icould not continue.

the purpose is that i am going to update the material from .net. so i am testing first in abap.

please continue your cooperation

Regards,

S.Shankar

0 Kudos

Hi,

unfortunately I am not very familiar with that BAPI, so I cannot help you at this point. Hope somebody else can answer your question.

Siggi

0 Kudos

Hi Shankar,

I just tried the BAPI on our system just for changing the division. I set the new value for the Division in structure CLIENTDATA and a 'X' in the corresponding field of structure CLIENTDATAX; and it works....

Regards,

John.

Former Member
0 Kudos

Hi all,

I have found why BAPI_material_savedata didnot update the fields in my server.

The fields are assigned hide permission in the field groups.

if you go to the transaction oms9 you can view the permission. if the fields is assigned hide permission for mal1 and mal2, then bapi wont consider those fields.

any data transfer through ale will use the mal1 and mal2.

I think this might be useful information.

i have searched for 2 weeks but in vein. at last i found somehow.

I got another issue.

i directly ran the bapi and i selected the sales view.

i inpuuted the plant and profit center which are mandatory.

everything wnet fine.

when i called the bapi from the report, i hardcoded the value of profit center. bapi does accept the profit center value in this case. same values in direct running and hardcoding didnt work.

anybody can help me

S.Shankar

Message was edited by: Shankar selvam

0 Kudos

Hi Shankar,

The only reason I can think of is that profit center is a field with a conversion exit (ALPHA); if you don't use the full 10 characters you should convert the value for input.

Regards,

John.