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: 
Read only

creating new material

Former Member
0 Likes
1,068

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
Read only

tarangini_katta
Active Contributor
0 Likes
981

Hi,

Have u used the BAPI_TRANSACTION_COMMIT after calling the BAPI.

Thanks,

Read only

0 Likes
981

hi katta

i'm using C# proxy.CommitWork

Thanks

Read only

Former Member
0 Likes
981

chck the purchasing view, and set the status if needed

Read only

0 Likes
981

Hi

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

Thanks

Read only

0 Likes
981

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

Read only

Former Member
0 Likes
981

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

Read only

0 Likes
981

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