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: 

Problems in Valid From Date while Inserting BOM Item

Former Member
0 Kudos
267

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.

6 REPLIES 6

Former Member
0 Kudos
89

check the CHNAGE number valid dates and Class valid dates.

Former Member
0 Kudos
89

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.

Former Member
0 Kudos
89

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

Former Member
0 Kudos
89

Hi Jinson,

Regards,

Sravanthi

Former Member
0 Kudos
89

Hi,

check the function mod in CAVC_TEST if it is working there.

Thanks,

Krishna..

Former Member
0 Kudos
89

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.