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

Material Master

Former Member
0 Likes
747

We used BAPI to create material master and its working.

Now new classes and characteristics were created and they have to be attached to the existing material.

How do we do this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
704

Hi

If you want to add only class to material then use CL20N tcode.

If you want to add both class and characteristics to a material then use CL24N.

Regards,

Vishwa.

5 REPLIES 5
Read only

Former Member
0 Likes
704

Try Using these

BAPI_MATERIAL_SAVEDATA Create and Change Material Master Data

BAPI_STANDARDMATERIAL_CREATE Create/Extend Material

BAPI_MATERIAL_EDIT Change Material

Regards,

Prashant

Read only

0 Likes
704

What is the structure or parameter we pass the classes and characteristics

Read only

Former Member
0 Likes
705

Hi

If you want to add only class to material then use CL20N tcode.

If you want to add both class and characteristics to a material then use CL24N.

Regards,

Vishwa.

Read only

Former Member
0 Likes
704

hi

try out following bapi's

if it MM01 then BAPI_MATERIAL_SAVEDATA

if it is sales order then

BAPI_SALESORDER_CREATEFROMDAT1

BAPI_SALESORDER_CREATEFROMDAT2

if it is Purchase Requisition

then BAPI_REQUISITION_CREATE

hope this helps

regards

Aakash Banga

Read only

Former Member
0 Likes
704

try BAPI_OBJCL_CHANGE

here are few lines from FM documentation. go thru the function module documentation in SE37.

This BAPI changes an existing classification, or creates the classification if it does not yet exist. The classification is defined by the required entry fields for the object key (ObjectKey), object table (ObjectTable), class name (AllocDetail-Class_Num), and class type (AllocDetail-Class_Type).

This BAPI only changes the parameters of an existing assignment (or creates a whole new assignment), but it does not delete the assignment to a class and replace it with an assignment to another class. If you want to reassign an object, the old assignments must be read with BAPI_OBJCL_GETCLASSES and deleted with BAPI_OBJCL_DELETE, then the new assignments must be created with BAPI_OBJCL_CREATE.

The information transferred by this BAPI replaces all old information. An empty field means "delete entry!", not "no change".

This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.