‎2008 Nov 25 9:16 AM
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?
‎2008 Nov 25 9:23 AM
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.
‎2008 Nov 25 9:19 AM
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
‎2008 Nov 25 9:21 AM
What is the structure or parameter we pass the classes and characteristics
‎2008 Nov 25 9:23 AM
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.
‎2008 Nov 25 9:24 AM
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
‎2008 Nov 28 4:50 AM
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.