2009 Feb 16 10:42 AM
Dear Experts,
I am inserting a BOM Item into a Sales Order BOM. The material in the SO is a VC Configurable Material and hence I am using the Configurator API's ( CAVC API's Tcode CAVC_TEST).
The process that I am following is
Step 1 : Initiate BOM using FM CAVC_O_ORDER_BOM_INIT
Step 2 : Find the child instances for the SO BOM using FM CAVC_I_SELECT_CHILDS
Step 3 : Insert BOM Item using CAVC_I_INSERT_BOM_ITEM for one of the child instance found above.
Step 4 : Save the BOM using FM CAVC_O_ORDER_BOM_SAVE
The parameters I pass while inserting the BOM Item are
wa_bom_item_data-item_categ = 'N'.
wa_bom_item_data-component = '3GZF101011M111'.
wa_bom_item_data-comp_qty = 1.
wa_bom_item_data-comp_unit = 'PC'.
wa_bom_item_data-valid_from = sy-datum.
After Saving, the BOM Item gets created under that particular Child Instance.
But the problem is that the Valid From Date that I pass(current date) on to the FM is not considered and a date(future) of its own gets saved.
Where as if I use tcode CS62 to create the BOM Item, current date is taken as the Valid From date.
Pls help me find a solution.
thanks,
Jinson.
2009 Feb 16 11:48 AM
2009 Feb 16 12:18 PM
are you using ECM while creating this BOm items.
if yes check the ECM valid from date.
the date passed by you will be overwritten by the ECM valid from date.
2009 Feb 16 12:22 PM
Hi Jinson,
Check the STPO table once whether it is updated or not.
In the past when I tried to upload BOM I used CS01.
So Check once again whether you are missing any flags in your Function module parameters.
Thanks & Regards,
Dileep .C
2009 Feb 16 12:25 PM
2009 Feb 16 12:41 PM
Hi,
check the function mod in CAVC_TEST if it is working there.
Thanks,
Krishna..
2009 Mar 18 4:59 AM
Resolved.
Pass the iv_date parameter as current date to the Function Module CAVC_O_ORDER_BOM_INIT.
This date will be taken as the Valid From date for BOM components.
CALL FUNCTION 'CAVC_O_ORDER_BOM_INIT'
EXPORTING
order = gv_trgvbeln
order_pos = gv_trgposnr
iv_date = lv_curdate
IMPORTING
instance = wa_instance
return = wa_return.
regards,
Jinson.