Create default sales area data on BP creation using BUPA_GENERAL_UPDATE

Dear all!
We have the following requirement: whenever a user creates an organization in WCUI, we need to create some default data for the BP in the background, such as relationships (employee responsible, etc) and sales area data.
I have created an implementation for BADI BUPA_GENERAL_UPDATE and use it to add the desired data. For relationships, this is working just great, but I´m having trouble with the adding of sales area data, since the system is not properly saving the data. I use the following code:
* Assign data for sales area
  MOVE: 'O 50000632' TO ls_sales_area-sales_organization,
        '01'   TO ls_sales_area-distribution_channel,
        '01'   TO ls_sales_area-division.
  ls_data-customer_group1 = '330'.
  ls_data-customer_group2 = '003'.
  ls_data-customer_group3 = '002'.
  ls_data-customer_group4 = '006'.
  ls_data-customer_group5 = '021'.
  ls_data-pay_guar_proc   = '0001'.
  CALL FUNCTION 'CRM_BUPA_FRG0010_ADD'
    EXPORTING
      iv_partner_guid = ls_changed_instances
      is_sales_area   = ls_sales_area
      is_data         = ls_data
      iv_x_save       = ' '
    IMPORTING
      et_return       = lt_return
      ev_error        = lv_error.
  CALL FUNCTION 'CRM_BUPA_FRG0010_SAVE_COMMIT'.
Problem is, that with the call of
  CALL FUNCTION 'CRM_BUPA_FRG0010_SAVE_COMMIT'.
I get a short dump of type "SYSTEM_ON_COMMIT_INTERRUPTED", but without the call, the sales area data is not saved. I tried the same code in a Z-report (not in a BADI) and it worked just fine.
Any ideas on how to commit the data so the sales areas will be saved? Helpful answers will be rewarded!!
Thank you all & Kind regards
Christoph

Hi Pratyasha!
Thanks for your reply. I figured, that by explicitly calling the commit FM, system commit procedures are interrupted.
The thing is, that just by calling the FM for adding the sales areas does not result in those sales areas acutally created. What I mean is, that after the BAdI is executed, no sales areas are maintained for the newly created customer. All the more funny, since this exact same procedure is working for creating relationships. See following code:
  READ TABLE it_changed_instances INTO ls_changed_instances INDEX 1.
* Get BP-Number for sy-user
  CALL FUNCTION 'CRM_ISA_IUSER_GET_BP_TO_ALIAS'
    EXPORTING
      username         = sy-uname
    IMPORTING
      business_partner = lv_user_partner.
* Map GUID to partner number
  CALL FUNCTION 'BUPA_NUMBERS_GET'
    EXPORTING
      iv_partner_guid = ls_changed_instances
    IMPORTING
      ev_partner      = lv_partner
    TABLES
      et_return       = lt_return.
  CLEAR lt_return.
* Create employee responsible
  CALL FUNCTION 'BUPR_RELATIONSHIP_CREATE'
    EXPORTING
      iv_partner_1_guid = ls_changed_instances
      iv_partner_2      = lv_user_partner
      iv_relationship   = 'BUR011'
      iv_date_from      = sy-datlo
      iv_date_to        = '99991231'
      iv_testrun        = ' '
      iv_x_save         = ' '
      iv_xdfrel         = 'X'
    TABLES
      et_return         = lt_return.
which is in the same BAdI and acutally results in this relationship beeing created for my newly created customer. Works fine, just not for sales areas.
I´ll be grateful for any comments on that issue!
Kind regards
Christoph

