Blocking of Adding or Updation of Business partner

Hi Folks,
I am having problem with the transaction notification where i am having a udf in the business partner master data where in that udf i want to maintain only unique records for that i have used transaction notification but i am getting error message for every unique record updation or adding of the record
iF @transaction_type IN (N'A', N'U') AND
(@Object_type = N'2')
begin
select t0.sortkey
from ocrd t0
where t0.cardcode =  @list_of_cols_val_tab_del
     and t0.sortkey in (select t1.sortkey  from ocrd t1 where t1.U_Envsrtky <> '' and t1.CardCode <> @list_of_cols_val_tab_del )
end
Begin
SET @error = 14
SET @error_message = N'Same Sort key is not allowed'
End
Here sort key is my udf.Please help me regarding this
Thanks & Regards
Charan.B

Hi,
Plz check dis :
IF @transaction_type IN (N'A', N'U') AND
(@Object_type = N'2)
BEGIN
If EXISTS (SELECT T0.[U_Envsrtky ]
FROM OCRD T0
WHERE T0.[cardcdoe] = @list_of_cols_val_tab_del and T0.[U_Envsrtky ]  =  T0.[U_Envsrtky ])
Begin
SET @error = 14
SET @error_message = N'Same Sort key is not allowed'
End
END

Similar Messages

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

  • How to update the business partner title using the function module

    Hi ,
    I have to update the business partner title to Mr or Ms based on the gender.
    If BP is male title should be updated as Mr else Ms.
    Please provide some inputs on which function module to use to do it in mass update.I have to search the BP's whose title is not created and i have to change those titles to Mr or Ms.

    Hello,
    Try with BBP_USER_CHANGE_FIELDS :
    - set CHANGE_FORM_OF_ADDRESS,
    - put corresponding key you want (see TSAD3 table) in FORM_OF_ADDRESS_KEY.
    Regards.
    Laurent.

  • Update of Business Partner Master Data

    Greetings. I am wondering is there any way you can configure the standard system so that the analyst responsible for the business partner will receive a notfication when the business partner master data is updated in SD. Currently its linked to the customer master so any name/address changes in SD will be automatically synched in the FSCM Credit Master Data.

    Hi,
    This is not possible in configuration. Maybe with some abap involvement you can write a query on the change table.
    That might help.
    Regards,
    Richard

  • Trying to update the business partner using BAPI_BUPA_CENTRAL_CHANGE

    Hi all ,
    i am tryibg to create a function module which updates the first name, last name, email id of the business partner that i already created. the return table shows zero entries and i dont find any udate being done for the business partner if i go and check in the respective table. can some one tell me what is the problem.
    Import paramters for my function module are business partner number, first name, last name, email -d.
    FUNCTION Z_CHANGE_BP2.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(CUST_NO) TYPE  BU_PARTNER
    *"     VALUE(FIRST_NAME) TYPE  BU_NAMEP_F
    *"     VALUE(LAST_NAME) TYPE  BU_NAMEP_L
    *"     VALUE(EMAIL_ID) TYPE  AD_SMTPADR
    *"  TABLES
    *"      IT_RETURN2 STRUCTURE  ZRETURN1 OPTIONAL
    *"      IT_RETURN4 STRUCTURE  ZRETURN1 OPTIONAL
    Defining the internal tables used in BAPI BAPI_BUPA_CENTRAL_CHANGE.
    DATA: it_CENTRALDATA TYPE STANDARD TABLE OF  BAPIBUS1006_CENTRAL  WITH HEADER LINE.
    DATA: it_CENTRALDATAPERSON TYPE STANDARD TABLE OF BAPIBUS1006_CENTRAL_PERSON  WITH HEADER LINE.
    DATA: it_E_MAILDATANONADDRESS TYPE STANDARD TABLE OF  BAPIADSMTP WITH HEADER LINE.
    DATA: it_RETURN1  TYPE STANDARD TABLE OF  BAPIRET2 WITH HEADER LINE.
    DATA: it_RETURN3  TYPE STANDARD TABLE OF  BAPIRET2 WITH HEADER LINE.
    ****Values for seacrh term1, search term2 of it_CENTRALDATA
    it_CENTRALDATA-SEARCHTERM1 = FIRST_NAME.
    it_CENTRALDATA-SEARCHTERM2 = LAST_NAME.
    APPEND it_CENTRALDATA TO it_CENTRALDATA.
    first name, last name of it_CENTRALDATAPERSON
    it_CENTRALDATAPERSON-FIRSTNAME = FIRST_NAME.
    it_CENTRALDATAPERSON-LASTNAME  = LAST_NAME.
    APPEND it_CENTRALDATAPERSON TO it_CENTRALDATAPERSON.
    Value for E_MAIL of it_TELEFONDATANONADDRES-
    it_E_MAILDATANONADDRESS-E_MAIL = EMAIL_ID.
    APPEND it_E_MAILDATANONADDRESS  TO it_E_MAILDATANONADDRESS.
    Call the BAPI BAPI_BUPA_CENTRAL_CHANGE
    CALL FUNCTION 'BAPI_BUPA_CENTRAL_CHANGE'
      EXPORTING
        BUSINESSPARTNER      = CUST_NO
        CENTRALDATA               =  it_CENTRALDATA
        CENTRALDATAPERSON  = it_CENTRALDATAPERSON
      TABLES
    E_MAILDATANONADDRESS  = it_E_MAILDATANONADDRESS
        RETURN                             = it_RETURN1.
    Call Commit work
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT          = 'X'
    IMPORTING
      RETURN        = it_RETURN3.
    ENDFUNCTION.

    Hi,
    Pass values to the Parameter CENTRALDATA_X   in your FM 'BAPI_BUPA_CENTRAL_CHANGE'
    Something Like:
    CALL FUNCTION 'BAPI_BUPA_CENTRAL_CHANGE'
    EXPORTING
    businesspartner = bpartner
    centraldata = centraldatadetail
    centraldataperson = centraldataperson
    CENTRALDATAORGANIZATION =
    CENTRALDATAGROUP =
    centraldata_x = centraldata_x
    centraldataperson_x = centraldataperson_x
    CENTRALDATAORGANIZATION_X =
    CENTRALDATAGROUP_X =
    TABLES
    return = return.
    Refer to:
    problem with 'BAPI_BUPA_CENTRAL_CHANGE'
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi-bupa_central_change-need-help-549117

  • Adding New attributes to Business Partner Data

    Hi Experts,
    I am new to SAP CRM. The requirement with me is that i have to add two attributes 'County' and 'Demographics' (both Text Fields) to the Business Partener Master. Is there some way to achieve this by configuration like by set types etc. or will i have to use workbench to add these fields. Please Help?
    Thanks.
    Rahul

    Hello Rahul,
    I think the COUNTRY should already be present in the Business Partner master data. Please follow the steps below to find the BOL Structure of the BP Address data. In this structure all the address related data would be present. I hope the fields which you are looking should already be present in this structure.
    1) Run the txn GENIL_MODEL_BROWSER
    2) Give the component set as BP_APPL
    3) "BuilHeader" is the root object. Navigate to the relation "BuilStandardAddressRel" under the root object.
    4) The child object under this relation is "BuilStandardAddress". In the attribute structure, you will find the structure CRMST_ADDRESS_BUIL . This structure holds the data.
    To check the values using this BOL model, follow the steps below
    1) Run the txn GENIL_BOL_BROWSER
    2) Give the component set at BP_APPL
    3) Go to the search object "'BuilHeaderAdvancedSearch'". Give the advanced search criteria and search.
    4) The result would be displayed and try navigating to the "BuilStandardAddress" child object as mentuioend in the steps above.
    Hope this helps.
    Regards,
    Vinay

  • Adding new Field in Business Partner General Data

    Hi All,
    I'm working on a mySAP CRM 4.0 implementation.
    I would like to extend the business partner data with this new three field:
    1) Capital Stock
    2) Base Number
    3) Sales pl.
    The three field are Dun & BradStreet information.
    I  created a BSP that show all Business Partner General Data and now we want to show also those fields.
    In order to extend the BP data we received two suggestion:
    The first one is to use the BP marketing Attributes.
    The second is to use the Easy Enhancement Workbench.
    I know that advantages of the EEW is the automatic creation of the layout (BSP & DYNPRO).
    Doo you have any suggestion??
    It's a good solution to use the EEW??
    Thanks a lot.
    Eugenio

    Hi,
    First of all thanks a lot for the fast reply.
    I have to add some information:
    The end-user will use the application only in PC-UI mode (through Enterprise Portal).
    We are customizing the BSP application (Accounts).
    I know that in past some colleagues used the EEW to extend or to add some field to application BP. I remember that the field (after Enhancement the new fields was visible in SAPGUI mode and in BSP mode).
    Now my questions are the following:
    1) Are you sure that I can use EEW only 10 times??
    2) We are using the BAPI (CRMXIF_PARTNER_SAVE) in order to add Business Partner in the system; after the creation of the new fields with EEW the BAPI (CRMXIF_PARTNER_SAVE) will be able to insert the new fields?? Or we need to extend this BAPI with new fields?
    The second question is very important for us because we have to import in the system about 30.000.000 of Business Partners.
    Kind Regards.
    Eugenio.

  • Adding new fields to business partner relationship

    Hi all,
    We are trying to add new fields to business partneru2019s relationship using EEWB. We are adding 4 new fields when relationship type is "Is shareholder of", so we have created a new project at transaction EEWB and then a new extension and the wizard is started. At the wizard, we have define the 4 new fields with cardinality 1:1 and time dependent without gaps.
    Also we have done all the extension setup, so the new fields only appears when that relationship is created and we can fill the new fields.
    The problem that we have is that every time that you create a new relationship type "Is shareholder of", even if you fill the new fields or not, the system spend more than one hour to save the data, having also a "STACK_STATE_NO_ROLL_MEMORY" dump... It seems that the system goes inside a loop that never ends, but we haven't change any function, because the standard functionality is enough for us.
    Any help on how to proceed?
    Thanks in advance!!

    Please, anyone can help?
    Thanks!!

  • Updating the business partner

    Dear friends!!!
            I am working on a problem in which i am supposed to merge the similar bp... I have the target bp in one internal table and source in another internal table i have programatically merge the data from source internal table to target internal table... now i am supposed to update the database table respect to target bp. here to update bp i can use.. bus_ei_extern structure and FM bupa_inbound_main_save... or i am supposed to lock the db tables and update them directly... would you like to tell me what will be more convinient to me.. as I have target bp in internal table and it is not type bus_ei_extern, so please tell me if i update all the db tables directly without using bus_ei_extern structure will it be give me any trouble,,,,,.... please reply me any suggestion, code, article will be greate help of mine
    thanking you,,,,
    regards
    Naim

    You should never update standard SAP table directly. Please avoid it as long as possible. If anything goes wrong in your system, SAP will not support it.
    Table update is always the easiest option. But that should not be used, especially on critical master data information like BP.
    Regards,
    Kaushal

  • Problem Updating Business Partner DI Object loaded via XML

    Hello,
    I'm working with  SB1 8.81 PL 08
    I have to Update a Business Partner Object in a Target SB1 Company Database starting from a Business Partner Objects saved as XML from the Source SB1 Company Database.
    Normally this works fine, I load from XML this Object and calling the Method Update all data is Syncronized in the Target DB.
    But if the Business Partner Object has at least a Contact Person and in the Target Company DB a Marketing Document has been created for this particular Business Partner the Update Method called on the loaded by XML object always fail giving the following error:
    Error: -10
    Message: Contact Person is referenced by another object.  , 'Sales Quotations [...contact Person ID...]'
    The modifications I need to update do not involve contact person in the BP object but only other simple properties like Tel Nr. ...
    In conclusion ... if the target BP has a marketing document created it seems no more possible to update it with an XML load, instead if a load the BP using the   GetByKey() Method and changing manually some properties of the object the Update works fine.
    Thank you for support.
    Max

    Hi,
    First Use the getbykey to get the Business partnet then update.
    sample code is available with B1WS package
    Regards.

  • 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 business partner in SRM through FM or using ABAP

    Hi expert,
    My requirement is to update the requester field in the Shopping Cart with another requester as well as some other CUF field. Through BBP_PD_SC_UPDATE i am able to update the CUF item fields but i am unable to update the business partner.
    please help, its urgently...
    regards,
    Rahul

    Hi Sankar,
    1)You can use the program BSP_UPDATE_MIMEREPOS to upload the photos in the mime repository.
    2)Use the following code to get the content from your mime and set the content to your interactive UI element as Xstring format.
        data:
        mime_repository type ref to if_mr_api,
        content type xstring,
        url type string value '/SAP/BC/BSP/SAP/myBSPapplication/rajkumar.jpg'  .
      mime_repository = cl_mime_repository_api=>get_api( ).
      call method mime_repository->get
        exporting
          i_url     = url
        importing
          e_content = content.
      wd_context->set_attribute( name = 'DATAS' value = content ).
    Thanks,
    Rajkumar.S

  • ISU_S_PARTNER_CHANGE - update business partner contact

    Hi There,
    Im trying to update a business partner's contact details.
    Currently I'm using ISU_S_PARTNER_CHANGE but it is not updating the details with the one being entered. and its still displaying the same old detail
    anyone if this is the correct function module to update contact detail or is there other function module to use. thanks.
    regards,
    r3venant

    Hi r3venant,
    Could you tell me in which transaction you are trying to update ?
    Generally, you have to call the Functions in sequence like ;
    1) ISU_O_PARTNER_OPEN
    2) ISU_O_PARTNER_ACTION <- here X_OKCODE will be 'SAVE'
    3) ISU_O_PARTNER_CLOSE
    Hope this helps.
    Regards
    Caglar

  • Error in updating business partner

    When I update the business partner I get the following error-
    Invalid Code Fiscal IDs for BP Master Data - Brazil CNAE Code line: 3    Message 173-36

    You may check your CRD7 table to see if the Fiscal ID for this BP is there or not.  If not, create a new one.  Someone might have deleted certain codes there.
    Thanks,
    Gordon

  • Add/Update Business Partner Error 5002

    Hi,
    I'm having problem with the DI API. We are testing our application with SAP B1 SP1 PL 34. With this version, it seems impossible to add or update a business partner. oBP.add and oBP.update always return the error -5002 with no description.
    I even have the error if I remove every line of code that change something on the bp. So, I have a code like this that return the error -5002
    oBP.GetByKey(intBPID)
    oBP.Update
    How this can return an error if we change nothing otherwise it is a bug ?
    Anybody has an idea or suggestion ?
    Thank you for your help
    Jodérick Picard

    Hi,
    I've more details.
    I was testing the update with my code :
    oBP.GetByKey(intBPID)
    oBP.Update
    and I found some business partner where the code works ok, BUT most of the business partner doesn't work.
    All business partners update without error in SAP B1. So how could it not work with the SDK when the data itself is valid for SAP B1 when using the GUI?
    Thank you
    Jodérick Picard

Maybe you are looking for