Read categories of CRM order

Hi all!
My task is to read categories of crm order (i.e. fields category_1 ... category_4 at the order header level).
May be someone could tell me some functionality to get this data?
I'll be appreciated.
Best regards,
Alexander Kirillov

Hi, Oliver!
Below you'll see how-to-guide which will provide a step-by-step solution.
It's 100% works like 'CRM_ORDER_READ' (both for buffered values & DB ones).
How-to guide - reading order categorization
1.     Create package ZCATEGORY (Categorization)
2.     Create new dictionary objects:
2.1.     Structure ZMDS_CATEGORIZATION_CAT ( u201CCategory from categorizationu201D) with fields:
CAT_GUID          type      CRM_ERMS_CAT_GUID
CAT_HI          type      CRMT_ERMS_CAT_HI
IT_CAT_CA          type      CRMT_ERMS_CAT_CA_BUF_TAB
IT_CAT_CA_LANG     type      CRMT_ERMS_CAT_CA_LANG_TAB
2.2.     Structure ZMDS ZMDS_CATEGORIZATION_CATS ( u201CCategories from categorizationu201D) with fields:
CATEGORY1          type      ZMDS_CATEGORIZATION_CAT
CATEGORY2          type      ZMDS_CATEGORIZATION_CAT
CATEGORY3          type      ZMDS_CATEGORIZATION_CAT
CATEGORY4          type      ZMDS_CATEGORIZATION_CAT
3.     Copy CL_CRM_CATEGORY_RUN_BTIL class to new ZMD_CL_CRM_CATEGORY_RUN_BTIL class. In newly created class do following:
3.1.     u201CPropertiesu201D tab: <Create instance> = 2 u201CGeneralu201D
3.2.     Change method u201CMAP_SUBJECT_TO_CATEGORYu201D to u201CPublicu201D
4.     Create new class ZMD_CL_CATEGORIZATION (Categorization processing).
4.1.     u201CPropertiesu201D tab: <Create instance> = 2 u201CGeneralu201D
4.2.     Define constants:
4.2.1.      C_LNK_TYPE_IS_CODE     Constant     Public     Type     CRM_ERMS_CAT_LN_TYPE     Default link type     'IS_CODE'
4.2.2.      C_OBJ_DDIC_CRM     Constant     Public     Type     CRM_ERMS_CAT_OB_DDIC     External object name     'SUBJECTCODECRM'
4.2.3.      C_TREE_TYPE_CAT     Constant     Public     Type     CRM_ERMS_CAT_HI_TYPE Kind     of link     'CAT'
4.3.     Create static public method u201CGET_ORDER_H_CATu201D with importing parameter IV_GUID (type CRMT_OBJECT_GUID = order GUID)  & exporting parameter ES_CATEGORIES (type ZMDS_CATEGORIZATION_CATS).
5.     Create report ZMDR_ORDER_CAT for displaying order categorization.

