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

creating new material

Former Member
0 Kudos
267

Hi everybody

im trying to create a new material using BAPI through C#.

im using BAPI_MATERIAL_GETINTNUMBER then BAPI_MATERIAL_SAVEDATA to create the new material and everything working but when i try to create a new purchase order for the new material i got a message saying the material is not activated or does not exist. i can find the new material in the MARA table.

Any advise will be helpfull.

regards

khalil

7 REPLIES 7

tarangini_katta
Active Contributor
0 Kudos
180

Hi,

Have u used the BAPI_TRANSACTION_COMMIT after calling the BAPI.

Thanks,

0 Kudos
180

hi katta

i'm using C# proxy.CommitWork

Thanks

Former Member
0 Kudos
180

chck the purchasing view, and set the status if needed

0 Kudos
180

Hi

i'm using BAPIs, so i need to do everything with BAPI only.

Thanks

0 Kudos
180

basiclaly your material is not released for purchasing yet. so you need to change your BAPI or use another one to do that. Work with the MM functionsal person to see what info is missing from the material you are creating, and then see how you can populate that in the BAPI

Former Member
0 Kudos
180

you can use the same bapi-BAPI_MATERIAL_SAVEDATA , as 2nd time, meaning, initially, create the matnr and then again change its status by using the same bapi.

thanq

0 Kudos
180

Hi and thank you for the replay

that sounds good but what is the variable that i have to set to enable the materail in the GOODS_MATERIAL_SAVEDATA call

Please advise

regards

khalil