We are trying to create Ibase individual product for an Equipment which is replicating from ECC. we are able to create ibase using CRM_EQUI_LOAD badi but here the problem is we are not able to add warranty through this badi.
we have only few warranty products in CRM like WTY_12, WTY_18 etc. This warranty product should add to ibase individual object as warranty.
With using CRM_IBCWTY_IL_API_CREATE function module we are trying to add this warranty.
*here is the Code
ls_product_id = 'WTY_12'. "Default warranty product
SELECT SINGLE product_guid FROM comm_product INTO ls_warranty_guid
WHERE product_id = ls_product_id.
is_interlinkage_to_create-warranty_guid = ls_warranty_guid.
is_interlinkage_to_create-start_date = LV_WFDATE. "warranty start date
* is_interlinkage_to_create-START_DATE_RULE = ' '.
is_interlinkage_to_create-end_date = LV_WTDATE. "warranty end date
is_interlinkage_to_create-END_DATE_RULE = 'WTY001'.
is_interlinkage_to_create-determine_dates = 'X'.
append is_interlinkage_to_create to it_interlinkage_to_create.
lv_object_reference = '04'. "individual object
lv_object_guid = ls_comp-guid_compc. "guid of ibase.
CALL FUNCTION 'CRM_IBCWTY_IL_API_CREATE'
IV_OBJECT_GUID = lv_object_guid
IV_OBJECT_REFERENCE = lv_object_reference
* IV_TIMESTAMP =
* IV_ENQMODE = 'E'
* IV_RAISE_EXCEPTION = ' '
* IV_SAVE = 'X'
IT_INTERLINKAGE_TO_CREATE = it_interlinkage_to_create
ET_MESSAGES = it_messages
ET_INTERLINKAGE = it_interlinkage
ERROR_OCCURRED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* Implement suitable error handling here
with this code we are not able to adding the warranty. Please help me in this. Thank you.
One more thing I have created a custom implementation for CRM_EQUI_LOAD badi and this custom implementation is in active and standard implementation is in inactive. should I activate standard one also or not. Thank you.