CRM ORDER CHANGE / CRM_ORDER_MAINTAIN

Hi Max.
Firt of all, Let me thank you for taking the time and replying to my question. Thank you again.
Now, Inyour reply, you said that it is a little tricky on how we fill in the BAPI structures, can you please explain how. I did try your advise with the sample code, but the order is still not changing. I am losing my mind here. I seriously need help. Here is my scenerio:
I extended the table CRMD_PARTNER with two date fields (Date to and Date From). I could not add these two fields to the order->partner tab table control as columns, so I creared a custom screen that mimics the data from Partner tab with my additional date fields as 2 columns. These dates need to be maintained.
So I tried to work with your sample code, populated my it_partner table with the record that I need to change, populated the LT_INPUT_FIELDS table with Object=partner, ref_kind=A, REF_GUID=MY_ORDER_GUID, LOGICAL_KEY=MY_LOGICAL_KEY and the field names are: DATE_FROM,DATE_TO,DISPLAY_TYPE, KIND_OF_ENTRY,NO_TYPE, PARTNER_NO. All fields are marked 'X' for changeable parameter. When I run my code, I get a subrc=0. when i look at the order in the system, i dont see my dates changed.
I am attaching my code below. Can you please help me out. What am i doing wrong. What am I missing. I even tried to call the CRM_PARTNER_BADI from my custom screen but that did not work either. Do I need to call the FM:order_maintain along with the PARTNER_BADI? HELP PLEASE. THANKS.
DATA:
IT_PARTNER TYPE CRMT_PARTNER_COMT,
IS_PARTNER TYPE CRMT_PARTNER_COM,
CT_ORDERADM_H TYPE CRMT_ORDERADM_H_COMT,
CS_ORDERADM_H TYPE CRMT_ORDERADM_H_COM,
CT_INPUT_FIELDS TYPE CRMT_INPUT_FIELD_TAB,
CS_INPUT_FIELDS TYPE CRMT_INPUT_FIELD,
CT_FIELD_NAMES TYPE CRMT_INPUT_FIELD_NAMES_TAB,
CS_FIELD_NAMES TYPE CRMT_INPUT_FIELD_NAMES,
CS_INPUTFIELDS TYPE CRMT_INPUT_FIELD_NAMES.
CS_ORDERADM_H-HANDLE = '0000000000'.
CS_ORDERADM_H-GUID = '43FDCE7DBD600058020000000A4DA19F'.
CS_ORDERADM_H-OBJECT_ID = '0005000243'.
CS_ORDERADM_H-PROCESS_TYPE = 'ZBND'.
CS_ORDERADM_H-MODE = 'B'. "A=CREATE, B=CHANGE, C=DISPLAY
APPEND CS_ORDERADM_H TO CT_ORDERADM_H.
CS_INPUT_FIELDS-REF_HANDLE = '0000000000'.
CS_INPUT_FIELDS-REF_GUID = '43FDCE7DBD600058020000000A4DA19F'.
CS_INPUT_FIELDS-REF_KIND = 'A'.
CS_INPUT_FIELDS-OBJECTNAME = 'PARTNER'.
CS_INPUT_FIELDS-logical_key = '0000000000011311 BPBP'.
CS_INPUTFIELDS-FIELDNAME = 'DATE_FROM'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'DATE_TO'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'DISPLAY_TYPE'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'KIND_OF_ENTRY'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'NO_TYPE'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
CS_INPUTFIELDS-FIELDNAME = 'PARTNER_NO'.
CS_INPUTFIELDS-CHANGEABLE = 'X'.
APPEND CS_INPUTFIELDS TO CS_INPUT_FIELDS-FIELD_NAMES.
APPEND CS_INPUT_FIELDS TO CT_INPUT_FIELDS.
IS_PARTNER-REF_GUID = '43FDCE7DBD600058020000000A4DA19F'. "ORDER GUID
IS_PARTNER-REF_KIND = 'A'.
IS_PARTNER-REF_PARTNER_FCT = '00000001'.
IS_PARTNER-REF_PARTNER_NO = '1311'.
IS_PARTNER-REF_NO_TYPE = 'BP'.
IS_PARTNER-REF_DISPLAY_TYPE = 'BP'.
IS_PARTNER-PARTNER_GUID = '43FDCEEEBD600058020000000A4DA19F'.
IS_PARTNER-KIND_OF_ENTRY = 'C'.
IS_PARTNER-PARTNER_FCT = '00000001'.
IS_PARTNER-PARTNER_NO = '1311'.
IS_PARTNER-DATE_FROM = '20060627'.
IS_PARTNER-DATE_TO = '20060627'.
APPEND IS_PARTNER TO IT_PARTNER.
To set maintain function to act like BAPI
CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
CALL FUNCTION 'CRM_ORDER_INITIALIZE'
EXPORTING
IV_INITIALIZE_WHOLE_BUFFER = 'X'.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PARTNER = IT_PARTNER
CHANGING
CT_ORDERADM_H = CT_ORDERADM_H
CT_INPUT_FIELDS = CT_INPUT_FIELDS.
IF SY-SUBRC <> 0.
ENDIF.
*RESET
CALL FUNCTION 'DIALOG_SET_WITH_DIALOG'.
if sy-subrc ne 0. endif.
clear s_new_order.
read table t_new_orders
into s_new_order
INDEX 1.
if sy-subrc = 0.
l_object_to_save = CS_ORDERADM_H-GUID.
INSERT l_object_to_save INTO TABLE t_object_to_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = t_object_to_save
IMPORTING
et_saved_objects = t_saved_objects
et_exception = t_exceptions
et_objects_not_saved = t_objects_not_saved
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
if sy-subrc eq 0.
call function 'BAPI_TRANSACTION_COMMIT'.
endif.
COMMIT WORK.

