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

Convert structures for BAPI_SAVE_MATERIAL

juergen_lanvers
Explorer
0 Likes
2,261

Hi Folks,

I have to use BAPI_SAVE_MATERIAL for creating/updating material. I get the data for the material from an old customer function which give me back the data in structure mara, marc .... So, is there a function which converts the data from mara to bapi_mara and so on? I know, i'm lazy 😉

Thanks for your help.

Juergen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,053

Hi Jurgen,

You can Create your Custom FM based on "MAP2I_BAPI_MARA_TO_MARA_UEB" Standard FM.

Just Reverse to Making Custom One .

Regard's

Smruti

8 REPLIES 8
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,053

There is no BAPI_SAVE_MATERIAL in our system, did you mean BAPI_MATERIAL_SAVEDATA?

I'm lazy too, but I ran 'where used' for BAPI_MARA (took me less time than typing this) and found no such functions, sorry!

Read only

0 Likes
2,053

Hi Jelena,

sorry, of course i meant BAPI_MATERIAL_SAVEDATA.

Read only

0 Likes
2,053

Can you explain briefly your requirement., so that I can try helping you.

Read only

Former Member
0 Likes
2,053

Are you looking for this FM -BAPI_MATERIAL_UPLOAD_SAVE or BAPI_MATERIAL_SAVEDATA depending on your requirement, since both creates a material.

Read only

juergen_lanvers
Explorer
0 Likes
2,053

Hi Raja,

to provide compatibility I have to use an old customer function. This returns values for material in structures mara_ueb, marc_ueb .... With this values i want to create the material using BAPI_MATERIAL_SAVEDATA. Therefore i have to move the values of e.g. mara_ueb into the structure bapi_mara. My hope is that there is a function like MAP2E_MARA_TO_BAPIMATMRA doing this job for me.

Thanks in advance...

Read only

Former Member
0 Likes
2,053

Sorry but the answer is NO

Read only

Former Member
0 Likes
2,054

Hi Jurgen,

You can Create your Custom FM based on "MAP2I_BAPI_MARA_TO_MARA_UEB" Standard FM.

Just Reverse to Making Custom One .

Regard's

Smruti

Read only

0 Likes
2,053

Hi Smruti,

thanks, that was a good hint. I found the transaction BDBS which generates function modules for converting between int. und ext. structures.