Regarding Autogeneration of Business Partner Code.

Dear All,
         I have a unique requirement. My client wants autogeneration of Business Partner Code in the Business Partner Master.
         Please guide me in regard to this.
Regards
Hitesh Parsawala

We normally have customer code generated as 'C00001' then 'C00002' etc and Supplier or vendors as 'S00001' and 'S00002' etc. This requires the FMS on the BP Code to be a little more complicated but not over the top.
DECLARE @MAXC as integer
SET @MAXC=isnull((SELECT CAST(MAX(RIGHT(OCRD.CardCode,5))+1 AS INTEGER)
FROM OCRD
WHERE OCRD.CardType<>'S' AND Len(OCRD.CardCode)=6 AND OCRD.CardCode like 'C%'),1)
DECLARE @MAXS as integer
SET @MAXS=isnull((SELECT CAST(MAX(RIGHT(OCRD.CardCode,5))+1 AS INTEGER)
FROM OCRD
WHERE OCRD.CardType='S' AND Len(OCRD.CardCode)=6 AND OCRD.CardCode like 'S%'),1)
--This will give you the next number then
SELECT CASE
     WHEN $[OCRD.CardType]='C' THEN (SELECT DISTINCT CASE
     WHEN LEN(@MAXC)=5 THEN (SELECT 'C'  + CAST(@MAXC AS varchar) )
     WHEN LEN(@MAXC)=4 THEN (SELECT 'C' + '0' + CAST(@MAXC AS varchar))
     WHEN LEN(@MAXC)=3 THEN (SELECT 'C' + '00' + CAST(@MAXC AS varchar))
     WHEN LEN(@MAXC)=2 THEN (SELECT 'C' + '000' + CAST(@MAXC AS varchar))
     WHEN LEN(@MAXC)=1 THEN (SELECT 'C' + '0000' + CAST(@MAXC AS varchar))
    END FROM OCRD )
WHEN $[OCRD.CardType]='L' THEN (SELECT DISTINCT CASE
     WHEN LEN(@MAXC)=5 THEN (SELECT 'C'  + CAST(@MAXC AS varchar) )
     WHEN LEN(@MAXC)=4 THEN (SELECT 'C' + '0' + CAST(@MAXC AS varchar))
     WHEN LEN(@MAXC)=3 THEN (SELECT 'C' + '00' + CAST(@MAXC AS varchar))
     WHEN LEN(@MAXC)=2 THEN (SELECT 'C' + '000' + CAST(@MAXC AS varchar))
     WHEN LEN(@MAXC)=1 THEN (SELECT 'C' + '0000' + CAST(@MAXC AS varchar))
    END FROM OCRD )
WHEN $[OCRD.CardType]='S' THEN (SELECT DISTINCT CASE
     WHEN LEN(@MAXC)=5 THEN (SELECT 'S'  + CAST(@MAXS AS varchar) )
     WHEN LEN(@MAXC)=4 THEN (SELECT 'S' + '0' + CAST(@MAXS AS varchar))
     WHEN LEN(@MAXC)=3 THEN (SELECT 'S' + '00' + CAST(@MAXS AS varchar))
     WHEN LEN(@MAXC)=2 THEN (SELECT 'S' + '000' + CAST(@MAXS AS varchar))
     WHEN LEN(@MAXC)=1 THEN (SELECT 'S' + '0000' + CAST(@MAXS AS varchar))
    END FROM OCRD)
END
Try Shift-F2 on the BP code with this FMS

