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.

Similar Messages

  • Service Contract Address Error

    Dear Experts ,
    Facing an error in the Service Contract(CRMD_ORDER) - Address doesn't exist when the BP is existing and has an active address.
    Also facing an error at the BP level saying - Partner Address doesn't exist (AM013) .
    Have checked the relevant SAP notes but doesn't seem to be applying to our situation.
    Can you suggest where from the service contract would pick the address for the BP.
    Thanks
    Rishika

    Hi Rishika,
    I have faced similar issue before. The reason of the AM13 error is primarily due to incosnistencies in ADCP and ADRC table.
    Check if the number of entries are same in both. If not, then maintain them. It solved my issue once!
    Good luck!
    Regards,
    Suman

  • Update address-independent telehpone of BP

    Hi all,
    We need to change address-independent telephone numbers of business partner.
    When such record already exists (telephone numbers are maintained), this can be done using function module 'BAPI_BUPA_CENTRAL_CHANGE' with TELEFONDATANONADDRESS.
    However, when address-independent telephone record does not exist (all telephone numbers are empty) - BAPI return warning 'BAPIADTEL was not found' and BP is not updated.
    We have found out that address-dependent data is updated with two separate functions: 'BAPI_BUPA_ADDRESS_ADD' and 'BAPI_BUPA_ADDRESS_CHANGE', but we have not been able to find out similar ADD function for address-independent records.
    Does anyone know how to update address-independent records (telephone, in this case) via ADD method?

    Hi Ujwal,
    I dont have a ready code right now.
    Firstly, the module BUPA_CENTRAL_GET_DETAIL can be used to get all the details of the address independent communications.
    Later for delete:
    BUPA_CENTRAL_CHANGE : For example say telephone data has to be filled.
    The corrsponding cons number has to be filled in 'IT_ADTEL_ADDR_IND' and the corresponding flag set in IT_ADTEL_ADDR_IND_X and also the update flag should be set to 'D'. In this way the telephone number can be deleted.
    For restricitng the validity, the corresponding valid from and valid to fields can be updated accordingly in the same way.
    Regards,
    Sudheer.

  • Error: No address found for partner function type Ship-To Address

    Hi All,
    I am working in SRM 5.0(patch level1) and for PDP scenario
    When I am creating service PR in R/3 with two header items and each header item has only one below line item (service item), then it transfer in SRM properly. But if I am maintaning more than one below line item for each header item it does not transfer in SRM. In SLG1 error is coming as "No address found for partner function type Ship-To Address".
    Please suggest some solution.
    Thanx in advance
    Soma

    Hi Moon
    Please check this note
    1166211 - Delivery address from Vendor not transferred - Ext. Req.
    or do you maintain ADDR_SHIPT maintained in PPOMA_BBP
    regards
    Muthu

  • Always stuck at Updating Address Book

    We are in a migration process from Exchange 2010 to Exchange 2013, now users WHO are migrated to Exchange 2013 cannot download address book manually, stays on processing and bar never starts at all, waited for 2 hours but the same. The other thing is that
    at the bottom of Outlook it's always like this "ALL FOLDERS ARE UP TO DATE, UPDATING ADDRESS BOOK. CONNECTED TO: MICROSOFT EXCHANGE" and this is for all users that have been migrated to Exchange 2013. Did I miss some configuration somewhere for the
    address book. Where can I start to troubleshoot this issue.

    Running the command comes back empty, but I have the  "SystemMailbox bb558c35-97f1-4cb9-8ff7-d53741dc928c"
    Get-Mailbox -Arbitration | where {$_.PersistedCapabilities -like "*oab*"} | ft name,database<o:p></o:p>
    Hi,
    According to your further description, I noticed that there is no Arbitration mailbox which is responsible for OAB generation in your Exchange server.
    Please run the following command to check all Arbitration mailboxes:
    Get-Mailbox -Arbitration | fl name,servername,Database,PersistedCapabilities
    If the mailbox "SystemMailbox bb558c35-97f1-4cb9-8ff7-d53741dc928c" is listed here, we can enable OABGen for it:
    Set-Mailbox -Arbitration -Identity "SystemMailbox{bb558c35-97f1-4cb9-8ff7-d53741dc928c}" -OABGen $true
    Alternatively, we can create a new organization mailbox for OAB generation:
    New-Mailbox -Arbitration -Name "OAB Mailbox" -Database “Mailbox Database 2044052308” -UserPrincipalName
    [email protected] -DisplayName “OAB Mailbox”
    Set-Mailbox -Arbitration -Identity [email protected] -OABGen $true
    Then run Update-OfflineAddressBook cmdlet or restart the Microsoft Exchange Mailbox Assistant service on Mailbox Role to force OAB Generation.
    Regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Winnie Liang
    TechNet Community Support

  • Partner in service contract and ibase

    Here is a data migration scenario, migration service contract from legance to crm:
    1. warranty data and sold to partner will be migrated to ibase in crm
    2. legancy contract will be migrated to crm contract, which also contains a sold to party
    So my question is whether there is a dependency about sold-to party between service contract and ibase,
    - for example., here is ibase contain product: A,B,C, but when create a contract for product D, which does not exist in a ibase, so whether this contract can be create, whether it can look up the if product exist in ibase according to sold to party,
    And whether it can prevent to create new contract for D?
    Many thanks.

    Hi Nagaraju,
    First of all, you can bill Service Contract and Service Order differently. This is because you may wish to charge contract fees irrespective of whether service occurs or not.
    Secondly, while maintaining DIP profile, you can use different material from the one used in contract. Just make sure that it gives explanation as to what service was performed so that customer will understand the invoice.
    DP90 will generate Debit memo request. You will need to create billing document against this using VF01.
    When you settle the service order (KO88), it will be settled against service contract.
    Please let me know if you need any further information.
    Regards,
    Aaditya.

  • Anyone else having issues with location services since the 7.1 update? Ever since I updated i've been seeing the location services on my status bar at all times.

    Anyone else having issues with location services since the 7.1 update? Ever since I updated i’ve been seeing the location services icon on my status bar at all times. I noticed that google was the app that was using it a lot, but after I turned the feature off for google my phone started using the “traffic”, “frequent locations” and “cell network search”. When I turn the feature off for all of those things it’s no longer a problem. So just wondering if anyone else is having this issue or if anyone has a solution?

    The "solution" is probably to increase your knowledge.  You've done good things.  Perhaps this article will educate you a bit more about location services.
    Basically, they can be very useful, but can cause a lot of iPhone use.  A major example is "Remind me to ... when I leave home."
    http://support.apple.com/kb/HT5594

  • 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

  • Update Address and communication  Details of BP

    Hi,
    Requirement is we need to update address and communication details of BP, please let us know relative BAPI for the same. Below roles has to be updated with given address and communication details,
    General Role
    Employee Role
    Help full information will be appreciated..

    Hi,
      For updation of address you can use
    BAPI_BUPA_ADDRESS_CHANGE.
    I guess you cannot update a role . You can only add new roles with BAPI_BUPA_ROLE_ADD .
    One more thing in address updation, Whatever fields are there in import parameter ( Address) you can update them even if they are not present in database.
    But in case of Tables( Communication details)  fields you can only update if the values are existing in database.
    Reward if helpful.
    Regards
    Sourabh

  • HT5654 Trying to install the latest update for itunes...error received "service apple mobile device failed to start.  verify thay you have sufficient priveleges to start system services"...?  I have unistalled and tried to reinstall???

    Trying to install the latest update for itunes...error received "service apple mobile device failed to start.  verify thay you have sufficient priveleges to start system services"...?  I have uninstalled and tried to reinstall???

    Hello Kimberly0914,
    It sounds like you have tried to launch iTunes after a recent update due to this error message, and you cannot install iTunes after uninstalling. I recommend the troubleshooting from the following article to help you named:
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/ht1926
    Then download and install iTunes with this link:
    http://www.apple.com/itunes/download/
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • HT1414 In updating my iTunes,I got a message "Service Apple Mobile Device failed to start. verify that you have sufficent priviliges to start system services". Cant figure out what to do

    In updating my iTunes,I got a message "Service Apple Mobile Device failed to start. verify that you have sufficent priviliges to start system services". Cant figure out what to do

    So many people are having this problem! Doehunter's instructions here worked for me!  Hope this helps. https://discussions.apple.com/message/23824640#23824640

  • HT1926 While updating my iTunes this message came up "Service 'apple mobile device' (apple mobile device) failed to start. Verify that you have sufficient privileges to start system services" what can I do to get my iTunes to work again?

    While updating my iTunes this message came up "Service 'apple mobile device' (apple mobile device) failed to start. Verify that you have sufficient privileges to start system services" what can I do to get my iTunes to work again?

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • Can't accurately update Address Book from LinkedIn vCard

    Hi everybody,
    Unlike when I used Outlook for Windows, I have had trouble updating Address Book with LinkedIn vCards.  If a contact leaves one company for another and I try to update his information, the new company name and title end up being put into the notes field in Address Book. I asked LinkedIn this and got the following reply:
    Thanks for reaching out to us - Sorry to hear that importing your contacts isn't working.
    Unfortunately, this feature works best with Windows products, like Outlook and was not designed for use with Apple products.
    I find this unacceptable and would love any suggestions as to a plugin or extension to make this work.
    Thanks!
    Doug

    I'm not sure if this will help.
    I have saved some sheets in csv format from Excel, but it seems that the import function from the address book doesn't accept the csv extension.
    Saving the data in a txt file did solve the issue.
    Make sure that your file extension is .txt and that the data is tab of semicolon delimited.

  • 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

  • Does the 10.5.7 update address command+f finder search issues?

    Does the 10.5.7 update address command+f finder search issues?
    Search has been horrible under 10.5 in that it does not reliably find FOLDERS on network drives, only file names.
    Even when I am looking directly at a folder and I search for it will not appear in the command+f window.
    Also the stupidity of not allowing a specific search location.
    Has this been addressed? I have, at any given time, 3-4 mounted servers.
    I do not have a choice now to search a specific hard drive.
    10.4.11 gave me the option under "OTHERS" to select a specific place to search.
    The only choice I have in 10.5.2 is "SHARED". Which searches all drives when I only want to search one. Nor do I have a choice of searching just one of my two internal drives.
    I talked with Chris in apple engineering several months ago, who acknowledged that search problems are a known issue under 10.5 and this was being addressed but have not heard any more. I don't want to download an update unless these broken search issues have been fixed. This is a production machine and I cannot have downtime in the Dept.

    Have you filed a bug report or enhancement request with Apple?
    http://bugreport.apple.com/

Maybe you are looking for