CRM/ABAP-Update BP Partner data.

Hi All,
I'm trying to update partner information for a BP.
I've put in the code as below, but it doesnt seem to work. Any ideas?
Thanks and Regards,
Preethi.
REPORT  zupgrade_activity.
DATA : lt_guid           TYPE TABLE OF crmt_object_guid,
      lt_guid_tab        TYPE crmt_object_guid_tab,
       it_guid_tab       TYPE crmt_object_guid_tab,
       ls_guid           TYPE crmt_object_guid,
       ls_partner        TYPE crmt_partner_com,
       lt_exception      TYPE crmt_exception_t.
DATA : lt_new_partner    TYPE crmt_partner_comt,
       et_saved_objects  TYPE  crmt_return_objects,
       et_not_saved_objects TYPE crmt_object_guid_tab,
       lt_input_fields      TYPE crmt_input_field_tab,
       ls_input_fields      TYPE crmt_input_field,
       lt_input_field_names TYPE crmt_input_field_names_tab,
       ls_input_field_names TYPE crmt_input_field_names.
DATA : lt_orderadm_h      TYPE crmt_orderadm_h_wrkt,
       it_partner         TYPE crmt_partner_external_wrkt,
       lt_attributes_com  TYPE crmt_partner_attribute_com_tab,
       lt_partner_com     TYPE crmt_partner_comt.
..Step1..Retrieve all records with process type Z061 on specified date..
SELECT guid FROM crmd_orderadm_h INTO TABLE lt_guid
WHERE
process_type = 'Z061' AND
created_at GE '20080317000000' AND
created_at LE '20080517235959'.
lt_guid_tab = lt_guid.
IF lt_guid IS NOT INITIAL.
  LOOP AT lt_guid INTO ls_guid.
.Step2..For each record update partner information..
    ls_partner-ref_guid = ls_guid.
    ls_partner-ref_kind = 'A'.
    ls_partner-ref_partner_fct = 00000014.
    ls_partner-ref_partner_no = 0000001040.
    ls_partner-partner_fct = 00000014.
    ls_partner-partner_no = 0000001040.
    ls_partner-ref_no_type = 'BP'.
    ls_partner-ref_display_type = 'BP'.
    ls_partner-relation_partner = '459D77E836F0284481185E26CF1E72F3'.
    ls_partner-display_type =   'BP'.
    ls_partner-no_type =   'BP'.
    ls_partner-ref_partner_handle = '0001'.
    INSERT ls_partner INTO TABLE lt_new_partner.
..Step 3..Populate input fields for changing table in FM CRM_ORDER_MAIN.
    ls_input_fields-ref_guid = ls_guid.
    ls_input_fields-ref_kind = 'A'.
    ls_input_fields-objectname = 'PARTNER'.
    ls_input_field_names-fieldname = 'DISPLAY_TYPE'.
    INSERT ls_input_field_names INTO TABLE lt_input_field_names.
    ls_input_field_names-fieldname = 'KIND_OF_ENTRY'.
    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 = '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 = 'REF_PARTNER_NO'.
    INSERT ls_input_field_names INTO TABLE lt_input_field_names.
    ls_input_field_names-fieldname = 'REF_PARTNER_FCT'.
    INSERT ls_input_field_names INTO TABLE lt_input_field_names.
    ls_input_fields-field_names = lt_input_field_names.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
      EXPORTING
        it_partner            = lt_new_partner
      CHANGING
        ct_input_fields       = lt_input_fields
        ct_partner_attributes = lt_attributes_com
      EXCEPTIONS
        error_occurred        = 1
        document_locked       = 2
        no_change_allowed     = 3
        no_authority          = 4
        OTHERS                = 5.
    INSERT ls_guid INTO TABLE it_guid_tab.
    CALL FUNCTION 'CRM_ORDER_SAVE'
      EXPORTING
        it_objects_to_save       = it_guid_tab
     IMPORTING
       et_saved_objects          = et_saved_objects
       et_objects_not_saved       = et_not_saved_objects
     EXCEPTIONS
       document_not_saved         = 1
       OTHERS                     = 2.
    CLEAR : ls_partner.
    CLEAR : lt_input_fields, ls_input_fields ,lt_input_field_names ,ls_input_field_names.
    COMMIT WORK AND WAIT.
