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

/SAPMP/BAPI_MATERIAL_SAVEDATA return error

umberto_panico
Participant
0 Likes
626

Hi to All,

I'm using the BAPI /SAPMP/BAPI_MATERIAL_SAVEDATA but return the following error:

"Material number xxxxxxxxx" does not exist on the database

Have you idea?

Please, help me.

Thanks & Regards,

Umberto

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
564

Hi,

Are you passing material number as it is to function module.

For example if material number is '12345' then if you pass this as it is then you may encounter with such error. Material length is 18, you should pass 18 lenth material number to BAPI, like, 000000000000012345.

Use conversion exit before passing material number to BAPI.

DATA : V_MATNR TYPE MATNR.

V_MATNR = '12345'.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

EXPORTING

INPUT = V_MATNR.

IMPORTING

OUTPUT = V_MATNR.

Then pass this V_MATNR to BAPI.

3 REPLIES 3
Read only

Former Member
0 Likes
565

Hi,

Are you passing material number as it is to function module.

For example if material number is '12345' then if you pass this as it is then you may encounter with such error. Material length is 18, you should pass 18 lenth material number to BAPI, like, 000000000000012345.

Use conversion exit before passing material number to BAPI.

DATA : V_MATNR TYPE MATNR.

V_MATNR = '12345'.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

EXPORTING

INPUT = V_MATNR.

IMPORTING

OUTPUT = V_MATNR.

Then pass this V_MATNR to BAPI.

Read only

0 Likes
564

Hi,

Can you please let me know whethere this has solved your problem

Read only

0 Likes
564

Hi Ramesh,

thanks a lot.

Now work fine

Best Regards,

Umberto