2012 Jan 05 8:06 AM
Hi ,
I am developing a conversion program to upload the class and characteristics to a BOM item . The class type is a custom class which needs to be assigned to the BOM item along with the class and characteristics value . Is there any FM/Bapi which can create the classtype for the BOM item and assign the class and values . I have tried with the FM 'BAPI_OBJCL_CREATE' but was not successful. Any help would be highly appreciated .
Sanjeev
2012 Jan 05 10:30 AM
Hi,
"CSAP_MAT_BOM_CREATE" is the FM used to create BOM.
Thanks & Regards,
Goutam Kolluru.
2012 Jan 05 11:49 AM
Hi,
Use the same FM BAPI_OBJCL_CREATE
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = " Material Number
objecttablenew = 'MARA'
classnumnew = " Class name
classtypenew = '001'
STATUS = '1'
Keydate = " date
and pass remaining necessary parameters.
I hope it will helps you
2012 Jan 05 12:21 PM
this program can create bom succcess.but add stpu(subitem) ,have some problem.
REPORT ZPDM_CREATEBOM .
DATA: i_stko like STKO_API01.
data: T_STPO like table of STPO_API01 WITH HEADER LINE.
data: T_STPU like table of STPU_API01 WITH HEADER LINE.
data: BOM_HEADER like BICSK.
DATA: return TYPE char100,
return2 TYPE char100.
i_stko-BASE_QUAN = 1.
T_STPO-ITEM_CATEG = 'L'.
T_STPO-ITEM_NO = '0010'.
T_STPO-COMPONENT = '52008022702'.
T_STPO-COMP_QTY = '10'.
APPEND T_STPO.
T_STPO-ITEM_CATEG = 'L'.
T_STPO-ITEM_NO = '0020'.
T_STPO-COMPONENT = '52008022701'.
T_STPO-COMP_QTY = '20'.
APPEND T_STPO.
T_STPU-POINTER = 20.
T_STPU-UPOSZ = '0001'.
T_STPU-EBORT = 'A1'.
T_STPU-UPMNG = '10'.
APPEND T_STPU.
T_STPU-POINTER = 20.
T_STPU-UPOSZ = '0002'.
T_STPU-EBORT = 'A2'.
T_STPU-UPMNG = '10'.
APPEND T_STPU.*
CALL FUNCTION 'CSAP_MAT_BOM_CREATE'
EXPORTING
material = 'FERT005'
PLANT = '1000'
bom_usage = '1'
VALID_FROM =
CHANGE_NO = 'ECO200909096'
REVISION_LEVEL =
i_stko = i_stko
FL_NO_CHANGE_DOC = ' '
FL_COMMIT_AND_WAIT = ' '
FL_CAD = ' '
FL_DEFAULT_VALUES = 'X'
IMPORTING
FL_WARNING =
BOM_NO =
TABLES
T_STPO = T_STPO
T_DEP_DATA =
T_DEP_DESCR =
T_DEP_ORDER =
T_DEP_SOURCE =
T_DEP_DOC =
T_LTX_LINE =
T_STPU = T_STPU
EXCEPTIONS
ERROR = 1
OTHERS = 2
.