MAP R3 to CRM  Material Master  -- Urgent

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.

Use the below code for your req.
CONSTANTS:
      c_on TYPE comt_boolean VALUE 'X',
      c_off TYPE comt_boolean VALUE ' ',
      C_PROD_XPORT(20) type C VALUE 'ZCOM_MANUFAC',
      c_mara(4)     TYPE c VALUE 'MARA'.
                             Work Areas                              *
  DATA: str_category_bdoc       TYPE comt_prod_cat_rel_maintain,
        str_category            TYPE comt_prod_cat_rel,
        str_settype             TYPE comt_settype_ext,
        str_cat_settype_rel     TYPE comt_cat_frag_rel,
        str_comm_category   TYPE comm_category,
        str_comm_prprdcatr  TYPE comm_prprdcatr,
        str_ZPROD_XPORT  type ZCOM_TA_MANUFAC_MAINTAIN,
        str_other_info      TYPE  bapiextc.
  DATA: begin of str_com_mara,
           bismt(18) type c,
        end of str_com_mara.
                            Internal Tables                          *
  DATA: it_categories          TYPE comt_prod_cat_rel_tab,
        it_cat_settype_rel     TYPE comt_cat_frag_rel_tab,
        it_cat_settype_rel_all TYPE comt_cat_frag_rel_tab.
                            Field Symbols                            *
  FIELD-SYMBOLS:
            <source_x> TYPE x,
            <target_x> TYPE x.
*Get all categories related to the product from CRM online:
  CALL FUNCTION 'COM_PROD_CAT_REL_READ_WITH_PR'
    EXPORTING
      iv_product_guid  = cs_product_bdoc-header-com_product-product_guid
      iv_update_buffer = space
    IMPORTING
      et_set           = it_categories.
*Add all categories related to the product from BDOC:
  LOOP AT cs_product_bdoc-header-categories INTO str_category_bdoc.
    MOVE-CORRESPONDING str_category_bdoc-data TO str_category.
    READ TABLE it_categories
         WITH KEY hierarchy_guid = str_category-hierarchy_guid
         TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
      MODIFY it_categories FROM str_category INDEX sy-tabix.
    ELSE.
      APPEND str_category TO it_categories.
    ENDIF.
  ENDLOOP.
  LOOP AT it_categories INTO str_category.
*Get category set type relations:
    CALL FUNCTION 'COM_CAT_FRAG_REL_READ'
      EXPORTING
        iv_category_guid = str_category-category_guid
      IMPORTING
        et_cat_frag_rel  = it_cat_settype_rel
      EXCEPTIONS
        wrong_call       = 1
        OTHERS           = 2.
    IF sy-subrc = 0.
      APPEND LINES OF it_cat_settype_rel TO it_cat_settype_rel_all.
    ENDIF.
      ENDLOOP.
    DELETE ADJACENT DUPLICATES FROM it_cat_settype_rel_all.
*Getting the info into the Set Types.
    LOOP AT it_cat_settype_rel_all INTO str_cat_settype_rel.
      CALL FUNCTION 'COM_SETTYPE_READ_SINGLE'
        EXPORTING
          IV_SETTYPE_GUID  = str_cat_settype_rel-frgtype_guid
          IV_LANGU         = SY-LANGU
        IMPORTING
          ES_SETTYPE       = str_settype
        EXCEPTIONS
          NOT_FOUND        = 1
          NO_IMPORT_VALUES = 2
          NO_TEXT_FOUND    = 3
          OTHERS           = 4.
      IF sy-subrc <> 0.
        CONTINUE.
      ENDIF.
      CASE str_settype-frgtype_id.
        WHEN C_PROD_XPORT.                           "Set Type Name 'ZCOM_MANUFAC'                "'ZTM_PROD_XPORT'
          str_zprod_xport-relation-owner   =  c_on.
          str_zprod_xport-relation-logsys  = cs_product_bdoc-header-com_product-logsys.