Similar Messages

  • Default Sales area data during BP Account creation in WebUI

    Hello everyone,
    I have got a requirement where I need to populate Sales, Shipping and Billing data whenever a BP Account is created in WebUI.
    Based on Sales Org selected the corresponding details as to be populated by default. This functionality exists in standard BP transaction whenever we create a BP in Sold-to-Party and select Sales Org.
    Can we implement the same functionality in WebUI as well using any standard Function modules.
    Please Help.
    Thanks in Advance,
    Naveen

    Hi Pratyasha!
    Thanks for your reply. I figured, that by explicitly calling the commit FM, system commit procedures are interrupted.
    The thing is, that just by calling the FM for adding the sales areas does not result in those sales areas acutally created. What I mean is, that after the BAdI is executed, no sales areas are maintained for the newly created customer. All the more funny, since this exact same procedure is working for creating relationships. See following code:
      READ TABLE it_changed_instances INTO ls_changed_instances INDEX 1.
    * Get BP-Number for sy-user
      CALL FUNCTION 'CRM_ISA_IUSER_GET_BP_TO_ALIAS'
        EXPORTING
          username         = sy-uname
        IMPORTING
          business_partner = lv_user_partner.
    * Map GUID to partner number
      CALL FUNCTION 'BUPA_NUMBERS_GET'
        EXPORTING
          iv_partner_guid = ls_changed_instances
        IMPORTING
          ev_partner      = lv_partner
        TABLES
          et_return       = lt_return.
      CLEAR lt_return.
    * Create employee responsible
      CALL FUNCTION 'BUPR_RELATIONSHIP_CREATE'
        EXPORTING
          iv_partner_1_guid = ls_changed_instances
          iv_partner_2      = lv_user_partner
          iv_relationship   = 'BUR011'
          iv_date_from      = sy-datlo
          iv_date_to        = '99991231'
          iv_testrun        = ' '
          iv_x_save         = ' '
          iv_xdfrel         = 'X'
        TABLES
          et_return         = lt_return.
    which is in the same BAdI and acutally results in this relationship beeing created for my newly created customer. Works fine, just not for sales areas.
    I´ll be grateful for any comments on that issue!
    Kind regards
    Christoph

  • BP Relationship with Sales Area Data

    Hi,
    I am trying to create BP relationships with Sales Area Data and partner functions using FM BAPI_BUPA_PFCT_ADDFUNCTION, however, I am unable to do so because the chose partner function is time dependent. When I try to create the same relationship from the tcode BP, I am able to do so.  BAPI_BUPA_PFCT_ADDFUNCTION is not called in this case. Can anybody tell me which FMs are used so that I can use the same in my custom development.
    Thanks,
    Sarat

    Hi,
    U can implement the FM accordingly :
    declare the data.
    DATA : LT_NEW_ENTRIES TYPE STANDARD TABLE OF BAPIBUS1006_SALES_AREA,
    LW_NEW_ENTRIES LIKE LINE OF LT_NEW_ENTRIES,
    LT_RET TYPE TABLE OF BAPIRET2..
    *Assign the required values
    LW_NEW_ENTRIES-SALES_ORGANIZATION = 'O 50000000'.
    LW_NEW_ENTRIES-DISTRIBUTION_CHANNEL = '01'.
    CALL FUNCTION 'BUPA_PFCT_ADDFUNCTION'
      EXPORTING
       IV_PARTNER1           = '0000000569'
      IV_PARTNERGUID1       =
       IV_SALES_AREA         =  LW_NEW_ENTRIES
        IV_BPFUNCTION         = '00000004'
       IV_PARTNER2           = '0000000568'
      IV_PARTNERGUID2       =
      IV_STANDARD           =
       IV_TESTRUN            = ' '
       IV_X_SAVE             = 'X'
    TABLES
       ET_RETURN             = LT_RET
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'.
    Hope its useful.
    Regards,
    Shwetha.

  • Sales Area Data For Account (CRMM_BUT_FRG0080) - FM needed

    Hello experts,
    i search for a bapi (or FM) to assign new sales area data to an account. I need to do this without creating a contact-assignment (Leave CRMM_BUT_FRG0081 blank).
    I know the table CRMM_BUT_FRG0080, but i have no success in searching for an FM.
    Any ideas?
    Regards,
    Mario

    Hi Mario,
    You can assign sales area data to an account using the FM:BAPI_BUPA_FRG0010_ADD
    Just fill in all the required fields in import parameter SALES_AREA and  DATA.
    Your query will be resolved.
    Regards,
    PePe

  • Sales Area data in MSA

    Dear Colleagues,
    In MSA application, go to BP --> SAles Area data tile. Here, I am trying to create the sales area data for BP. But no sales area data is transferred to MSA (all dropdowns are empty).
    Org model is transferred successfully in CRM.
    Now now to get this in MSA. Which subscription is needed for this?
    Please respond
    Regards
    Milind

    Hi Milinda,
    In Server, once the Org Management settings are all configured in CRM online we must run the report CRM_ORGMAN_DOWNLOAD with option 'initial'.
    IMG->CRM->Master data->Org. management->Data Transfer: Copy Org. Structure to CRM Mobile
    Delta - Changes Only: X
    Then,synchronise r/3object: DNL_CUST_SALES 
    replication objects cdb:
    DNL_CUST_SYS_TB  
    DNL_CUST_SD_OR1  
    DNL_CUST_SD_OR2  
    CRM_DNL_ORGMAN  
    --> create a subscription
    Fábio

  • Sales area data screen -BDC

    Hi All,
            I have a requirement that when i click on the kunnr field in alv report it should go to
    transaction  XD02 and should be on screen Customer sales area data..
    if i use call transaction 'XD02' and skip first screen it goes to 'Company code screen'
    and hot the sales area data screen
    so can anybody pls tell me how to achiece this means can we use BDc if yes pls provide the cdoe
    i used bdc but when i record it goes screen by screen and finaly reaches sales area data.
    if i use display all screen if i use 'N' mode it do not got to sales area screen
    but the user want to directly navigate to sales area data screen when he cick kunnr field.
    thanks

    Hi pankesh,
    while recordin in SHDB when the screen moves to sales data screen record the screen by inputting some error data and while calling the transaction through CALL TRANSACTION use processing mode as 'E' so that the the BDC will get stuck in the sales screen and the user can rectify the data and then continue.
    Regards,
    Anil N.

  • BP Creation in Web UI - How to enable Sales Area data?

    Hello Gurus
    We are using CRM 2007 and create BPs in CRM and then have them replicate to OLTP. This works as desired if I launch Transaction BP and maintain the record.
    But in Web UI, I dont see many of the fields that are necessary for replication such as Account group for R/3 customer acct group. Nor do I see a tab for sales area data maintenance. I am logging on to Web UI with SALESPRO profile. How do I enable enter of key information in Web UI BP maintenance, so that I could see the replication from CRM to OLTP R/3.
    Please advice.
    Thanks
    Jai

    Hi Jai,
    I am glad that the answer was helpful for you.
    In the create mode just the details view is available, as this is the way the component BP_HEAD is implemented.
    To understand this please open the component workbench, component BP_HEAD. Go to the runtime repository and compare the window CorpAccountNew(this is for the create mode) with the default window named MainWindow. In the first one just a sole view is offered.
    But after you change from the create mode to edit mode (push the save button and then the edit one) you will actually see all the assignment blocks. Maybe this helps. But if you still see the need of the sales area assginment block it can easily be made available via a customer UI enhancement.
    Good luck and best regards,
    Erika

  • Business Partner creation - Sales Area Data retrieves blank divisions

    During business partner creation, the sales area data assignment block will retrieve a list of all relevant sales organizations, distribution channels, and divisions that are replicated from ECC. This is working fine. However, it also adds to this list with the sales organizations, distribution channels, and blank divisions. Blank divisions do not exist in either ECC or CRM. It appears to be using the dummy division settings, but I have attempted to configure with the indicator "CRM Header Div. Active" as both active and inactive, to no effect. The only time I have been able to condense this list into a single line has been when I actually activated dummy divisions -- to which CRM would now retrieve only sales organizations, distribution channels, and blank divisions. This is not an ideal solution either.
    How do I get the system to remove the blank divisions from being displayed? It is very confusing to the users, not to mention polluting the screen.
    Example (both are being displayed, I only want the one with an actual value to be displayed):
    Sales Org = 1000, Dist Chan = 10, Division = blank
    Sales Org = 1000, Dist Chan = 10, Division = 10

    any insight woudl be much appreciated. thanks.

  • Unable to see the sales area data while creating BP

    i am working on ides while creating BP data set (Sales area)is in not visible i am unable maintain the sales area deatils ( shiping and billing relevant data .etc).
    could some help me how to retrive the sales area data
    thanks in advance
    Swamy

    Hi Kumar,
    In that case I recommend you to check the view V_TBZJ1 in transaction SM30 and see whether the line
    Subheader  Screen text   Description  Appl. Scrn.seq.cat.
    CRM001     Sales area data CRM          CRM1  CRM001
    exist or not if not then pls maintain it.
    Also check the view V_TBZJ1C for the lines below
    Subheader  Description         Item number  Active
    CRM001     CRM:Sales area data    2            X
    If this also not exist then maintain it.
    After this you will be able to see sales area tab when you will create the BP in role SP.
    <b>Allot points if my post helps!!</b>
    Best regards,
    Vikash.

  • Create Account with Sales Area data

    Hi,
    Can we create new account in account identification in Interaction Cetner with Sales area data?
    We need to create accounts(Sold to party, customer, consumer) in the call center and subsequently service orders will be created for the new account.
    Regards,
    Shridhar
    Edited by: Shridhar Deshpande on May 31, 2011 3:52 AM

    Hi ,
    You can create the organisation information in CRM using transation ppoma_crm. Please take a look at this link for some more information
    http://help.sap.com/saphelp_crm50/helpdata/en/56/0d4e3cb7f4d83ee10000000a114084/frameset.htm
    Thanks & Regards ,
    Anita

  • Bapi for creating Sales Area data on Relationship

    Hi,
    I am looking for BAPI for creating relationship between business partners with sales area data in CRM 5.0.
    Example - I would like to create relationship type CRMH03.
    Bapi BUPR_RELATIONSHIP_CREATE does not allow for maintaining sales area data (Sales org, distribution channel, division).
    Does anybody know such a bapi?
    Regards
    Radek

    hi
    try using these
    BAPI_BUPA_CREATE_FROM_DATA
    BAPI_BUPA_RELATIONSHIP_CREATE
    best regards
    ashish

  • CRM - Bapi for creating relationship between BPs with sales area data

    Hi
    I am looking for BAPI for creating relationship between business partners with sales area data in CRM 5.0.
    Example - I would like to create relationship type CRMH03.
    Bapi BUPR_RELATIONSHIP_CREATE does not allow for maintaining sales area data (Sales org, distribution channel, division).
    Does anybody know such a bapi?
    Regards
    Radek

    Hey Radek,
    I am actually looking for the same functionality. Were you able to find a solution although no one replied to your question in this thread? If so, it would be very helpful for me to know. Maybe you have to combine more BAPIs in order to add the organization information to the relationship. But I have no idea how.
    Best Regards
    Mirko

  • Credit management....sales area data

    hi gurus,,
    I have some doubts in Credit Management>
    1. In my development Server....Customer Master data > Sales Area Data > Billing Tab Page>CREDIT CONTROL AREA...is not reflecting.
    using version 4.7... why is was not reflecting... any configaration settings is required??.
    Anybody having configuration material of CREDIT MANAGEMENT and FREE GOODS DETERMINATION..
    MAIL ID:::  [email protected]

    Hi ravi, 
      Notes on Credit mangement
    SAP SD Credit Management
    All business have their own credit management needs, SAP allows you to specify your own automatic credit checks based on a variety of criteria.  You can also specify at which critical points in the sales and distribution cycle the system carries out these checks.
    SM30 - Table/View
    V_TVTW - Define Distribution Channel
    V_TVTA_KKB - Assign sales area to credit control area
    V_T014 - FI - Define Credit Control Area
    T001CM - FI - Assign Permitted Credit Control Area to company code
    OVXG - Set up Sales Areas
    e.g.  Sales Organization
                      Distribution Channel
                                  Division
                      Distribution Channel
                                  Division
    FD32 - Customer Credit Management
    OVAK - Define credit limit check by sales document type
    Check Credit
    A - Credit limit check and warning message
    B - Credit limit check and error message (no sales order can be created)
    C - Credit limit check and delivery block (block delivery if hit credit limit)
    Options B and C -> used for checking open order values (when you create/change the sales order)
    D - Automatic credit control with open order values
    More control in transaction OVA8 - Automatic credit control
    You check for open orders and deliveries, or just open deliveries.
    or open order values with other options
    Credit group
    Allows you to combine different sales document types for the credit limit check
    VKM1 - Blocked SD Documents - Finance have to released the delivery block
    OVAD - Define credit limit check by delivery order
    whether the automatic credit check occurs at the time of delivery creation and/or goods issue
    OVA7 - Define credit limit check by item category
    Set whether to include/exclude item category for credit limit check
    OVA6 - Define credit group. You can groups together different business transactions which should be dealt with in the same manner with regard to the credit check.
    You enter the credit groups when you configure the sales document types for credit management and define the (D - automatic credit check).
    SAP default credit groups
    01 - credit group for sales order
    02 - credit group for delivery
    03 - credit group for goods issue
    OVA8 - Automatic credit control - Double click on the line items
    You can have the followings credit limit check :-
    Static
    Depends on the customer total value of open orders, deliveries, billing documents and open items.
    Open items
    No of days open
    Overdue open items checks is based on the ratio of open items that are overdue by a certain number of days.
    Max open items %
    The customer balance must not exceed a certain percentage.
    Oldest open items
    If you don't want to deliver to the customer at all when even only 1 invoice is overdue.
    Tick the Check for Oldest Open Item and Set the field Days oldest item = 1.
    Days oldest item
    No of days allowed for overdue or payment terms.
    Use of the credit check Oldest Open Item. If a user attempts to alter the order quantity of a released sales document
    that was previously blocked, it would be reblocked again by the system.  The system only reblocks the sales document if the new order quantity is above a certain % amount.
    Released documents are still unchecked
    The preset % is whatever you want to set it as when configuring your automatic credit processing. You enter a deviation % and number of days,eg, you can set it so that an order can be changed by up to 10% within 30 days of original order entry date without it going back on credit block.
    Next Review Date
    If a customer has a credit limit of 1000 USD, and you would like to restrict this credit limit only to be available in current month (say March). If the document day is in April then the credit limit is zero.
    You can use the "NextReview date" and "Number of days" fields and combined it with the "Last int.review" field in customer credit master "Status" view (FD32).
    VOKR - Display of work list for credit management (configure the display variant)
    Free goods determination
    Free Goods Determination in Sales Order
    Free goods has the following limitations:
    - Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: ‘With material 1, material 2 and material 3 are free of charge‘ or ‘If material 1 and material 2 are ordered at the same time, then material 3 is free of charge‘.
    - Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    - Free goods are only supported for sales orders with document category C (for example, not quotations).
    - Free goods are not supported for deliveries without reference to a sales order.
    - Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    - If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
    4.6x
    Not all Sales Order can be used for free goods determination.  You have to check the SD document category if it does not work.  Only category 'C' are supported.  Check transaction VOV8.
    Assume that you want to configure an inclusive FREE goods routine.  Customers must order a minumum quantity of 5 before any free goods can be assign.  For every quantity of 3, the customer will be given 1 free goods.
    WC07 - Maintain Number Range Intervals
    e.g.
    No   From number       To number
    01    0000010000         0000099999
    IMG -> Sales and Distribution -> Basic Functions -> Free Goods ->
    Maintain Access Sequences
    New Entries
    Acsq
    NA00
    Save
    Maintain Condition Types
    New Entries
    Ctyp   Name             AcSq
    FREE  Free Goods    NA00
    Save
    Maintain Pricing Procedures
    Procedures
    New Entries
    Procedure   Description
    FREE           Free Goods
    Select Procedure FREE then click Control data
    Step   Cntr   Ctyp
    10       10      FREE
    V/N6 - Activate Free Goods Determination
    Assign Order Type OR with Document Procedure A with Procedure FREE
    VBN1 - Create free goods determination
    e.g.  FREE inclusive
    Material  Min qty   From   are free good   Calc Rule   Free Goods
                           5           3                1                      1                1
    In this example, if you create a Sales Order for a quantity of 10, SAP will prompt you 7 as the customer order qty and 3 will be free.  Customer only pay for the 7 quantity.
    Reward points if it helpful

  • Sales Area Data of BP unavoidable?

    Hi
    i'm workin in a CRM system that has been permanently disconnected from the ERP because of a spind off/management buy out
    I wanted to make standard transaction type CMIC (individual contract) in CRM usable, very very basic, without pricing functionality and any extras, just a manual amount of money to be edited in a product position and that's it.
    I get the error message that the currency is not there and that the sales area data of the BP is not accessable. I get these messages before providing an item oder material number. Just after providing the sold-to-party and pressing enter. No difference if i work in WebUI or in SAP GUI  CRMD_ORDER
    A check shows of the BP in role CRM000 sold-to-prty shows that indeed there is no sales area maintained and no sales area data accessible / all the fields are greyed out
    A check in the customizing shows one distribution channel and even a division but i think the data is corrupt, the sales area choosing fields in the BP are white without content, the BPs dont have any sales area data, all fields are greyed out. So there is no way to write any sales area data into the BP, it would be needed for hundreds of BPs anyway so this is not the way.
    Now the system insists on the currency in the transaction type CMIC. The currency is copied from the sales area data from the BP. It cannot be provided manually. I will have to find a way to achieve this. I just saw, that it is the same with transaction type TA, so i guess all the sales transactions will have that problem in common
    What can i do? I checked the org units in the transaction. They do have an attribute 'Currency' that is filled 'EUR' but the system doesn't care
    The weird thing is that opportunities (with the same BPs and the same product) can be created without errors - and there EUR is provided as currency in the item by default...?
    Any ideas
    Thx

    If you are a functional consultant
    Once the transaction's org determination is done, you can always check the information from the Header Organization tab. This is you know already. If you want to know the Sales Areas a Business Partner (sold-to) is maintained, then go the BP maintenance (Transactio BP ), select the appropriate role - in your case sold-to role of the BP. If you are already not in the Sales Area then click the Sales Area Data button in the toolbar. Then click Choose sales area button in the Sales Area section.Inthe popup, if you click the Maintained Sales Areas, you will see the actual Sales areas the customer has been extended to.
    I am sure you know the above facts too. Well,
    If you are a technical consultant
    The Sales Org details of the transaction can be erad using the function module CRM_ORGMAN_READ-xxx There are more than one FM to read depending upon where you want to read that from - like from the order buffer (good in BAdIs when creating / chaning the order) or fromthe DB. Pick one you want.
    To read the Sales area of a sold to BP, the data is available in the table CRMM_BUT_FRG0080 You can get the maintained sales area information for a given BP.  You can also use the function module CRM_BUPA_FRG0080_READ
    If this is not what you wanted, then you must rephrase your question for me to understand.
    Easwar Ram
    http://www.parxlns.com

  • Default Sales Org Data based on User parameters

    Hello,
    I wonder if it was possible to have the Sales org data beeing filled in automatically based on the user parameters. In ERP you can set this up in the user settings "Own data". In CRM you also have this option but I'm not sure if the WEB GUI uses this data in order to default the values.
    What I would want is that when a user creates a prospect, the sales are data is automatically filled based on the user's parameters.
    would this be possible?
    Kind regards

    Hi Tom,
    You can attach the user to a BP which in turn is assigned with org attributes.
    Also the determination should be enabled.
    Regards,
    Leon

Maybe you are looking for

  • How can i delete an apple id account?

    I have 2 apple id's. I no longer need 2. How can i delete an apple id? is it possible? or just stop using it and deleting all my info...? thanks!

  • Error while loading data from R/3 to PSA

    Hi, While loading data from R/3 to PSA i am getting error 'the argument 0.6 j cannot be interpreted as a number when assing application structure.Actually in R/3 0.6 and JPY are 2 different columns.So when loading  J is getting concatenated with 0.6,

  • Adobe photoshop elements 12 tech support for program errors in producing contact sheets

    hello my adobe photoshop 12 is not producing contact sheets anymore. it keeps telling me that there is a program error. I have all of the updates and still it will not work. Is there anyone out there who can suggest what to do?

  • Problem with GX630 optical drive

    Note: I have owned the GX630 for about 4-5 weeks give or take Overall I really like the GX630 I purchased. It has ran and performed exceptionally well. With that said, I have a slight problem with the optical drive of my 630. I have noticed this prob

  • Safari not finding servers; reloading software did not help

    This problem started with one of the security updates about 4 weeks ago. I have been on the phone with Apple, reloaded the software, and nothing works. Other browsers connect fine. Seems others have had this same problem. Any good solutions OTHER tha