BAdI to handle synchronized material data

The BAdI /AEB/TA_CLS_SYNC_01 is called every time a classification value is received from the Product Classification Engine, which is every time the classification value was changed. The BAdI /AEB/TA_CER_SYNC_01 is the same for the certificates.

In both BAdIs you have a method that says that the data is updated (Inserted or updated) and one method if the data is deleted.

Both BAdI supports the raising of the exception /aeb/cx_ta_pb_mat_sync_sc as it is described under https://sap-plugins.docs.developers.aeb.com/docs/exceptions. When the exception is raised, then the complete handling (also the standard handling) of the material is considered as failed, which means there will be an entry created in the function call monitor which can be automatically repeated with the report /AEB/01_FCC_RETRY if the customizing is done. When this repeat happens (either automatically by the report or manually by a user in the function call monitor) then the whole material is transferred from the Product Classification engine and processed and also this BAdI will be called again.

METHOD /aeb/if_ex_ta_cls_sync_01~hdl_classification_updated.
    WRITE im_je_cls_value_do->get_approved( ).
    WRITE im_je_cls_value_do->get_engn_client( ).
    WRITE im_je_cls_value_do->get_engn_dest( ).
    WRITE im_je_cls_value_do->get_material_no( ).
    WRITE im_je_cls_value_do->get_object_id( ).
    WRITE im_je_cls_value_do->get_processing_comment( ).
    WRITE im_je_cls_value_do->get_type_name( ).
    WRITE im_je_cls_value_do->get_valid_from( ).
    WRITE im_je_cls_value_do->get_valid_to( ).
    WRITE im_je_cls_value_do->get_value( ).

    RAISE EXCEPTION TYPE /aeb/cx_ta_pb_mat_sync_sc.
  ENDMETHOD.
METHOD /aeb/if_ex_ta_cer_sync_01~hdl_certificate_updated.
    write im_je_certificate_do->get_cert_additional_expl( ).
    write im_je_certificate_do->get_cert_date_of_issue( ).
    write im_je_certificate_do->get_cert_detail( ).
    write im_je_certificate_do->get_cert_end_of_validity( ).
    write im_je_certificate_do->get_cert_reference( ).
    write im_je_certificate_do->get_country_of_certificate( ).
    write im_je_certificate_do->get_division( ).
    write im_je_certificate_do->get_engn_client( ).
    write im_je_certificate_do->get_engn_dest( ).
    write im_je_certificate_do->get_geo_id( ). 
    write im_je_certificate_do->get_material_no( ).
    write im_je_certificate_do->get_object_id( ).
    write im_je_certificate_do->get_type_code( ).
    write im_je_certificate_do->get_type_qualifier( ).
    write im_je_certificate_do->get_valid_from( ).
    write im_je_certificate_do->get_valid_to( ).
    
    raise EXCEPTION type /aeb/cx_ta_pb_mat_sync_sc.
  ENDMETHOD.