*Polutate MARA Fields
*Get the info record using Communication Structure 1
*Table Name and Material Number ( struc = 'MARA' and matnr = current material number )
          LOOP AT it_other_info INTO str_other_info
                     WHERE field1(20)  = C_MARA
                     AND   field1+20(18) = is_mara-material.
          ENDLOOP.
*Get data from Communication Structure 2 ( Old Material Number )
          ASSIGN str_other_info-field2 TO <source_x> CASTING.
          ASSIGN str_com_mara          TO <target_x> CASTING.
          IF <source_x> IS ASSIGNED AND
               <target_x> IS ASSIGNED.
            <target_x> = <source_x>.
          ELSE.
            CONTINUE.
          ENDIF.
*Assign the data from Communication Structure 2 ( Manufacturer Part Number ) to the corresponding field in set type structure.
          str_zprod_xport-data-ZZ0014 = str_com_mara-bismt.
          APPEND str_zprod_xport TO cs_product_bdoc-data-ZCOM_MANUFAC.
          APPEND str_settype-frgtype_id TO cs_product_bdoc-data-mnt_settype.
      ENDCASE.
    ENDLOOP.
  endmethod.
We have implemented the similar functionality in our project.
Reward points If it helps.

Similar Messages

  • CRM material master valuation category

    hi,
      I replicated material master data from ERP to CRM. 10000016 Material  has 3 valuation category in ERP. But valuation category in the financial 1 tab doesn't replicate to CRM. While I create service order with 10000016 material , how can I know which valuation category is used?
    i would appreciate you help.
    thanking you
    Regards

    Hi,
    It's solved.
    Unfortunately you will have to add the field in CRM as it is not
    contained in standard system.
    Also you add the field in CRM and then do the mapping to the same field
    in R/3. You can use the data exchange BADI to do this CRM_DATAEXCHG_BADIThis is your own responsibility
    however.

  • Material Ledger not activated in Material Master--Urgent

    Dear Gurus,
    We have created Material Master  of Project Material With tag "Do NOT Cost" but Material ledger not get activated. although In plant material Ledger  is activated .
    Can any body Help to find out solution
    Regrds
    Mahesh
    *Assign full marks

    >
    Kishore Kumar Chiluka wrote:
    > Hi
    >
    > Please get in touch with your BASIS consulatant , as the updates are not performing rightly, this seems to be asystem error.
    >
    > Thanks & Regards
    >
    > Kishore
    Thanks a lot Kishore.
    But unfortunately we don't have any Basis Guy separately. I was doubling up as Basis as well APO in my org . I'm pretty new to all these stuff. I searched in help.sap.com about this a lot, but couldn't find anything useful.
    Can you help me in identifying a solution to this problem?
    Thanks,
    Rajesh Manoharan

  • Material Master - Urgent

    Hi Abapers,
    There is an issue needing resolution relating to the functionality for handling UPC codes and GTIN numbers on the material master record.
    we need to carry both the UPC code and the GTIN codes on the same record. The UPC code is  typically a 12 digit number and the GTIN code is the same number of length 14 by adding two leading zeros.
    SAP is checking numbers being entered in the EAN/UPC field on Basic Data 1 screen of the material master record (MARA-EAN11) as absolute number only i.e.., its considering 49000024661 even if we give 00049000024661.
    How can we maintaing leading zeros for this field. referred OSS note: 545520 but couldnt find any solution.
    Please suggest as what need to be done inorder to maintain leading zeros as well. how can we achieve this?
    Does it require abap coding or functional configuring?
    Please do the needfull. Points are sure for all usefull answers..
    Thanks in advance...

    Hi,
    In programs  u can use func modules
    CONVERSION_EXIT_ALPHA_INPUT
    CONVERSION_EXIT_ALPHA_OUTPUT.
    For changing number assignment to mm01 check these exits.
    Enhancement/ Business Add-in            Description
    Enhancement
    MGA00001                                Material Master (Industry): Checks and Enhancements
    MGA00002                                Material Master (Industry): Number Assignment
    MGA00003                                Material Master (Industry and Retail): Number Display

  • MAP value negative in material master

    Hi,
    I am facing problem with few materials where the stock exists but the MAP value is negative.
    Movements 101,102,201,261 has taken place. Checked the material documents and did not find any problem in any of the movements.
    Is changing the MAP value in MR21 is advicable?? Will this create any problem in FI accounting??
    Pls advice.
    Regards,
    Radha

    HI,
    What is that material type.
    Check is there any sales against that material with less cost of MAP .
    The system shows that less amount as negative from the finanace point of view.
    So check any salaes docs agianst that material.
    Regards,
    Andra

  • Middleware settings to map CRM Z table fields with ECC material master flds

    Hi,
    We want to create  a Z table in CRM,this table willl have 2 fields External Material Group and Old Material Number.These 2 fields in CRM table are corresponding to same material master (MM03) fields in ECC.The changes to these fields done in ECC material master should be updated in CRM Z table.
    I want to understand the middleware settings I need to do in order to map the ECC and CRM fields.
    Thanks in advance for your help
    Swapnil

    Hi Swapnil,
    I am new to Middleware, I am also having same requirement , can you please tell me the process how you resolved this thread.
    Thanks in advance,
    Regards,
    Santosh.

  • No Material Master replication from R/3 to CRM

    Hallo guys,
    i've got no replication of material master, haven't tried any other object except customizing but customizing is triggered from CRM and was replicated fine. Can anybody help me how can i debug the replication process from R/3?
    Thanks for your help in advance.

    Dmitry,
    You first need to determine where your errors are happening?
    1.  Do you have blocked queues on CRM?  If you see a blocked inbound/outbound queue on CRM via SMQ1 or SMQ2, then you can try to rerun the BDOC message in the queue.
    2.  Is there tax code customizing not downloaded correctly into CRM?  This sometimes can hang up your download of materials?
    3.  Have you looked at SMW01 after the load to see if you have any BDOC's in error, the queues were empty?
    4.  What is the status of the initial load R3AM1?
    I would hold off from debugging until I figure out where in the download process that I am receiving the error.  Once I know that fact them I can debug a single download.  You will have to set a filter on the material object to a single material and attempt an initial download.  When you perform the initial download you will need all queues deregistered on the CRM side, so that you manually execute the BDOC import into CRM. 
    The last step will require placing a breakpoint into the validation function module for material.
    I believe validation function module is: COM_PRODUCT_MAT_VALIDATE.  If you have questions along the way of debugging the flow, please reply back and I will try to see if I can answer them.  It has been a little while since I had to debug our middleware downloads.
    Good Luck,
    Stephen

  • Replication of Customer and Material master from R/3 to CRM

    Hi
    Recently in our quality server basis administrator has made a client copy from production server after that customer master and material master are not flowing from R/3 to CRM, even sales orders were not getting copied from CRM to R/3 , i went through C71 BB config document and fixed the sales orders updation from CRM to R/3 but not able to resolve the problem of customer master and material master from ECC to CRM.
    I went to B09 BB document and all settings are fine.
    Using R3AS I have loaded following objects DNL_CUST_PROD0, PROD1, PROD3, SPROD , DNL_PLANT. and Material.
    I went to R3AM1 and checked the status as running or wait for each object.
    There are no filters in R3AC1 .
    Queue name withR3AD_MATERIA0000000001 has status SYSFAIL in SMQ2  .
    What can i do to resolve this problem.
    Please advice.
    Thanks,
    Vaishnavi

    Hello Vaishnavi,
    After the client copy , have you run txn:BDLS in order to change the LOGSYS in all relevant tables?
    You can run this txn in test mode as well to see the affected tables.
    Are you getting any dump on these load ?Check it in txn:ST22.
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • Material Master replication ... ECC to CRM

    I have a requirement to replicate a material master record from ECC to CRM, based upon an 'external event' (i.e. an event other than the change of the material master record itself, in ECC).    The event is the change in status of a record in a z-table. 
    What is the best way to accomplish this?  Is there a function module or BAPI that I can call, to trigger the replication of a material to CRM, whenever this event occurs?    Are there other suggested / better approaches to satisfying this requirement?
    Your help will be much appreciated!
    Thanks,
    Duane

    If your CRM system is new then you have to do the initial download of material from ECC to CRM. To do that first download the material customizing object (like category. group etc), from transaction R3AS (CRM side) then download the product/Material.
    After do the initial download, activate the change pointer for the material related message type (matmas etc..)from transaction SALE (ECC). And schedule I job to run its on daily basis.
    If can check the below link for details
    [http://help.sap.com/saphelp_crm52/helpdata/EN/46/57605301a208e7e10000000a114a6b/content.htm]
    Thanks
    Subhankar
    Edited by: Subhankar Garani on Sep 1, 2011 12:21 AM

  • Using the APD to update material master in CRM

    Does anybody know if it is possible to update material master records in CRM from BW using the Analyses Process Designer with target CRM?
    I would prefer to know this before creating a custom data target adapter in the CRM SPRO, writing all the required function modules and then finding out that it does not work.
    Thanks,
    József.

    Which direction??
    Inbound/Outbound
    Inbound : IDOC_INPUT_MATMAS01

  • MAP for the material in material master

    Hi All
    I have problem in moving average price of a model in material master
    Example.
    Material - ABC in material master
    Moving average price - $10 
    total stock- 5                                       Toatl Value--$50
    now i have sub con Po for material ABC(header) 10 Qty and item material DEF 10 Qty
    Net price for header is Zero here. but item material price will be $10
    after making the Gr for the sub con Po is the moving price of material ABC need to change as shown below or remains same.
    Moving average price - $10
    total stock- 510                                      Toatl Value--$50100
    Thanks
    Regards
    Manju

    hi,
    u have done subc po for which material , its raw mat or semifin or finished
    if u have created s po for semi material then, when u made gr then the material price will change as map is maintained in the material master.
    but if it is finished product then the price of the material is same, bcs, standard price should be maintain in material master.
    hope, this will clarify ur question,
    regards,
    susanta

  • Uploading material master from R/3 to CRM problem

    Hi Experts,
    I am new to the Middleware
    I have downloaded the material master from R/3 to CRM but I am not able to see the downloaded products in CRM.
    I have checked the queue of R/3 there is no error.
    I even checked the queue of CRM there is no error.
    When I see in SMW01 the status is green and
    BDoc. Error message is showing “Mat. for Initial Download: Function table not supported”
    Can anybody give me suggestions?
    I will reward the points

    i have checked the filters
    i have down the following settings
    Request Name     MATERIAL
    Table Name       MARA
    Field Name       MATNR
    Incl/Excl      Inclusive defined set/array
    Option           Greater or equal then (>=Low)
    Low              a1(r/3 material no.)
    even thin i did not get the result
    i have the same error that is
    "Mat. for Initial Download: Function table not supported"
    help me out it is very urgent

  • Return PO Price is picked up from MAP of materia master,not from info.recod

    User Requirement :
    When creating return po ,the price is picked up from MAP of material master ,not from info.record
    I wrote a code at PO Enhancement "MM06E005" user exit  "EXIT_SAPMM06E_017",but don't change the price ,pls help me check what  the problem is ,thanks.
    The below is my code.
    DATA : M_VERPR LIKE MBEW-VERPR,
           M_PEINH LIKE MBEW-PEINH,
           M_MEINS LIKE MARA-MEINS.
    CLEAR :M_VERPR,M_PEINH,M_MEINS.
    CHECK SY-TCODE = 'ME21N ' OR   SY-TCODE = 'ME22N' OR   SY-TCODE = 'ME23N' .
    IF I_EKKO-BSART = 'ZNB7'.
        LOOP AT TEKPO.
      SELECT SINGLE VERPR PEINH FROM MBEW INTO (M_VERPR,M_PEINH)
                                             WHERE MATNR = I_EKPO-MATNR AND BWKEY = I_EKPO-WERKS.
        SELECT SINGLE MEINS FROM MARA INTO M_MEINS WHERE MATNR = I_EKPO-MATNR.
        TEKPO-INFNR = '  '.
        TEKPO-NETPR = M_VERPR.
        TEKPO-PEINH = M_PEINH.
        TEKPO-MEINS = M_MEINS.
        TEKPO-BPRME = M_MEINS.
        TEKPO-NETPR = TEKPO-NETPR * I_EKKO-WKURS.
        MODIFY TEKPO TRANSPORTING NETPR PEINH MEINS BPRME NETPR.
        CLEAR TEKPO.
      ENDLOOP.

    Hi  Gunawan,
    According your meaning ,I change the logic as following:
    IF I_EKKO-BSART = 'ZNB7'.
      SELECT SINGLE VERPR PEINH FROM MBEW INTO (M_VERPR,M_PEINH)
                                           WHERE MATNR = I_EKPO-MATNR AND BWKEY = I_EKPO-WERKS.
      SELECT SINGLE MEINS FROM MARA INTO M_MEINS WHERE MATNR = I_EKPO-MATNR.
      TKOMV-KNUMH = ''.
      TKOMV-KAWRT = M_VERPR  *  I_EKKO-WKURS.
      TKOMV-KPEIN = M_PEINH.
      TKOMV-KMEIN = M_MEINS.
    EndIF.
    But the values of the fields are not updated,I need to write the code in EXIT_SAPMM06E_017 of PO Enhancement,may you help me ,thanks.

  • Material Master Number Range - Very Urgent

    Hi ,
    My client is having existing material codification as below :
    all material types for e.g. ROH, HALB, FERT will be starting their material code with 00 or 01 or 02 etc. sine the first two digits denotes the year , which will vary from material to material. The characters used will be from minimum 8 to maximum 14 - Alphanumeric.
    for e.g. my material code will be
    for ROH - 000040101F0101
    for FERT - 00801000101
    for HALB - 013000101C
    here for all materail type first 2 digit are for year and next will be prod. code , then assy , then sub assy , if forging applicable it will be F , if casting then - C
    How this can be mapped in SAP as one series for all material types, is it possible for system to identify the material type, what is advantage & disadvantage of the same.
    Pl. help
    Thanks & Regards,
    Vikas Mayekar.

    Hi
    Using Standard SAP for Material number ranges may not be able to map your requiremnts.
    But you can use the SAP enhancements available for the Number ranges determination & so onj...
    Please use the User exit in CMOD or SMOD
    You can use enhancement MGA00002 (for industry) or enhancement MGW00002 (for retail) for this.
    For more information, see the documentation for the following components assigned to these enhancements:
    Industry
    EXIT_SAPLMG02_001
    EXIT_SAPLMG02_002
    Retail
    EXIT_SAPLMG72_001
    With the exception of the transfer structure, this function is identical to customer enhancement MGA00002 for material number assignment for the material master for industry. Please see customer enhancement MGA00002 for more information and for sample coding.
    EXIT_SAPLMG72_002
    With the exception of the transfer structure, this function is identical to customer enhancement MGA00002 for material number assignment for the material master for industry. Please see customer enhancement MGA00002 for more information and for sample coding.
    EXIT_SAPLMGNK_003
    Please take help of ABAPer's for implementing the same
    Thanks & Regards
    Kishore

  • Material master-MAP

    I want to create a material master record for a new material. This material needs to be procured i.e. its stock is zero.
    So what will be its Moving avg price (if its valuated at MAP) or its Standard price (if its valuated at Std Price) when we are creating the material.
    Regards
    VS

    Hi,
    You can maintain the Moving avg price in the material master accounting view against field 'Moving Price', if the stock is zero.
    But it gets changed, if the purchase order price is different from the price entered in the material master when there is Goods receipt for that PO.
    Once the GR is posted, then in the material master, system will show the total stock and total value in the accounting view apart from the moving average price.
    If the material is valuated at standard price, the system will calculate the total cost based on the standard price maintained in the material master irrespecitve of the PO price. (stock x standard price).
    Hope this clarifies.
    Thanks,
    Viswanath

Maybe you are looking for