01-05-2023 6:33 AM
Hi Experts Good Morning,
I have Created Program for Equipment Master Update for that I have used BAPI(BAPI_EQUI_CHANGE)
after using this each and every fields are getting updated successfully Except warranty Details.
I have searched and used lot of BAPI but nothing is working so kindly suggest me BAPI Name to update warranty details in IE02 using ABAP codes.
Thank You
Regards
Jayaprkash AK
01-05-2023 9:14 AM
Hello akjayaa
Indeed, it looks like BAPI_EQUI_CHANGE doesn't support warranty details fields. However it supports customer custom fields fields with BADI_EAM_ITOB_BAPI_CUST_FIELDS enhancement. So you can pass warranty details to the BAPI in the EXTENSIONIN table and move them from EXTENSIONIN to the equipment data with the BADI implementation.
The BADI is called in the BAPI as follows:
***** begin note 2146575 - customer fields
* call BAdI for mapping of EXTENSIONIN to ITOB
DATA: lr_badi TYPE REF TO badi_eam_itob_bapi_cust_fields.
TRY.
GET BADI lr_badi.
IF lr_badi IS BOUND.
CALL BADI lr_badi->extensionin_equi_change
EXPORTING
is_object_old = l_itob_rec_old
is_fleet_old = l_fleet_rec_old
iv_valid_date = valid_date
iv_valid_time = valid_time
it_extensionin = extensionin[]
CHANGING
cs_object = l_itob_rec
cs_fleet = l_fleet_rec
cs_return = return.
ENDIF.
CATCH cx_badi_not_implemented.
ENDTRY.
Warranty details are available in L_ITOB_REC, so you can modify them with the enhancement.
Best regards
Dominik Tylczynski
01-05-2023 9:14 AM
Hello akjayaa
Indeed, it looks like BAPI_EQUI_CHANGE doesn't support warranty details fields. However it supports customer custom fields fields with BADI_EAM_ITOB_BAPI_CUST_FIELDS enhancement. So you can pass warranty details to the BAPI in the EXTENSIONIN table and move them from EXTENSIONIN to the equipment data with the BADI implementation.
The BADI is called in the BAPI as follows:
***** begin note 2146575 - customer fields
* call BAdI for mapping of EXTENSIONIN to ITOB
DATA: lr_badi TYPE REF TO badi_eam_itob_bapi_cust_fields.
TRY.
GET BADI lr_badi.
IF lr_badi IS BOUND.
CALL BADI lr_badi->extensionin_equi_change
EXPORTING
is_object_old = l_itob_rec_old
is_fleet_old = l_fleet_rec_old
iv_valid_date = valid_date
iv_valid_time = valid_time
it_extensionin = extensionin[]
CHANGING
cs_object = l_itob_rec
cs_fleet = l_fleet_rec
cs_return = return.
ENDIF.
CATCH cx_badi_not_implemented.
ENDTRY.
Warranty details are available in L_ITOB_REC, so you can modify them with the enhancement.
Best regards
Dominik Tylczynski