Hi Cool,
Please compare the following code with your code :
REPORT  yam_test_crmordermaintain               .
DATA : lit_partner          TYPE crmt_partner_comt,
       wa_partner           LIKE LINE OF lit_partner,
       ls_input_field       TYPE crmt_input_field,
       ls_input_field_names TYPE crmt_input_field_names,
       lt_input_field_names TYPE crmt_input_field_names_tab,
       lt_input_fields      TYPE crmt_input_field_tab.
DATA : lit_header_guid TYPE crmt_object_guid_tab,
       wa_header_guid  LIKE LINE OF lit_header_guid.
* Populate the Input Field Structure
CLEAR ls_input_field_names.
ls_input_field_names-fieldname = 'PARTNER_FCT'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = 'PARTNER_NO'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = 'NO_TYPE'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field_names-fieldname = 'DISPLAY_TYPE'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
ls_input_field-ref_guid    = '00000000000000000000000000000000'.
ls_input_field-ref_kind    = 'A'.
ls_input_field-objectname  = 'PARTNER'.
ls_input_field-field_names = lt_input_field_names.
INSERT ls_input_field INTO TABLE lt_input_fields.
* Bill To Party
MOVE: '00000000000000000000000000000000'  TO wa_partner-ref_guid,
     'A'        TO wa_partner-ref_kind,
     '0001'     TO wa_partner-ref_partner_handle,
     '00000003' TO wa_partner-partner_fct,
     '10000073' TO wa_partner-partner_no,
     'BP'       TO wa_partner-no_type,
     'BP'       TO wa_partner-display_type,
     'X'        TO wa_partner-mainpartner.
APPEND wa_partner TO lit_partner.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
       EXPORTING
            it_partner = lit_partner
       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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Call CRM_ORDER_SAVE after the above statements and nothing else required.
<b>Note: Instead of '00000000000000000000000000000000' give your HEADER GUID.</b>
<b>See if it works, reward points if it helps.</b>