Similar Messages

  • Reading data in the attachment of a CRM Order

    Hi,
       I have a requirement to read the data in a PDF that is attached to a CRM Order. The Order in my case is a Task Order. Please let me know if there are any function modules or methods that can be used to retrive the data in the attachment.
    Thanks
    Sheena.

    You can achieve it by using XSLT mapping.
    You can fetch values from either header part or body part.
    Some XSLT resources:
    xpath functions in xslt mapping
    Design time Value-mappings in XSLT
    File to Multiple IDocs (XSLT Mapping)
    Grouping  XML with XSLT  - From Muenchian Method To XSLT 2.0
    Using ABAP XSLT Extensions for XI Mapping
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    Regards
    Liang

  • Error occurred when processing Java programs (CRM ORDER READ is called)

    Hi,
      We are facing a problem while running a batch job.Its a batch job which reads order data from crm system by using crm order read and generates fur files on application server.
    But the problem is,  after executing or generating lets say 10000 records in file the batch job is automatically closed.
    When we tried to analyse it from SM37 we got the error message saying,
      " An error occurred while executing a Java program in the VM container"
    So what could be the reason of this problem.And what is the solution.
    Regards
    PG

    This is the error we get when we read Pricing condition or Variant Config from the ORDER.
    I think you are not  initalizing the order after you have the read the data.Pass the guid to ti_guis_to_init.
       call function 'CRM_ORDER_INITIALIZE'
          exporting
            it_guids_to_init = <>
          exceptions
            error_occurred   = 1
            others           = 2.
    This may solve the problem.
    Edited by: Chandra on Jan 30, 2009 1:30 PM

  • How to update user status in CRM Order depending the delivery status in R/3

    Hi All,
    In my scenario the partial delivery allowed to the customer while creating the CRM Order. But as per my requirement the status should be updated when the complete order and delivery takes place.
       Let me describe you clearly:
    Suppose I want to deliver 5 quantities products to the customer but initially I want to deliver only 3 quantities and rest 2 quantities later. When I do the post goods issue of 3 quantities in R/3 system the status should not change in CRM system. When I will do the rest 2 quantities in post goods issue in R/3 then the user status should change in CRM Order. But in current when I do the delivery of 3 quantities the user status is changing in CRM Order.
    I need the user status should change in CRM only when the entire deliverytakes place in R/3.
    Thanx
    Chinmaya

    Whenever an item is fully delivered, by standard, a "Completely Delivered" status will be updated into the item. If the I suppose by referring to that you will know an item is partial or completely delivered. When all items in the order is fully delivered, the standard header status will set to "Completed". So, you will also know if the whole order is partial or completely delivered.
    If you want to add a user status, the simplest, you can make use of the ORDER_SAVE Badi. Just call the function CRM_STATUS_MAINTAIN_OW. You can update both header and item status.

  • How to read data in CRM Activity relationship tab.

    Hello friends,
    I have a requirement to read data from CRM Activity relationship tab.
    Mainly i have to read Transaction No/object refernced trans field of CRM Activity relationship tab.
    Could anybody help me?
    Thanks,
    Bunny

    Hi,
    have you found in the meanwhile a good solution?
    I have also a similar requirement.
    At the moment I'm using the view CRMV_ACTFORGP to get the activities associated to a BP (by the way you have many filters that can be used) and then for each GUID (order guid - CRMD_ORDERADM_H-GUID) I call the fm BAPI_REL_GETRELATIONS to get the list of relationships.
    Regards
    Diego

  • Status determination in CRM order connected with delivery in R/3

    Hi Experts,
    I need to determine status "completed" in CRM order always when a delivery took place in R/3.
    Of course this is no problem, when all positions were delivered. But in R/3 we do have only one delivery per order and a Badi determines the order "completed". This global status is not transfered to CRM.
    So I am thinging of doing the same in CRM, implementing a BADI that determines status "completed" in the moment the order has a delivery.
    Can anybody help me to find the correct BADI and Methode to do so?
    Thanks,
    Cristina

    Hi Cristina,
    basically it's the same case as mine with the difference you have to read another status type in STATUS TAB.
    In my case requirement was to read invoice status and cover quantity if the invoice status was completed.
    In your case you have to read delivery status and change the overall status of CRM order according to your delivery status.
    I suggest using two BADIs:
    <b>CRM_ORDER_FIELDCHECK</b>
    <b>METHOD if_ex_crm_order_fieldcheck~fieldcheck</b>
    or <b>ORDER_SAVE
    method IF_EX_ORDER_SAVE~PREPARE</b>.
    Basically in both cases you have to call FM <b>CRM_ORDER_CHANGE_STATUS_GET</b>
    to read your delivery status. (I suggest testing in SE37 to check the reading of your status).
    Once there write your code concerning the overall status.
    In my case the final code in badi CRM_ORDER_FIELDCHECK was:
       CALL FUNCTION 'CRM_ORDER_CHANGE_STATUS_GET'
          EXPORTING
           iv_ref_guid                  = wa_fieldcheck-ref_guid
           iv_ref_kind                  = 'B'
         IMPORTING
           et_change_status_ord_i       = t_status_i_tab
           es_change_status_ord_i       = i_status_i
           et_return                    = i_return
         EXCEPTIONS
           parameter_error              = 1
           inconsistent_data            = 2
           no_return_values             = 3
           OTHERS                       = 4.
        IF sy-subrc <> 0.
        ELSE.
    CHECK i_status_i-invoice_status = 'C'.
    LOOP AT ct_input_field_names INTO i_fields_names_tab.
            check i_fieldS_names_tab-fieldname = 'QUANTITY'.
            i_fields_names_tab-changeable = 'A'.
            MODIFY ct_input_field_names FROM i_fields_names_tab.
          ENDLOOP.
        ENDIF.
    <b>Please let me know if it helps and do not forget to reward with points</b>,
    AndreA

  • Tables for  bill to and ship to addresses in crm order

    Hi Experts,
    In which tables the bill to and ship to addresses are stored in CRM order?
    Thanks in Advance.

    Hi Jak,
    Goto table CRMD_PARTNER to get the address numbers i.e. ADDR_NR and using this address number retrieve the address details from ADRC table.
    <b>Reward points if it helps.</b>

  • CRM order EXPLOSION   like BOM explosion in R/3

    Hello friends,
    I want to list our CRM service orders with their hierarchy.
    The program or function "CRM order Read " is not enough . In doc flow we get only the first level. In our system we have 3- 6 levels .
    Have you got any idea?

    *

  • CRM Order related

    Hi All,
    I have created sales order by logging through contact person in B2B- ISA.Now i want to check in which tab pages the Following Information should be in CRM -GUI.
          1.Contact person Details
          2.Order Channel(eg:internet or telephone call etc..)
          3.I want to see in which tab page of CRM-order      the contact person name  will be.
    Thanx's in Advance.
    Cheers,
    Jack.

    Hi Jack,
    Ans for question 1 & 3:- If you go to transaction CRMD_ORDER and open the order created in B2B-ISA,In the partner tab you will see the CP number and the address.This address includes the name of the CP. If you want to see the detail of the CP use the transaction /nBP and see the businesspartner of your CP no.
    2.Order Channel(eg:internet or telephone call etc..)
    In the tab "Purchase order data" there is a field called category which is nothing but the order channel.
    Hope this will answer your question.
    <b>allot points if my post helps!!</b>
    Best regards,
    Vikash.

  • Adding a new field extension on CRM Order Item tab in the web shop order

    Hi CRM E-Commerce Gurus,
    I want to add a extension field on any web site product such as "zz...." in order to use this data in order's item tab. What shoul I do on J2EE Stack-.jsp method and ABAP Stack at the BADI implementations.
    Could you please help me in order to add a new field extension on CRM Order Item tab in the web shop order ?
    Thanks,
    Kind Regards,
    Fahrettin

    Hi Arshi,
    We have could not find any java action class such as Maintainb2csaveorderaction in config.xml folder and also there is no available threads and clue on SDN, google etc. Therefore we are got stucked on this issue. In SAP_ISA_60 Development and Extension Guide of SAP E-Commerce there is no sample java action class code such as Maintainb2csaveorderaction but some ABAP codes are available for the extension structure.
    Do you suggest any java action class such as Maintainb2csaveorderaction codes like in your B2B scenarios etc.?
    ls_header is a local structure with header data
      ls_extension-ref_guid = ls_header-guid.   
      ls_extension-alt_handle = ls_header-handle.
    extension are name value pairs
      ls_extension-name = u2018Z_CUSTOMER1u2019          u2018 name
      ls_extension-value = ls_header-zcustomer1. u2018 value
      APPEND ls_extension to extension_header_out
    now adding extensions to the items
      LOOP AT lt_items INTO ls_item.
        ls_extension-ref_guid = ls_item-guid.
        ls_extension-alt_handle = ls_item-handle.
        ls_extension-name = u2018Z_CUSTOMER2u2019          u2018name
        ls_extension-value = ls_item-zcustomer2.   u2018value
        APPEND ls_extension to extension_item_out 
      ENDLOOP.
    ls_header is a local structure with header data
      LOOP AT extension_header_in INTO ls_extension.
    check the name to find the according field
          IF ls_extension-name = u2018Z_CUSTOMER1u2019.
            ls_header-zcustomer1 = ls_extension-value.
          ENDIF.
      ENDLOOP.
    sort the extension table by ref_guid and handle to obtain a better access
    with binary search.
      SORT extension_item_in BY ref_guid, alt_handle.
      LOOP AT lt_items INTO ls_item.
    find the starting point for a loop over extensions
    use guid and handle as one logical key to access the extension
        READ TABLE extension_item_in
          WITH KEY ref_guid = ls_item-guid
                   alt_handle = ls_item-handle
                   BINARY SEARCH.
        IF SY-SUBRC = 0.
          LOOP AT extension_item_in INTO ls_extension
            FROM SY-TABIX.
    check, if the entry is relevant
            IF NOT    ls_extension-ref_guid = ls_item-guid
               OR NOT ls_extension-alt_handle = ls_item-handle.
               BREAK.
            ENDIF.  
            IF ls_extension-key = u2018Z_CUSTOMER2u2019.
              ls_item-zcustomer2 = ls_extension-value.
            ENDIF.
          ENDLOOP.
        ENDIF.     
      ENDLOOP.
    Thanks
    Kind Regards,
    Fahrettin

  • BAPi/call function that calculates the pricing condition in CRM order

    Hello Experts,
        Can anybody suggest me which BAPI to be used in order to recalculate the pricing condition that is already maintained in the CRM order.
    I'm trying to upload .txt file which contains basic price value ( condition type ZPR0 ) to update in the order. This new value should over write the existing one in the CRM order & recaluclate the tax & other condition types in the pricing procedure. Can anybody suggest me how to go abt.
    Regards
    Devika.S
    Edited by: Devika.S on Apr 7, 2009 7:07 AM

    Hi Devika,
    Can you have a look at these two BAPIs as listed below to see if any of them fits your requirement?
    BAPI_BUPA_FRG0030_ADD - Add pricing data
    BAPI_BUPA_FRG0030_CHANGE - Changing pricing data
    Hope this helps,
    Cheers,
    Sougata.

  • How to obtain GUID of a CRM Order Object

    Hello, I want to retrieve an external reference number of a CRM Order. First I should obtain the GUID of a CRM Order Object(component type CRMT_OBJECT_GUID). My problem is, which FM should I use?
    Thanks.

    Hello sasi,
    thanx for your help, with which I go a step further. What I need is to obtain a service order GUID(at last the external reference number) according to a notification number in SAP Support Desk. In CRM_JCDS, CRM_JEST I got a lot of infos but not the notification number, so that I could not establish a relationship between them. And I'm not quite clear what you mean by FM STATUS_TEXT_EDIT(why I should edit the status text)? Can you explain more?
    Greetings.
    Nuno.

  • WBS Element in CRM order

    Hi forum!!
    In the ERP order we assign a item of a order to a WBS element and we need to see that WBS element in CRM but that field does not appear in the CRM order!!
    Because of that I think about creating an ERP Order in CRM Order because the WBS element does exist!!but the problem comes here, when I insert the value in the WBS element that value disappears when I press enter or I save the Order.
    Does anyone of yours know something about that??
    Any ideas??

    HI Cecilia,
    I am also need to assign WBS element in service order item,but I can't find that filed.
    Can you share with me?
    Thanks
    Tiffany

  • Run time error while closing the CRM Order using BAPI

    Hi Experts,
    Need your invaluable suggestions here.Apologies for the lengthy mail, intention is to give clear idea of the issue.
    I am facing an issue while closing the CRM orders. According to our business process, when an issue is solved we will keep the order in resolved status only. We will not directly close the order from the CRM tool, instead we have created a custom program for the same purpose.
    For the custom program we will give input as the order number and execute it, this will close the order.
    Here close the order means assigning it to Close status as well assign the reason code.
    We have created some reason codes for closed status.
    So when the program is run the Order moves from resolved status to closed status along with reason code.
    But of late we are facing some problems with this program, it is giving run time error for some CRM orders.
    Run time error message : The ABAP/4 Open SQL array insert results in duplicate database records.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught in procedure "CRM_SERVICE_OS_UPD_OST_DU" "(FUNCTION)", nor was it propagated by a RAISING clause.
    Please find my code which have used in the custom program
    Closing the resolved SOs in the system
        CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
            EXPORTING
              objnr                     = iv_guid
              user_status          = lc_status_closed
           EXCEPTIONS
             object_not_found          = 1
             status_inconsistent       = 2
             status_not_allowed       = 3
             OTHERS                        = 4.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining status'.
        ENDIF.
    Set reason code
    build lt_subject
        ls_subject-ref_guid = iv_guid.
        ls_subject-katalogart = 'A2'.
        ls_subject-codegruppe = 'ZR000003'.
        ls_subject-code       = 'ZR33'.                      " Reason code
        ls_subject-mode       = 'A'.
        APPEND ls_subject TO lt_subject.
    build lt_ossset
        ls_osset-ref_guid        = iv_guid.
        ls_osset-subject_profile = 'ZREASON03'.
        ls_osset-profile_type    = 'G'.
        ls_osset-subject         = lt_subject.
        APPEND ls_osset TO lt_osset.
    build lt_service_os
        ls_service_os-ref_guid  = iv_guid.
        ls_service_os-ref_kind  = 'A'.
        ls_service_os-osset     = lt_osset.
        APPEND ls_service_os TO lt_service_os.
    build lt_input_fields
        REFRESH: lt_input_fields, lt_field_names.
        CLEAR  : ls_input_fields, ls_field_names.
        ls_field_names-fieldname    = 'CODE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'CODEGRUPPE'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'KATALOGART'.
        APPEND ls_field_names TO lt_field_names.
        ls_field_names-fieldname    = 'SERVICE_PROFILE'.
        APPEND ls_field_names TO lt_field_names.
        ls_input_fields-ref_guid    = iv_guid.
        ls_input_fields-ref_kind    = 'A'.
        ls_input_fields-objectname  = 'SERVICE_OS'.
        ls_input_fields-field_names = lt_field_names.
        APPEND ls_input_fields TO lt_input_fields.
         CALL FUNCTION 'CRM_ORDER_MAINTAIN'
          EXPORTING
            it_service_os     = lt_service_os
          CHANGING
            ct_input_fields   = lt_input_fields
          EXCEPTIONS
            error_occurred    = 1
            document_locked   = 2
            no_change_allowed = 3
            no_authority      = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          WRITE :  'Error at maintaining reason'.
        ENDIF.
        CALL FUNCTION 'CRM_ORDER_SAVE'
          EXPORTING
            it_objects_to_save   = lt_header_guid
            iv_update_task_local = lv_update_task_local
          IMPORTING
            et_saved_objects     = lt_saved_objects
          EXCEPTIONS
            document_not_saved   = 1
            OTHERS               = 2.
        IF sy-subrc <> 0.
          WRITE : 'Error at saving'.
        ELSE.
          WRITE : 'Successfully Closed'.
          COMMIT WORK AND WAIT.
        ENDIF.
    Run time error is coming at COMMIT WORK AND WAIT statement.
    Please let me know any corrections are required in the above program.
    When I analyzed the run time error I have found that it trying to insert the record in CRMD_SRV_OSSET for that CRM order, but already one record is present in the table for the same CRM order number.
    For most of the CRM orders there is no entry in this table so they are closing successfully but for a few orders for which there is an entry we are getting the above run time error.
    There is nothing wrong with the orders which have an entry already in the table CRMD_SRV_OSSET, I need to close these kind of orders with out run time error.
    Kindly provide your feedback.

    Hi Dinakar,
    You posted this in APO PPDS forum. This question should go to PP forum where someone could answer it.
    Please close this thread and open a new thread in PP forum so that you could get help quickly from the relevant experts.
    Regards - Pawan

  • CRM orders with error "Do not enter a business agreement for sold-to party"

    Dear SDN'ler,
    after creating orders in SAP CRM via ISA (CRM 4.0) and uploading them to R/3 all orders are created successfully in R/3 but an error message is sent back to SAP CRM in case of ALL orders.
    Error message is the following:
    "Do not enter a business agreement for sold-to party xyz"
    Message no. CRM_BILLING011
    Diagnosis
    The field "FI-CA active" is not selected for the sold-to party 6000201 in the business master record. Since the business agreement is used in the component FI-CA, excluding the control of processes, it makes sense to enter a business agreement.
    Procedure
    Delete the entered business agreement.
    ==> Could someone please give me some more information about the mentioned "business agreement"? Where do I find field "FI-CA active" (in R/3 or CRM customer master data?)?
    ==> And how can I eliminate this error message for CRM orders in SAP CRM?
    Thanks a lot.
    Best Regards,
    Rainer Gryschka

    Please check the customising setting under following path:
    SPRO --> Customer Relationship Management --> Master Data --> Business Partner -- > Business Agreement --> Define Basic Settings
    Alternatively you may also check following customisation table using SM30 --> CRMC_BUAG_ACTV

Maybe you are looking for

  • CS6 Mini Bridge - Thumbnail size and preview

    I've just upgraded to CS6 (design & web premium) and was setting up my workspace in InDesign, and after adding (docking) Mini Bridge there seems to be no preview or anyway to change the size of the thumbnails I can view. I use Mini Bridge a lot as we

  • Transaction variant for VA02 is not working for few fields

    Hi All, I have created a transaction variant for VA02. Made the necessary code changes for populating the variant name in MV45AFZZ. It is working fine for all the screens and all the fields except for second screen of VA02. First screen - Enter sales

  • Hardware Test doesn't boot

    I have a macbook Pro 2.2 GHz Intel Core 2 Duo with 2 GB 667 Mhz DDR2 SDRAM on 10.6.8. I purchased a universal DVD of Snow Leopard. I have removed all external devices except the Keyboard and Pilotmouse Mini Bluetooth wireless mouse. Restarting after

  • Skype won't allow new contact to be added. I am ru...

    Is there a fix for this? Chuck Salem, Oregon

  • Creating an applet instance

    Hi I am using Schulmberger Smart Card Tool Kit in order to create applet and applet instances. I have created the applet inside the card but I couldn't create an applet instance. Because when I am going to create the applet instance by using the soft