Hi all,
I have currently using BADI PRODUCT_CUSTOMER2 with method MAP_R3_TO_CRM_MATERIAL. I have done the coding and required configuration. I suppose to be able to see the changes done in COMMPR01 in CRM from MM02 in R3. However, I fail to see the changes at CRM.
I have read through note 428989 for the mapping instruction. During debugging, I manage to see all the changes done in R3 at the CRM side.. until the populating part, everything looks fine and okie for me. But when everything gone through, including the SMQ2 ibound queue finish running, i still fail to see the changes.
Below is the populating code that i have implemented in the badi, anyone can give me some advice on the code (basically the code refer to the reference file). Do i need to include some extra field or table at the populating part. Thanks.
begin of mapping data into bdoc:
LOOP AT lt_cat_settype_rel_all INTO ls_cat_settype_rel.
read comc_settype record:
CALL FUNCTION 'COM_SETTYPE_READ_SINGLE'
EXPORTING
iv_settype_guid = ls_cat_settype_rel-frgtype_guid
IMPORTING
es_settype = ls_settype
EXCEPTIONS
not_found = 1
no_import_values = 2
no_text_found = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
CONTINUE.
ENDIF.
CASE ls_settype-frgtype_id.
WHEN lc_zxe_843_kgen.
ls_zxe_843_kgen-relation-owner = 'X'.
ls_zxe_843_kgen-relation-logsys = cs_product_bdoc-header-com_product-logsys.
ls_zxe_843_kgen-data-zz0010 = ls_zisc_mara_data-zzlead.
ls_zxe_843_kgen-data-zz0011 = ls_zisc_mara_data-zzamr.
ls_zxe_843_kgen-data-zz0012 = ls_zisc_mara_data-zzasr.
ls_zxe_843_kgen-data-zz0013 = ls_zisc_mara_data-zzlmang.
ls_zxe_843_kgen-data-zz0014 = ls_zisc_mara_data-zzmmang.
APPEND ls_zxe_843_kgen TO cs_product_bdoc-data-zxe_843_kgen.
APPEND ls_settype-frgtype_id TO cs_product_bdoc-data-mnt_settype.
ENDCASE.
ENDLOOP.
ENDCASE.
ENDLOOP.
Any help or idea is very much appreciated. Thanks.
Any doubt can always drop me a message as well.