Similar Messages

  • Condition is deleting in R/3 for CRM order change

    Hi  Experts,
    I am Creating an Order in CRM (For Configuraable Material) and I can see Order created in R/3 with all condition records at item level.   When I change the Sales Order in CRM, one particular condition record EK02 is deleting from Conditions.  I applied 912697, 1225191, 1306890, 1389867, 1388898, 1062881, 1355049 Oss notes to resolve this issue.  But there is no use. 
    Can any one help me to resolve this issue.
    Thanks
    Ramana

    Hi Nilesh P,
    Have you set the parameter PRICINGTYPE to G in table SMOFPARSFA as per note 490932 - 'G' = Copy price components unchanged. If so then the only possibility is to debug the transfer to ERP as per note 656823 in order to determine where the condition value is initialized.
    I hope this helps.
    Kind regards,
    Vanessa.

  • CRM ORDER CHANGE AND STATUS MANAGEMENT - workflow

    Hi,
    We have created a Changed method for bus2000120 which is configured to fire when the Order is saved via Status Management.  We have added an entry to BSVW for the object, bus2000120.changed with no restrictions.  We have also created a function module that checks to see if the user status is E0005 or E0007 or it deletes the object from the Event table.  I see that this works correctly, however, a given SAVE of a transaction is firing 2 bus2000120.changed for the exact same user and system status.  (I know that it is firing 2 bus2000120.changed because I ran swels and swel. The event was listed twice. Please remember that the Event table when read directly after the save only lists bus2000120.changed one time.)
    There is only 1 entry in the event linkage(swetypv) for bus2000120.changed and it has a condition of the same user status, e0005 or e0007.  No real problem here, however, since there were 2 firings it runs the workflow twice.
    When you look at the extras-change documents you can see that the Header is changed twice, once for a system status and once for the user status.  I am assuming that since there are 2 changes, this is what is doing both firings.
    The funny thing is that if I fall into our custom code in debug where we are reading the status and event tables I only see bus2000120.changed.
    Any ideas on how I might solve this problem?  Do you believe I am correct in assuming that the 2 status changes to the header of the transaction is how both events are being fired?  If not, any guidance you might give would be greatly appreciated.

    see post stream, solved via sap note 1063138

  • Changing ship to address at line item level in CRM order

    Hi All,
    Is it posible to change the ship to address at line item level in CRM order either at the time of order creation or order change. if yes please let me know if we need to do any settings for this.
    Thanks in advance.
    JM

    I agree with the previous comment, Please go to the Partner Determination procedure attached to the Transaction and in the partner functions associated with the that procedure, find Ship-to-Party and there will be a check box to "make it changeable" once determined. Check that and save it.. You should be all set
    Thanks
    Raj

  • 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

  • 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.

  • Error in Action when CRM Order is updated as Error from R/3 update

    Hi,
    Currently we are in CRM 6.0 SP04 and R/3 4.7 SP14
    Process:
    1) B2B user places order through ISA
    2) Order gets replicated R/3 from CRM through middleware (Scenario A setting)
    3) If there are any changes in order on either side, changes gets replicated.
    Requirement:
    We have a requirement from business to trigger workflow in CRM if order is in error. Following are the possible scenarios
    1) Error while saving order in CRM
    2) No errors in CRM. However, Order will get error in R/3 because of inconsistent configuration or master data between CRM and R/3. The BDOC will be green while replicating to R/3 and acknowledgement to CRM.
    3) BDOC status is in error
    Solution approach:
    We created an action to trigger event when order status set to "Contains error". The condition for Action trigger are Order have error free flag NE X(BUS 2000115 )  OR Status = I1030 OR status = I1056.
    Issues:
    1)     Scenario : Order is successfully create in CRM without any error. Order gets replicated to R/3 u2013 BDOC is green. However, the order gets error status in R/3 because of inconsistent configuration or master data. The acknowledgement BDOC updates the error status in CRM. However, Action does not get trigger when the order is updated as Error from R/3.
    Pls advise possible solution and also suggest any other way to achieve the required functionality to generate workflow for CRM order updated as Error from R/3.
    Regards,
    Anil Rithe

    Hi Anil,
    Try this, implement ORDER_SAVE BAdI.  This BAdI is triggered every time an order is saved, you could put in your logic to see if the order has errors, if yes trigger your workflow.
    I haven't tested but this should work for your case when the crm order is set to error status after the replication to R/3(the BDOC scenario).
    This may not be the most efficient method of doing, but this would definitely work.
    Make sure you use proper checks at the beginning  of your order_save BAdI implementation as this badi would get executed on save of every 1-order object.
    ~Kiran

  • How can we process the CRM Order again for second time in debugging mode

    Hi,
    Can anybody please tell me how can we process the CRM ORDER for second time.  that I want to process in debugging mode.
    Thanks,
    bsv

    Hi bsv,
    Are you trying to reprocess a BDOC for debugging purpose?
    If the BDOC is not with a final status, you will be able to reprocess it using the reprocess button in the smw01 search result list.
    And you may put /h on the popup when you click on the 'reprocess' button.
    If it is allowed to make some changes in the CRM ORDER for testin purpose, it would be easier to perform debugging.
    A more 'careless' way is to deactivate the outbound or inbound queue in transaction smqs or smqr, then in smq1 or smq2 to locate the interested queue, and click on button 'debug LUW'.
    Hongyan

  • 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

  • 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.

  • Configuration tab not visible in CRM ORDER

    Hi,
    When I use the CRM_ORDER_MAINTAIN function module to create the CRM ORDER, the configuration tab is not visible and when I use the same data to create the CRM ORDER manually through CRMD_ORDER, i can see the configuration tab. What could be the problem?
    Infact I am using CRMXIF_ORDER_SAVE FM to create the order.
    Regards,
    Roopesh

    Hi,
    Try with the below code in .HTM .
    <%@page language="abap" %>
    <%@extension name="thtmlb" prefix="thtmlb" %>
    <%@extension name="chtmlb" prefix="chtmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <chtmlb:configTable actionsMaxInRow       = "3"
                        displayMode           = "FALSE"
                        allRowsEditable       = "TRUE"
                        downloadToExcel       = "FALSE"
                        enableTableGraphics   = "TRUE"
                        id                    = "table"-------you can give your table id
                        onRowSelection        = "select"
                        personalizable        = "FALSE"
                        selectedRowIndex      = "<%= X->SELECTED_INDEX %>"
                        selectedRowIndexTable = "<%= X->SELECTION_TAB %>"
                        selectionMode         = "<%= X->SELECTION_MODE %>"
                        table                 = "//X/Table"
                        usage                 = "ASSIGNMENTBLOCK"
                        visibleFirstRow       = "<%= X->VISIBLE_FIRST_ROW_INDEX %>"
                        visibleRowCount       = "25"
                        width                 = "100%"
                        xml                   = "<%= controller->configuration_descr->get_config_data( ) %>" />
    REPLACE X WITH YOUR CONTEXT NODE.
    Regards,
    Gangadhar.S
    Edited by: gangadhar rao on Mar 25, 2011 1:47 PM

  • Mass Repricing of CRM Orders

    Hi Everyone,
    Is there any function module for recalculating the prices of a CRM Order in the back ground.
    Say for example: If the base price of a product is changed, i want this new base price in an already existing CRM Order. Hence I want to recalculate the pricing of the CRM order.
    thanks in advance,
    Chan

    Hi,
    How did u recalculate ? Can you please share ?
    Thanks in advance.
    SN

  • 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.

  • Cancel line item in crm order

    Hi All,
    How can I cancel an item of a CRM order?
    Is this possible through BAPI ? If yes , please mention how.
    Thanks a lot
    Ajith

    Hi
    These sales orders have been locked by the user (not a dialogue user) which is used for the BDoc transfer from CRM to R/3. Generally orders created in R/3 from CRM can be also be changed in R/3. But because of data difference between R/3 and CRM now the orders are locked. It is not allowing to update any data from CRM also.
    So these order getting unlocked from the user is not working because now no updation from CRM to R/3 on these locked orders are happening.
    Regards

  • Cancel items from CRM order using CRMXIF_ORDER_SAVE

    Hi All,
    My requirement is to modify an existing crm order through 'CRMXIF_ORDER_SAVE'.  I need to copy this FM and modify so that whenever it is called from XI all the existing items are cancelled and new items from the xml are added.
    Can anyone give me some idea how to achieve this?
    Any input will be highly appreciable.
    Thanks
    Ajith

    Solved.. Used CRM_STATUS_CHANGE_INTERN_VB , CRM_ORDER_MAINTAIN and CRMXIF_ORDER_SAVE

Maybe you are looking for