Similar Messages

  • Business Partner Code when using *

    Hi all,
    In Business Partner code when the user want's to see all Business Partner and makes "*" appears the BP code, BP Name and Foreign Name.
    All user see this information except one that doesn't see the Foreign Name.
    Why?

    Hi Ad,
    Thank you for your reply.
    "Foreign Name" is already select in the Form Setting.
    You say that "This is a setting per user" but i dont think so. In Form Setting of the "List of Business Partners" i add "Account Balance" to one user and ALL users see the same information.
    Best regards,
    Augusto Silva

  • Regarding chossing the Business Partner Master Data

    Dear All,
                 I have one query regarding chossing the Business Partner Master Data. Let take an exapmle 
    suppose 2 sales person are making the sales Quotation and every sales Persons only making the quotaion
    for the specified leads or customers.Suppose Sales Person 'A' makes the quotaiton for 5 Leads and Sales
    Person 'B' makes the quotation for the different 5 persons.Now i want when  i Login into sales person 'A' Login
    and choose the Business Partner by pressing tab in sales quotation window , then that Sales Person 'A' can
    see only the Specified BP list which are belonging to his region.
    Thanks All.

    The access to Item Master and BP Master cannot be restricted to Users through Authorization. This is a known limitation of SBO.
    You can try this by using SDK.
    You can use Data Ownership Authorization, which means the marketing documents created by Sales Person 'A' will not be viewed by Sales Person 'B'
    Refer this thread for details
    [Customer master restriction in Marketing document.........;

  • Change business partner code

    Hi All,
       I have a prospect who wants to have the business partner code of 20 characters, as you may know 15 is the current. Do you know what is the best way to workaround this? He doesn't like the idea of using user defined fields.
    thanks to all
    Hector

    Hi Hector,
    You cannot change the length of the Business Partner Code (CardCode) field built into SBO. You need to use another field if that one is not good enough. You have various options and the best is probably to use a user-defined field. You can also use any other field on the BP Master Data which they don't use internally (like Foreign Name for example).
    Hope it helps,
    Adele

  • Regarding creation of business partner.

    Hi,
    when we are creating a business partner,how to get the different fields like person,organisation etc.What all bapi's or function modules can be used.
    can anyone help me in this regards?
    Thanks in advance,
    shwetha

    Regarding available BAPI's for Business partner(BP), you can check in transaction BAPI.
    Coming to different different fields for person and organisation, the question is not clear to me. Person, Organisation and Group are different categories of a BP and this we will select when creating a BP. So, the first step in creating a BP is selecting the category. Hence there is no seperate field to maintain the same.
    Regards,
    Sruendra

  • Autogenerate Business Partner Code

    Hi,
    Has anyone customized the B1 BP Master Data form to enable the system to automatically generate a BP code while in ADD mode?  Our client, understandably, does not want to have to refer to a separate list in order to find the next sequential BP number when adding a new BP.  It would also be very cool if customer codes could be preceded by a "C", vendor codes by a "V" and leads by an "L".
    Any information is appreciated.
    Thanks,
    Ted

    This is the formatted search I'm using. I quite like it
    DECLARE @MAXC as varchar(5)
    SET @MAXC=(SELECT MAX( RIGHT(T2.CardCode,5)) FROM OCRD T2 WHERE T2.CardType='C')
    DECLARE @MAXS as varchar(5)
    SET @MAXS=(SELECT MAX( RIGHT(T2.CardCode,5)) FROM OCRD T2 WHERE T2.CardType='S')
    SET @MAXS=(SELECT @MAXS+1)
    SET @MAXC=(SELECT @MAXC+1)
    SELECT CASE
         WHEN $[OCRD.CardType]='C' THEN (SELECT DISTINCT CASE
              WHEN LEN(@MAXC)=5 THEN (SELECT 'C'  + @MAXC)
              WHEN LEN(@MAXC)=4 THEN (SELECT 'C' + '0' + @MAXC)
              WHEN LEN(@MAXC)=3 THEN (SELECT 'C' + '00' + @MAXC)
              WHEN LEN(@MAXC)=2 THEN (SELECT 'C' + '000' + @MAXC)
              WHEN LEN(@MAXC)=1 THEN (SELECT 'C' + '0000' + @MAXC)
              END FROM OCRD )
         WHEN $[OCRD.CardType]='S' THEN (SELECT DISTINCT CASE
              WHEN LEN(@MAXS)=5 THEN (SELECT 'S'  + @MAXS)
              WHEN LEN(@MAXS)=4 THEN (SELECT 'S' + '0' + @MAXS)
              WHEN LEN(@MAXS)=3 THEN (SELECT 'S' + '00' + @MAXS)
              WHEN LEN(@MAXS)=2 THEN (SELECT 'S' + '000' + @MAXS)
              WHEN LEN(@MAXS)=1 THEN (SELECT 'S' + '0000' + @MAXS)
              END FROM OCRD )
    END

  • Process Integration Errors - Business Partner Replicate Confirmation Out

    Hi,
    Our C4C system is integrated (HCI) with our On-Prem system for our Accounts and Employees.  SAP was our integrated but for awhile now we are getting Health Check Incidents created in regards to a Business Partner Replicate Confirmation Out issue.  Reading through the incident info and going to Business Communication Monitoring page, we see multiple Technical Error messages that are Outgoing.  Each one indicates it's an Internal Server Error that has a timeout inteval of 120 minutes.  I know I can restart them but have a few questions that hopefully someone can answer
    1.  Why are they happening at a frequent rate?
    2.  Does this indicate that something is not configured in the system correctly?
    3.  Is my assumption that the issue lies in C4C since they are outgoing to our OnPrem system?
    4.  What can we do to make these confirmation messages go through without error.
    I have attached a copy of the incident info and the payload from one of the errors.
    Any help would be appreciated.
    Thanks.
    Jeff

    Hello Jeff,
    the Confirmation Message is mainly needed for storing an ID mapping in the system which has sended originally the Request message. If this confirmation message fails with an http code 500 then this indicates that the service is not properly configured. You should check your configuration on HCI and in CRM backend. A first check could be the "Connection Check" in the Communication Arrangement for this specific service. It should return something like 405 wrong method - this would indicate that the service is available on HCI.
    Best regards,
    Berthold

  • Business Partner Role  and Business Partner Grouping

    Hello Everybody!
    Business Partner Role  and Business Partner Grouping.
    Which correlation ist between this attributes existing.
    In which table are this infos stored, In order create I can use
    e.g. BUPA_CREATE_FROM_DATA
    but how is the way inversely. Suppose I want to abtain the information
    about a existing business partner which group he has etc.
    Regards
    sas

    Dear Sas,
    Business Partner Grouping is used to determine the number ranges to be used by the business partner at the time of creation.
    Business Partner Role determines the subset of all the data available to be shown and edited.
    I will give you a very simple (but imaginary) example for understanding the role concept: the business partner in a role of employee might allow you to enter a department id. So this field should be available to you for input when you edit the business partner in the role of employee. But suppose the same business partner is also a person who is your customer. And your customer will require a default payment term. So this field should be available for input when you edit the business partner in the role of a customer. Also, some applications use these roles to determine if the business partner is suitable for particular transaction. In the above example, Payroll application will only allow those Business Partner to be used if they are maintained as an employee. Similarly the sales application can mandate that you can only sell a product to a business partner if he is maintain in a 'customer' role.
    Please understand the example above is not real but given for the understanding of the concept of role.
    You can use the function module 'BUPA_CENTRAL_GET_DETAIL' to find the business partner group. And you can use the function 'BUPA_ROLES_GET' to find the role assigned to a Business Partner.
    Regards, Rakesh

  • PLD for Business Partner Master Data

    Hello all,
           I need a information regarding PLD for Business Partner Mater Data
           When i look in to Business Partner Mater Data PLD their is no system defined PLD.
          So i need to print the customer details in PLD. Then, how can get that details in to PLD.
          is their any process to add new PLD for Business Partner Mater Data, if so can any one
         suggest me how to get those details.
    Thans
    Santhosh.K

    Hi
    Can you please let me know the purpose of PLD for Business Master data ?
    I don't think you are trying to print each business master data information in PLD .
    I still think that this is for an internal purpose as you donot need to give print out to client .
    We can use parameter query to retrieve the information .
    Thanks
    Bishal

  • Wrong Suggest of Businer partner code

    I have a  problem in sales order with approval procedure and inactive business partner:
    When im trying to enter an inactive  business partner code in the document, suggest me  this code and let me create the draft to be authorized. How i can disable this option of suggest.
    Im working in SBO 8.8 pl15

    Hi Fernando,
    an inactive BP shouldn't be in the Choose-from- List  unless you are creating a payment document or the document has a posting date outside the inactive period as set in the BP master data (see 1411244 - Master Data Inactive/ Active Enhancements).
    The behaviour you describe cannot be reproduced in 8.81 pl004 or 5, so the bug has been fixed already.
    All the best,
    Kerstin

  • Business partner -Central Person

    Hi,
    Please canyou know let me know if there is any  relationship between person and business partner -central person
    Regards,
    Amit

    Hi,
    The Business partner and the central person gets created automatically when you hire an employee.This is captured in HRP1001. further you can create a business partner using transaction BP
    Regards,
    Prasad

  • No Matching records found 'Business Partner'

    Hi All
    At a clients site 2 users enter a business partner code to get and got this error:
    *No matching records found 'Business Partner' (OCRD) (ODBC-2028) Message 131-183 *
    However when another user entered the BP code the details came up.
    They have closed Business One twice and tried to enter the BP code again...and they still getting that error.
    Thanks
    Jerusha

    As they are in Find mode, only possibility I see is that on the client where the error appears, there must be some value in other field also, which is not available in combination to BP Code.
    For example if in Group Cash & Carry is their and sua001 belong to some other group then such error can be appear, even if sua001 is available in BP Master.
    Hope above resolve your issue.
    BR
    Samir Gandhi

  • Code generation for business partner

    Hi, all
    In our scenario we need to assign a unique code to business partner record as soon as it is approved by data manager (in MDM workdlow). This assignment should be automatic. Next incremental number would suffice, but AutoID field can't be used for this purpose since it automatically assigns numbers even to new, still not approved records.
    Some kind of this pseudocode in assignment would be great:
    CODE = MAX(CODE)+1
    Where MAX(FIELD) is a function returning maximal value in FIELD field in current table.
    But I couldn't find such function in data manager standard functions list.
    Can anyone suggest a solution?
    Vadim

    hi thanks for your valuable replies...
    i changed the codes...pls check its right or wrong
    declare @temp as char(20)
    IF $[OCRD.GroupCode] = 104  and $[OCRD.cardtype] = 'c'
    BEGIN
    set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where (groupcode= 104) and (len(cardCode)=7))
    set @temp='TRA'isnull(replicate(0,7-len(@temp)),'')@temp
    select cast(@temp as char(20))
    END
    ELSE IF $[OCRD.cardtype] = 'C'
    BEGIN
    set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where   (len(cardCode)=7))
    set @temp='C'isnull(replicate(0,7-len(@temp)),'')@temp
    select cast(@temp as char(20))
    END
    ELSE IF $[OCRD.cardtype] = 'S'
    BEGIN
    set @temp=(select isnull(max(right(cardCode,7)),0) + 1 from Ocrd where   (len(cardCode)=7))
    set @temp='S'isnull(replicate(0,7-len(@temp)),'')@temp
    select cast(@temp as char(20))
    END
    Thanks & Regards
    B.Lakshmi Narayanan

  • How to Create Business Partner with  fix number in t-code :BP

    Dear SIr,
    Normally I will set number range for auto  to create Business Partner. In case , If we would like to crea How to Create Business Partner with  fix number in t-code :BP , howe to do?
    Please kindly advise.
    THnak you and best regards,
    Vimol

    Dear Shobhit,
    How to put the thread as you mentioned.
    Best regards,

  • Company Code info in Business Partner Master Data

    Dear all,
    We are creating customer in CRM (5.0) system, which are flows down to back End ECC (6.0) system.
    now the requirement is company code and reconciliation details need to be maintained while creating customer master data, this info is a prerequisite to create sales orders in ECC and subsequent processes.
    We don't know how to maintain finance data in CRM Business Partner Master data.
    Please educate me how to maintain the required data, and what config need to done to solve our purpose.
    your suggestions will be highly appreciated.
    Thank you,
    Raghu ram.

    HI
    To my knowledge you cant maintain company code data in CRM, you can maintain general and sales area data from here and extend the company code data only in r/3.
    Regards,
    Karunakar.

Maybe you are looking for

  • How to access variables declared in java class file from jsp

    i have a java package which reads values from property file. i have imported the package.classname in jsp file and also i have created an object for the class file like classname object=new classname(); now iam able to access only the methods defined

  • Authenticate against external windowsdb member server

    I would like to know if anyone has been able to get the ACS appliance version to authenticate users against a Windows Member Server not a DC (no AD).

  • Export quallity for Dvd

    I did a slideshow of a wedding in Fotomagico, export it ( Hd 1080, 25 fps, Mp4). I import it in Final Cut pro to work with the music. Now I use compressor, setting : DVD best quality 90 min, and I´m not very happy with the quality. Is there another s

  • Where to find the drivers for Labview 6.1 or 6.x

    I use LabView 6.1 in our labs and due to that we have many old LV programs written on 6.x I can not use newer versions of LV. But when I try to find the instrument drivers (Agilent 33250A arbitrary waveform generator) the only available drivers are f

  • Guardar imagen 12 bits en formato tiff

    Hola, estoy desarrollando un programa en labView .8.2. Necesito guardar una imagen con valores en sus pixeles comprendidos entre 0 y 4096. necesito guardarlo en formato tiff. Cuando utilizo las funciones que proporciona el modulo Vision, la imagen se