FM to update Service contract in bulk.

Hi,
I would like to know if there is any FM / BAPI to update the status of service contract in bulk.
Thanks in advance.
Regards
Shanthi
Edited by: shanthi v on Jul 27, 2010 9:35 AM

Hi Edit,
Thanks for the reply.
Yes, i wanted to do status update in bulk for service contracts in CRM system.
Guess there are no FM to update status of service contracts in bulk.
I used FM CRM_ORDER_CHANGE_STATUS in loop to update the status.
The performance is little bad. Let me know if there is an alternative.
Thanks in advance.
Regards
Shanthi

Similar Messages

  • To update service contract Item data

    Hi Experts,
    I have to create the new Item number in the customer contract, for that I am using the FM 'BAPI_CUSTOMERCONTRACT_CHANGE'.
    But this fm is not sutable for my requirment.
    Except the above function module is there any available to update the service contract.
    Could any one please suggest me.
    Thnx,
    Jay.

    Hi Edit,
    Thanks for the reply.
    Yes, i wanted to do status update in bulk for service contracts in CRM system.
    Guess there are no FM to update status of service contracts in bulk.
    I used FM CRM_ORDER_CHANGE_STATUS in loop to update the status.
    The performance is little bad. Let me know if there is an alternative.
    Thanks in advance.
    Regards
    Shanthi

  • Updating service contract line item's end date

    Hi,
    I am trying to extend the end date on a line item in a service contract via the DI and it is giving me the following error:  'Item's end date cannot be greater than contract's end date' and I don't understand why.
    I retrieve the service contract object, change the header end date then find the line item  I need, update it with the same end date and then issue call the SC update method.  Here's my code:
        Try
                 SC.Lines.SetCurrentLine(SerialNbrLineNumber)
                 NewStartDate = LineEndDate
                 'calculate new end date & extend service contract
                 NewEndDate = NewStartDate.AddYears(Warranty_Duration)
                'never make the contract end date earlier than it had been
                SC.EndDate = IIf(NewEndDate > SC.EndDate, _
                                                             NewEndDate, _
                                                             SC.EndDate)
                'update service contract detail with new end date
                 If NewEndDate > LineEndDate Then
                     SC.Lines.EndDate = NewEndDate
                 End If
                 If SC.Update() <> 0 Then
                    rs.RtnCode = -1
                    rs.RtnMessage = B1Comp.GetLastErrorDescription()
                 End If
    I did see something in the di help that mentions that B1 calcs an end date based on the "duration of coverage" field but I don't think I could use that because I might only change the end date for one line item. 
    BTW I can do this in the application with no problem.
    Thanks in advance for any assistance.

    Known B1 bug.  Should have checked support first.  More info on note # 1026540

  • How to update  Service Contract using BAPI/FM for ME31K

    Hi ,
    I am using BAPI BAPI_CONTRACT_CREATE to create contracts.
    It works fine, the only problem i am facing is while updating line item with item category "D' its simply skips the item category and create a item. The item category is blank when i see in transaction ME33K.
    When i create it using ME31K transaction with line item item category type  "D' its ask me to fill the services also for that line item.
    My question is is there any BAPI which i can use to update the Services for item line with item category  D.
    Thanks
    Amar

    Hi Amar,
    Not sure if this would help you but you can consider writing different logic (probably a BDC) for item category 'D', and use BAPI for all other cases (if 'D' is the only exception).
    BAPI documentaion says:
    *External services (planned and unplanned services) are not supported.
    Creation of configurations is not supported*
    Regards,
    Shyam

  • Service Contracts  with billing plan not updating debit memo request in ECC

    For service contracts with billing plan, we cancel the line items and set the user status at header to "cancelled" and also set the cancellation date (under Cancellation Tab) at the header as well as item level which delete all items in the “DMR” in ECC (which are not yet billed). When we do this, it works perfect for most of the time and in some cases DMR items are not updated in ECC and it is billing. When I checked in CRM, the billing plan items are updated based on the cancellation date.
    Experts appreciate your help on this issue.
    Thanks,
    George.

    This is resolved by the note 1008663

  • Updating address of a partner in crmd_order Service Contract

    Hello everybody,
               I have a requirement of updating address of partners in service contracts in SAP CRM. I have tried to create an address number and person number and pass it to crm_order_maintain but it is not working. Please help me with this.
    Thanks in advance.
    Regards,
    Srujana.

    I generated a partner set guid from the object guid and obtained new addr and person numbers by using this partner set guid. I am then passing them to crm_order_maintain using the following code but it doesnot seem to work. Please refer to this code and help me.
    data: doc_id TYPE char32,
          new_addrnr TYPE AD_ADDRNUM,
          new_addrnp TYPE AD_PERSNUM.
    *doc_id = wa_ls_orderadm_h-guid.
    DATA: partner_set_guid TYPE crmt_object_guid.
    CALL FUNCTION 'CRM_LINK_GET_OW'
      EXPORTING
        iv_guid_hi                     = wa_ls_orderadm_h-guid
       IV_OBJNAME_HI                  = 'ORDERADM_H'
       IV_OBJNAME_SET                 = 'PARTNER'
      IV_GET_ALL                     =
       IV_INHERIT_FROM_STR            = 'X'
    IMPORTING
      ET_LINK                        =
       EV_GUID_SET                    = partner_set_guid
    EXCEPTIONS
       INVALID_INPUT_DATA             = 1
       NO_ALLOCATED_OBJ_FOUND         = 2
       UNDEFINED_INTERNAL_ERROR       = 3
       OTHERS                         = 4
    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 FUNCTION 'COM_PARTNER_ADDRESS_COPY'
      EXPORTING
        iv_caller                  = 'CRM'
        IV_DOCUMENT_ID             = doc_id
        iv_partnerset_guid         = partner_set_guid"'00000000000000000000000000000000'
        iv_addr_nr                 = ls_partner_wrk-addr_nr
        IV_ADDR_NP                 = ls_partner_wrk-addr_np
        iv_addr_type               = '2'
      IV_CONVERSION_3_TO_2       = ' '
      IV_MAKE_EMPTY              = ' '
      IV_NEW_ADDRESS_TYPE        = ' '
    IMPORTING
       EV_NEW_ADDR_NR             =  new_addrnr
       EV_NEW_ADDR_NP             = new_addrnp
      EV_NEW_ADDR_TYPE           =
    EXCEPTIONS
       ERROR_OCCURRED             = 1
       PARAMETER_ERROR            = 2
       OTHERS                     = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    i passed the generated addrnr and addrnp to the crm_order_maintain as follows
    wa_partner1-addr_nr        = new_addrnr."ls_partner_wrk-addr_nr.
    wa_partner1-addr_np        = new_addrnp."ls_partner_wrk-addr_np.
    wa_partner-addr_nr        = new_addrnr."ls_partner_wrk-addr_nr.
    wa_partner-addr_np        = new_addrnp."ls_partner_wrk-addr_np.
    wa_partner-addr_type      = ls_partner_wrk-addr_type.
    INSERT wa_partner INTO TABLE it_partner.
    APPEND wa_partner_att TO it_partner_att.
       INSERT wa_field_names INTO TABLE it_field_names.
        wa_field_names-fieldname  = 'ADDR_NP'.
        wa_field_names-CHANGEABLE  = 'B'.
        INSERT wa_field_names INTO TABLE it_field_names.
        wa_field_names-fieldname  = 'ADDR_NR'.
        wa_field_names-CHANGEABLE  = 'B'.
        INSERT wa_field_names INTO TABLE it_field_names.
        wa_field_names-fieldname  = 'ADDR_ORIGIN'.
        wa_field_names-CHANGEABLE  = 'B'.
        INSERT wa_field_names INTO TABLE it_field_names.
        wa_field_names-fieldname  = 'ADDR_TYPE'.
        wa_field_names-CHANGEABLE  = 'B'.
        INSERT wa_field_names INTO TABLE it_field_names.
        wa_field_names-fieldname  = 'STD_BP_ADDRESS'.
        wa_field_names-CHANGEABLE  = 'B'.
        INSERT wa_field_names INTO TABLE it_field_names.
    DATA : lv_bp TYPE bu_partner,
             lv_bp_log(16) TYPE c,
             lv_partner_guid TYPE bu_partner_guid,
             lv_msg_text TYPE bapi_msg,
             lv_error_text TYPE char8000,
             lv_bpbp(4) TYPE c VALUE 'BPBP',
             lv_logical_key TYPE crmt_logical_key,
             lv_length TYPE i.
    SELECT SINGLE partner FROM but000 INTO lv_bp  WHERE partner_guid = wa_partner-partner_no.
    *Building Logical Key for maintaining partner
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
            EXPORTING
              input  = lv_bp
            IMPORTING
              output = lv_bp.
          CONDENSE lv_bp NO-GAPS.
         lv_bp_log = lv_partner_guid+0(10) ."lv_bp.
          CONDENSE lv_bp_log NO-GAPS.
          CONCATENATE '0000'
                      'Z0000009'
                      lv_bp_log
                      lv_bpbp
                      INTO lv_logical_key
                      RESPECTING BLANKS.
       wa_input_fields-ref_handle  = lv_handle.
    wa_input_fields-ref_guid = wa_ls_orderadm_h-guid.
    wa_input_fields-ref_kind    = 'A'.
    wa_input_fields-objectname  = 'PARTNER'.
    *wa_input_fields-ref_handle  = '0000000001'.
    wa_input_fields-logical_key = lv_logical_key.
    wa_input_fields-field_names = it_field_names.
    INSERT wa_input_fields INTO TABLE ct_input_fields.
    DATA: lv_created_partnerset_guid           TYPE CRMT_OBJECT_GUID.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
       IT_PARTNER                    = it_partner
    IMPORTING
       ET_EXCEPTION                  = it_exception
    CHANGING
      CT_ORDERADM_H                 =
      CT_ORDERADM_I                 =
       CT_INPUT_FIELDS               = ct_input_fields
      CV_LOG_HANDLE                 =
      CT_PARTNER_ATTRIBUTES         =
      CT_DOC_FLOW                   =
    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 FUNCTION 'CRM_PARTNER_MAINTAIN_SINGLE_OW'
    EXPORTING
      IV_REF_GUID                      = wa_ls_orderadm_h-guid
      IV_REF_KIND                      = ls_partner_wrk-ref_kind
      IS_PARTNER_COM                   = wa_partner1
      IV_POPULATE_MODE                 = 'X'
      IV_CHECK_PARTNER_ONLY            = ' '
      IS_PARTNER_CONTROL               = wa_partner_control
    IMPORTING
      EV_CREATED_PARTNERSET_GUID       = lv_created_partnerset_guid
    CHANGING
      CT_INPUT_FIELD_NAMES             = it_field_names
      CT_PARTNER_ATTRIBUTES_COM        = it_partner_att
    EXCEPTIONS
      ERROR_OCCURRED                   = 1
      OTHERS                           = 2
    *IF sy-subrc = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    DATA: IT_SAVED_OBJECTS TYPE  CRMT_RETURN_OBJECTS,
        REFERENCE(ET_EXCEPTION) TYPE  CRMT_EXCEPTION_T
          IT_OBJECTS_NOT_SAVED TYPE  CRMT_OBJECT_GUID_TAB.
    *DATA: wa_order TYPE CRMT_ORDERADM_H_COM.
    *MOVE-CORRESPONDING wa_ls_orderadm_h to wa_order.
    *CALL FUNCTION 'CRM_ORDER_H_COMPLETE_OW'
    CHANGING
       cs_orderadm_h       = wa_order.
    ls_act_to_save = wa_ls_orderadm_h-guid.
      APPEND ls_act_to_save TO lt_act_to_save.
      CALL FUNCTION 'CRM_ORDER_SAVE'
        EXPORTING
          it_objects_to_save = lt_act_to_save
        IMPORTING
          ET_SAVED_OBJECTS = IT_SAVED_OBJECTS
          et_exception = it_exception
          ET_OBJECTS_NOT_SAVED = IT_OBJECTS_NOT_SAVED
        EXCEPTIONS
          document_not_saved = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
       WAIT UP TO 2 SECONDS.
      commit work.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = c_x.
      WRITE: / 'Service Contract updated = ', p_obj_id.
      ENDIF.
    ENDIF.

  • Need BAPI to update 'Payment terms' for service contract

    Hi ,
    I need to update 'Payment Terms' for a large set of Service contracts. Can you pls suggest me a BAPI to do this. Can I use CRM_ORDER_MAINTAIN function module for my requirement. If yes, what are the parameters need to be passed?
    Thank you,
    Regards,
    Rajesh.

    Replace the
    LT_BAPISDITMX-CUST_MAT35 = 'X'.
    by a
    LT_BAPISDITMX-PMNTTRMS = 'X'.
    Regards,
    Raymond

  • Idoc Blaord for service contracts - update contracts

    Hi
    I am working with a 3rd party contract management system.  I am now interfacing with this package to work with Service Contracts.  When I try and process the BLAORD idoc, it comes back with an error saying that the package number already exists.
    Im my opinion it is trying to create a new line item and therefore it is not happy to use the package number for the service line item that already is there.  I need it to modify this entry and update the condition records.
    Please help
    Thanks

    Hi,
    Related to the error 00344, I did not find much information. I only found the following:
    notice that the IDOC must contain two E1EDC20 segments to
    transfer one service line. The first segment just contains header
    information and maybe some unimportant default values, but not the
    service data. The package number of this header line links the services
    to the item. The subpackno of this service line must be the package
    number of the 'real' service lines. I have copied an example from one of
    our internal systems below.
    In addition you may have a look at note 420334. It has nothing to do
    with ALE or contracts, but the concept of creating a service line is
    the same.
    Example:
    E1EDC20 001:
    SGTYP      001
    PACKNO     0100009042
    INTROW     0000000001
    EXTROW     0000000000
    RANG       0
    SUBPACKNO  0100009043
    MENGE      0.000
    PEINH      1
    PREIS      0
    BRTWR      0
    NETWR      0
    CURCY      EUR
    UEBTO      0.0
    AUSGB      0000
    FRPOS      1
    PERNR      00000000
    KNT_MENGE  0.000
    KNT_WERT   0
    UNG_WERT   0
    UNG_MENGE  0.000
    ALTROW     0000000000
    MSGFN      005
    E1EDC20 002:
    SGTYP      002
    PACKNO     0100009043
    INTROW     0000000002
    EXTROW     0000000010
    RANG       0
    SUBPACKNO  0000000000
    MATKL      01
    MENGE      120.000
    MENEE      HUR
    PEINH      1
    PREIS      1
    BRTWR      120
    NETWR      120
    CURCY      EUR
    UEBTO      0.0
    AUSGB      0000
    KTEXT1     xxx
    PERNR      00000000
    KNT_MENGE  0.000
    KNT_WERT   0
    UNG_WERT   0
    UNG_MENGE  0.000
    ALTROW     0000000000
    MSGFN      005
    But I do not know if this is your case, if not, I would recommend to open a ticket at SAP.
    Best Regards,
    Arminda Jack

  • Service Contracts Line and Header Tax amounts are not matching

    Hi,
    I am creating service contracts using API. Using below code i am applying price adjustments on the line. while using the below API Tax is calculated at line level and added for each line But the Tax filed on the header is not getting updated. I fwe go to front end and click on reprice then the Tax amount is added to the header(If the contract created with status 'Entered').
    Please help me to fix this.
    l_multi_line_tbl (0).ID := l_x_clev_rec.ID;
    l_multi_line_tbl (0).price_list_id :=l_curr_price_list_id;
    l_multi_line_tbl (0).lse_id := 46;
    l_multi_line_tbl (0).line_pl_flag := 'Y';
    l_x_return_status := NULL;
    apps.oks_auth_util_pub.compute_price_multiple_line (
    p_api_version
    => 1.0,
    p_detail_tbl 
    => l_multi_line_tbl,
    x_return_status   => l_x_return_status,
    x_status_tbl 
    => l_status_tbl);
    Thanks,
    Hari

    not answered yet.

  • New line item in the service contract

    Hi Gurus,
    I have requirement to add the new line item in the service contract. Details are as follows.
    as per the requirment, manually we are entering the outbound category via web Ui (service -> service contract).Now I have to develope a badi/method  in standard badi exec_methodcall_ppf which will insert a new line item with the same material as of outbout category but with the item category as inboud.
    could you please help in how can I maintain the new line time. I know we have to use the crm_order_maintain FM but I'm confused what all parameter we need to pass to maintain this.
    can someone please share the code to do that. TIA

    Hi Paul,
    It seems there is no option in changing the condition records at the billing plan item level.
    Please try the following.. see if it helps. To execute the invoices with new condition record values directly, make the settings at the billing item category level goto -- the billing document frame -- under serivces frame -- pricing type select option Carryout new pricing (Option B). This option updates the billing document at the time of invoicing with new price calculation.
    please see if this can help you out.
    Have a good day!!!
    Nandu

  • Problem reading service contract from ibase

    Hi Experts,
    I am required to read the service contract document from the Ibase component.
    I am unable to find the table or function module to read the service contract
    when i pass Ibase value.
    I am using the badi CRM_SERVICE_CONTRACT and i an required to read the contract here
    based on my way of selection and not using the standard selection.
    Pls provide ur valuable guidance...
    Thanks,
    SA

    Hi Gert,
    I am getting short dump when i have updated the value inside tht badi for the hader and the item guid of the contract.
    When i try to enter the hard coded values it accepted, but whn i pick the value through function module or through the select query and palciong inthe table,its giving me short dump.
    I hope you can guide me to solve this serious issue,a little urgent.
    Thanks,
    SA
    Edited by: Saurabh Agrawal on Nov 27, 2008 1:01 PM

  • Tax error when updating renewal contract lines

    Hi,
    We're doing the contract renewals custom way, and apply a price increase and some other minor modifications to contract lines. Now, I have some more modifications to the program based on new user requirements. So, after calling the renewal API, I need to check the actual term for ext. warranty on the order line and change the term of the contract, AND set the price to same as the contract that got renewed. When I do this, my update to the renewal lines does not go through and errors out with the following:
    1.The system cannot find tax information for tax regime US-SALES-TAX-101 and tax &TAX. Please contact your tax manager. (TAX_CODE=DISTRICT)
    I would really appreciate if someone could provide some insight into this, as I'm just stuck with this and cannot move forward.
    Thanks!
    Alka

    Hi Alka,
    logically I would check
    ==> Log in with service contracts manager responsibility and query the renewal contract that is created
    -- Check if the tax code information is populated. If yes then check if the tax code has been end dated in system.
    -- go to Setup --> Transactions --> Transaction Types. Query Invoice-OKS and Credit-OKS and check if Tax Calculation check box is selected
    -- go to Setup --> Transactions --> Sources and query your batch transaction source and check how Autoinvoice is setup to handle imported transactions that have invalid tax rates.
    You can read up details of this in the implementation guide "Setting up service pricing and billing" chapter, page 61 to 68.
    ==> There was a bug logged for this error (metalink article id: ID 786000.1), and it is relevant to 12.0 / 12.1 apps version. You may want to check if the related patch solves your problem.
    Hope this helps!
    Thanks,
    Sid.

  • Bill To Account is missing on Service Contract line after customer merge

    Hi
    This probelem relates to service contracts that have customers that were merged. After the existing customer (on the contract) was merged with a new customer the contract address are updated with the the new Customer and Addresses (this is all standard merge fucntionality). The issues is the lines on the contract are not updated properly with the new Bill to Address fromt the merged into customer. The end result is when this contract is invoiced the invoice lines are errroing in AR interface due to the Bill Account being missing.
    Please let me know if you have faced similar situation and what steps did you take to resolve this issue.
    Thanks
    Kundan

    Hi Siddharth,
    Thanks for your reply. The patch suggested by the Metalink Doc ID 353230.1 has already been applied in our case, still this issue. Please let me know if you have some other alterantive solution.
    Thanks
    Kundan

  • Turn Pricing Off in Service Contracts

    Hi,
    We are imlplementing R12.0.6 Service Contracts.
    In our business scenario the price is finalized even before the contract is created.
    So for us when we create the contract we just need to update the price of the contract line and not reprice it.
    Is there a way to turn off pricing in service contracts so that the lines are not priced when the contract is saved?
    I am aware that we can override the priced amount but wanted to check if that call could be avoided thus resulting in better performance as we have complex pricing rules setup.
    Regards,
    Tushar

    Tushar
    Set the profile value OKS: Use Advanced Pricing for Manual Adjustment to No and try.
    Thanks
    Nagamohan

  • Canceling a service contract

    Hi,
    I am passing a future cancellation date for a service contract through a custom BAPI . The date is getting passed, but the billing plan line items are not getting deleted. I have to manually go into the service contract and select the date again to delete the bill plan line items.
    Can anyone please let me know how to do the action through the BAPI?

    Hello again Sloppy_Carlton,
    I’m glad to see you are utilizing the forums to reach out to us about multiple experiences, although I am sorry to see that neither of the experiences you posted about left you feeling delighted.
    Per our Return & Exchange Promise, we may return or exchange almost everything; however, devices that are damaged would be excluded. It seems the unauthorized modification (rooting and unrooting the phone) may have been the cause of the phone not turning on when attempting to update your operating system to KitKat. We would not be able to accept this device for an exchange or return as it would be considered damage from the unauthorized modification.
    That being said, I’m glad to hear you seem to have been provided a one-time solution to this experience. We truly value your insight and the time you have taken to share these insights with us. If you should need any further assistance, please feel welcome to reach out to us.
    Thank you for posting on the forum! 
    Tasha|Social Media Specialist | Best Buy® Corporate
     Private Message

Maybe you are looking for