*..Step4..Calling FM CRM_ORDER_READ in order to check if the record has been updated after saving.
    CALL FUNCTION 'CRM_ORDER_READ'
      EXPORTING
        it_header_guid       = it_guid_tab
      IMPORTING
        et_orderadm_h        = lt_orderadm_h
        et_partner           = it_partner
      EXCEPTIONS
        document_not_found   = 1
        error_occurred       = 2
        document_locked      = 3
        no_change_authority  = 4
        no_display_authority = 5
        OTHERS               = 6.
    IF sy-subrc NE 0.
      RETURN.
    ENDIF.
    CLEAR : it_guid_tab.
  ENDLOOP.
ENDIF.

Hi Ajay,
ELM?
I can tell you that normally, business partners are not physically deleted from the database, but only deletion flagged. It is however possible: sending a delete Bdoc is all it takes. A program for doing this is available in the OSS system.
Duplicate checks (based on address data f.e.) are usually performed by third-part software. We are using Trillium for this purpose, but I can't recommend it.
Kind regards,
Michael.

Similar Messages

  • IDOC to update business partner data in FSRI(part of CRM system) .

    Hi ,
    I want to know an INBOUND IDOCs to update business partner data in FSRI (part of CRM system) .
    Please help .
    Regards
    Chetan
    Moderator message: please do your own research before asking.
    Edited by: Thomas Zloch on Dec 21, 2010 5:14 PM
    Moderator message -
    Also, when closing old threads, there is no need to add a comment. Adding a pasted answer like "rectified" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved.
    Edited by: Rob Burbank on Dec 21, 2010 1:20 PM

    Mass not available in 4.0, could write your own LSMW routine but you still will create bdocs for updates so not sure how that will improve your performance.

  • Update Header Partner data in a Purchase Order in 4.6C system.

    Hello all,
    I have written a report program to add/update partner data at PO header level.
    The report uses BAPI POCHANGE for the update.
    But the BAPI_PO_CHANGE does not transfer/update Partner Information for the PO's in 4.6 C system.
    The same code functions properly for Purchase Orders in ECC6.0 systems.
    Please provide me some inputs for a probable solution to update PO header partner data in 4.6C system.
    Thanks in advance.

    Hello Hiren,
    Thanks for the prompt response.
    I am populating the structure POPARTNER with partner information.
    And passing header information in POHEADER. i.e the PO Number.
    I have not marked any fields in POHEADERX as 'X'. It still works in ECC6 system.
    But does not work in 4.6C system.
    Thanks in advance.
    Edited by: Amar.t on Mar 7, 2010 12:59 PM

  • CRM Mass Update of RelationShip Data and other Fields

    Hello,
    I have to perform a mass Update on some Fields:
    VIP -> BUT051 -> Relationship
    FLG_NOUSE -> ADSMTP -> Address Data
    FLG_NOUSE -> ADTEL -> Address Data
    FLG_NOUSE -> ADFAX -> Address Data
    I've found already TX "MASS" and "MASSD" but those fields are not available.
    (Fortunately I could already use TX "Mass" for updates on Correspondence Language.)
    Thanks for your help
    Andreas

    Hi, You can prepare a list and use Menu -> Mass Update option to do the update. Limitation, per request it can update only 50 records. If there are more you have to do it recursively. Alternate solutions are to import, reset the value and export back or by writing a program using webservices. Hope it helps
    Venky CRMIT

  • Mass Update of Business Partner Data in CRM

    Hi,
    I would like to know how I can perform a mass update of business partner data in CRM and then have this replicated into R/3.
    I have found notes 802804, 876602, 859632 but these only apply to CRM 5.0 and we are currently working on CRM 4.0.  Does anyone know of anything similar which exists in CRM 4.0?
    I have checked other posts and found help files links like the one below but is this only on CRM 5.0?  (http://help.sap.com/saphelp_crm50/helpdata/en/3c/9b56fae6c7424cafcdf17370399812/frameset.htm )
    Has anyone used the tx. MASS in CRM?
    Also our volume update levels is as high as 300,000 record and updating in CRM and replicating into R/3 through the middleware is causing performance problems.
    Does anyone have any tips on the best approach for this?  Many thanks.
    Regards
    JoJo

    Mass not available in 4.0, could write your own LSMW routine but you still will create bdocs for updates so not sure how that will improve your performance.

  • Create or Update Business Partner in CRM  ?

    Dear Folks  ,
    Scenario is to Create or update Business partner in CRM from  thirdparty system  via PI
    It would be great if you could  clarify the following
    Hope we have BAPI to create and Update Business partner in CRM system but my question is
    1. Can we use any predelivered PI content - Message Interfaces - as proxies ( Server proxies ) to create BP from system ?
    2. Same interface will work for Update as well ? 
             IF so what is that content ?  where to find for our PI System ?
    3. Can we use the same way for Client proxies as well  when we want to update the business partner ?
    4. What are the inbound and outbound Message Interfaces are available ?
    Any help will be highly appreciated
    Thanks.,
    Shiva

    Hi Ravi ,
    I think that i am not described my question properly    , Say i have CRM system where i have to create BP for this input comes from external system (forget about the system ) , Here i want to use Proxy (Server proxy ) which helps me create Business partner in CRM system .
    Here my question is If sap delivers the  Inbound interface ( where server proxy already generated by SAP) , which i will use to create BP ?
    Can we do in this way ?
    Thanks
    Shiva

  • How to update  Previous Employee Data  in ABAP  HR

    I'm new to  ABAP HR Module and have problem to update  Previous Employee Data  in ABAP  HR.
    Helpful  Advice will be appreciated.

    wat u want update or upload
    plz don't post incomplete questions
    u should clear with ur requirement

  • Updating business partner hierarchy in CRM

    Hi,
    I Need to build a interface to update business partner hierarchy (Transaction BPH) in CRM. I can not find a suitable FM/BAPI for this purpose. Please advise me how to accomplish this.

    Hi,
    Where do you start to activate or configure Business Address Services in R/3 Business partners. Any links to user guides or startup documents will be greatly helpful.
    Thanks very much
    Cheers!
    Padi

  • Updating business partner addresses in CRM

    Hi,
    I Need to build a interface to update business partner addresses in CRM and assign it to a address usage. I can not find a suitable FM/BAPI for this purpose. Please advise me how to accomplish this.

    Hi,
    Where do you start to activate or configure Business Address Services in R/3 Business partners. Any links to user guides or startup documents will be greatly helpful.
    Thanks very much
    Cheers!
    Padi

  • Post Business Partner data from SBL CRM to SAP CRM

    Hi CRM Gurus,
    I am very new to SAP CRM. I have got an assignment wherein I will get the XML file from Siebel CRM, which will contain the "Business Partner" data.
                                             I need to upload this data into SAP CRM by mapping all the fields available in the XML file.
                              Please let me know the step by step process to reach the goal.
    Regards
    Sandy

    Sandeep, since this is a conversion related task you might want to browse http://sap.help.com and search for the so called 'XIF Adapter'. This adapter is part of SAP CRM's Middleware and provides the functionality to import and export individual objects using XML/SOAP technology.
    Second option you could evaluate is BP creation through the usage of the standard BADI's that SAP delivers. Let me know whether this gets you started, Tiest.

  • Entering Business Partner data from IC Webclient - CRM2007

    Just wanted to check that if I enter Business partner data from the IC Webclient is the data stored in the CRM backend tables for example BUT000, BUT050 etc and if so is this done on the fly or a scheduled update? If not what tables are they stored in.  Also can I see the same information once it is entered in the webclient via the CRM transaction BP Thanks

    Hi Niten,
    The tables are the same (for example: but000 for master partner data, but050 for relations, and so on...).
    The data is updated when you press the respective save button, or when you press the 'end' button at telephony bar (to end an Interaction Center Interaction).
    And yes, you can then check the information in BP t-code.
    Just try it and see by yourself
    Kind regards,
    Garcia

  • Standard Function modules to update customer partner

    Hi,
    Can anyone please suggest standard function modules to update customer partner functions?
    Was looking at Customer_insert, customer_update, CUSTOMER_UPDATE_SALES_AREA.
    I will have only the partner data in the customser sales view to get updated. I dont need the company data.
    Awaiting some insightful inputs please.
    Thanks,
    Satheesh

    FM and TABLES
    http://72.14.235.104/search?q=cache:71IXBMWcX_8J:reflexcontracts.co.uk/SAP_R3_QUICK_REF.xlsupdatetable+tse05&hl=en&ct=clnk&cd=1&gl=in
    FUNCTION MODULES
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful.........
    Minal

  • Automatic update of HU data in Outbound delivery

    Hello all,
    I would like to create an ABAP program to automatically update the HU data in an outbound delivery. The purpose is to have an excel spreadsheet with the HUs per delivery and download them into the outbound delivery without the need to use manual actions.
    Does anybody know of a FUNCTION, BAPI, IDOC or anything else that may assist me in this task ?
    Thanks,
    Isaac

    Go To transaction BAPI, look at Logistics General -> Handling Unit Management -> Handling Unit
    If you want to create a delivery and know the materials and HUs just populate the delivery IDoc and process it.
    If you want to pack material by uploading this spreadsheet then look at LM* transactions as that is quickest way to find what you want.
    Mike

  • Special stock partner data problem in ERP system during "Post Goods issue"

    Hi all,
    I have a (probably) customizing issue in an ERP 6.0 EhP4 test system which not occurs in the ERP 6.0 test system. There is a difference but no one could tell me, what causes the problem in this scenario:
    I have two customers, C1 and C2. C2 is the special stock partner (SB) of C1.
    I've created a Consignment Fill-up order, then a delivery document based on the order and posted it with "Post Goods Issue". During the update process, a function module (SD_PARTNER_UPDATE) receives partner data in an internal table which contains the sold-to, ship-to and special partner data.
    When we tried the same process in the ERP 6.0 EhP4 test system then special-partner data did not occur in the parameter table (I've used the same customers and materials). The special stock partner is probably not taken into consideration due to some customizing settings.
    My question is what should I change in the customization to run the process the same way as in the ERP 6.0 system? As far as I know there are no new modifications which have effect on this area, and the used test customers and materials are almost the same - there are no noticable differences.
    Thanks in advance.
    Akos

    I tried setting that field in the sale order this morning.  By defaulting it to "C"; I was able to get warning message for TAE line.  I was able to post goods with TAE and TAQ, being different quantities.  I need the check to determine if TAE and TAQ delivery quantity are different.  Using this fields seems to be line specific.  Thanks for the suggestion.  I now know what that field does to the delivery.
    I rewarded points.
    Thanks,
    Tony

  • CRM 7.0 in partner determination procedure

    Dear all,
    In CRM 7.0 in partner determination procedure for an ITEM level am unable to set up procedure so that any partner will always be just mirror of the partner set on HEADER level.
    This functionality works only when the new order is created, then when changing the partner on HEADER level the partner on ITEM level partner is dynamically changed a according to HEADER.
    When changing the order later u2013 HEADER partner is changed, but the ITEM partner stays the same and had to be changed manually. If an ITEM partner is not changed manually an error is raised while transferring to ERP (because of customizing settings there). Partner determination procedure in customizing is set for ITEM to display all the partners defined in CRM (no only for defined in the particular procedure). I would basically need the ITEM partners to be always the same as HEADER partners no matter what operations are done in the HEADER is must be 1:1 with ITEM (automatically copied when creating/changing).
    I know that we can use ABAP development, but if possible I would like to use just customizing tools.
    Many thanks for your comments

    Hello Guys,
    thanks for your reply. The issue was that the system was copying the partners from header to item even if in customizing I had set up the item det. procedure so only basic partners like SP or Bill to shall be present. In our scenario the user has to change header partners from time to time. Before upgrade (version 4.0) if the user changed the partner header and this partner was also at item level the system changed this also so header partners were equal to item partners. After upgrade this functionality disappeared (I have checked user exits and did not find any cutomer dev.)
    At current CRM 7.0 if the header partner is changed item partners stays the same. And this can causing the troubles in R/3 due to settings of partner determination. To make it shorter. If you need to change the BDoc after it has been created by CRM use class if_ex_crm_dataexchg_badi~crm_dataexch_after_mbdoc_fill.
    Regards
    Radim

Maybe you are looking for

  • MacBook + samsung syncmaster T220

    Hi! I have Samsung Syncmaster T220 and miniDisplayPort to DVI adapter. When I connect that monitor w/ my macBook I can set maximum resolution 1280x1024 but maximum for monitor is 1680x1050. How I can set maximum resolution to 1680x1050? Thanks all.

  • While backing up with Time Machine my MBA restarts

    I have MBA Mid 2011 and I am using my Go Flex Home Network drive (NAS) to back up my machine. SInce last couple of days while backing up my MBA is freezing with the white screen and going into a Limbo ( Yes like the the move inception it desnt wake u

  • Viewing pictures online?

    More specifically, is there a way to view pictures that are on your phone, or in your inbox, online?  Like is there an archive of sent/recieved messages that you can access on this site?

  • Usage of for-each loop inside another for-each loop

    Hi All, I have tried using a for-each loop inside another for-each loop as given below. <?for-each:G_1?> <Customer Details> <?for-each:G_2?> <Address> <?end for-each?> <?end for-each?> Its not getting inside the second loop.I have referred this link

  • How do I download Windows Media Player for Mac?

    I keep downloading it from the Microsoft website..and...it doesn't work. My husband bought a new MacBook (Leopard) and he's trying to figure out how to look at something on a website that gives him a link to download this. I helped him download Flip4