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: 

To create a Material using BAPI with out passing the material number

Former Member
0 Kudos

Hello Experts,

I am using BAPI_MATERIAL_SAVEDATA to create a material of some Ztype. I am successfully creating a material if I am passing Material Number as input. I want the material number to generated internally.

When I am doing material creation with same input data with out material number using BDC, it is working fine. It is generating the material number.

But, not with the BAPI.

Do, I need to specify this some where in the BAPI to generate the Material number internally? Please let me know.

Please help me in this regard.

Thanks & Regards,

Naresh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Read the BAPI documentation regarding Internal Number range for materials.

When you create material master data, the following fields must always
contain a value in the structure:

o   MATERIAL
    Only external number assignment is supported for the material number
    (MATERIAL). If you want the material number to be assigned
    internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
    called. This method determines an internal number for the material
    to be created. You must enter this internal number in field
    HEADDATA-MATERIAL.

Regards

Vinod

2 REPLIES 2

Former Member
0 Kudos

Hi,

Read the BAPI documentation regarding Internal Number range for materials.

When you create material master data, the following fields must always
contain a value in the structure:

o   MATERIAL
    Only external number assignment is supported for the material number
    (MATERIAL). If you want the material number to be assigned
    internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
    called. This method determines an internal number for the material
    to be created. You must enter this internal number in field
    HEADDATA-MATERIAL.

Regards

Vinod

0 Kudos

Thank..you Vinod.

You solved my problem.