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

Similar Messages

  • SAP Treasury Management-How to Config Tax codes for Business Partner

    Hi SAP Gurus,
    Please suggest me how to configure specific Tax Code and Tax relevant data for Business Partner in SAP Treasury Management while posting transactions with reference to any specific GL A/c. Kindly help me .
    Thanks and advance
    Regards
    Shivan

    Hi Appalas,
    Check this link
    Re: Linking of default taxes and discounts to BP
    Tax Code
    /people/arshdeep.singh/blog/2008/10/20/defining-a-new-tax-code-in-sap-business-one-2005-b-and-2007-b
    Regards
    Jambulingam.P
    Edited by: Jambulingam P on Jun 22, 2009 12:39 PM
    Edited by: Jambulingam P on Jun 22, 2009 1:20 PM
    Edited by: Jambulingam P on Jun 22, 2009 1:21 PM

  • Search help for business partner ID in segmentation applet

    Hello,
    In CRM 2007 I'm using the segmentation toll. When creating filters for Business Partner ID criterium I'm using a search help functionality to find the desired records. However search help for business partners used in this area is very different from the search help used in any other parts of WEB UI (it is restricted to only few fields, that are not enough for our requirements).
    Segmentation applet is written in Java but the search help looks like normal WEB UI screen. I wonder if any of you could help me with replacing this serach help called by segmentation applet (java application) with a standard search help for business partners (BP_HEAD_SEARCH)?
    Kind reagrds
    Marek

    Hello there,
    I think the requirement/question is not very clear in your post.
    However, the segment Java applet calls a CRM class which has related code and methods.
    Class:  CL_CRM_MKTTG_SEGAP_COM
    Package: CRM_MKTTG_SEG_APPLET.
    Please explain the problem in detail.
    Regards,
    Vinamra.

  • Change history of User for Business Partner Number attaching and removing

    Hi Experts
    Is there any t-code in SRM which will show change history of User for Business Partner Number attaching and removing.
    Thanks--
    Guru Prasad Dwivedi

    Serene,
    I am not too sure if anyone can DELETE a Payment Term linked to a BP. The system would not allow this.  If at all a Payment term was deleted, I don't think it can be traced.
    It is therefore very important to use Proper user authorization so that only people authorized to do certain things are doing it and not everyone.
    Suda

  • XI Content for Business Partner

    hi,
    can anyone suggest what is the XI Content for Business Partner in CRM.  i just need the exact name so that i can download it from the service marketplace.
    thanks.
    krishnan

    Hi,
    We have uploaded the XI Content for CRM Business Partner into the Repository.  We are able to find the Message Type --> ABABusiness Partner. 
    How do I proceed further.  Shall I copy this message type to my namespace and create Message Interfaces and proceed with mapping the source and target.
    In that case, how will the function module BUPA_OUTBOUND_MAIN identify the message interface created in XI.  I understand that there is some proxy code within the function module BUPA_OUTBOUND_MAIN.  How this proxy calls the message interface which I have created in XI.
    Krishnan

  • Documetations about the complex interface for business partner

    Hi Folks,
    did anyone knows, were I can find some documentations about "how to use the complex interface for business partner"?
    Kind regards
    Thomas

    The above problems through Notes: 810634 has been resolved!
    The return message is "Instance BJXE001005 belonging to object type BusinessPartnerFS was created".
    But the BP "BJXE001005" has not been established in CRM.
    How to i?
    When i use parameters "roles", the return message is "No update is defined for BP role"?
    How to i?
    Thanks you!
    Do you have any examples I reference to the code?
    Thanks a lot.
    Edited by: Ken.Li on Apr 13, 2008 9:05 AM
    Edited by: Ken.Li on Apr 13, 2008 10:17 AM
    Edited by: Ken.Li on Apr 13, 2008 10:33 AM

  • Not all fields for Business partner are exported

    Hello,
    I am exporting Business partner data from CRM to another system, through XIF. I get on target system XML file with Business partner data. But I have only standart fields. I can't get fields, which was created my company for own use.
    For example, for Business partner I have Business Agreement, but after export to XML, I have no Business agreement data in another system. But I have standart data, for example, Business partner Name, ID, ets.
    Anybody know what I can do to export all the fields for Business partner? Some transaction or somthing else? Where can I customize output XML with Business partner data?
    Best regarda,
    Alexander.

    Hi,
    You have the right observation. There is no mandatory fields for BP. It means you can update any single field against CardCode. CardCode is the only mandatory field which is the only primary key must be unique.
    Thanks,
    Gordon

  • Error in code generation for deleting table BUT000_TD

    Hi,
    Did anyone encounter this error while working on EEWB ?
    I created the project extension via EEWB and completed the wizard setting with the package (dev. class) value as $temp as I wanted to test it locally.
    One of the errors, that I got is:
    Error in code generation for deleting table BUT000_TD
        Message no. DA464
    Diagnosis
        This error message indicates that internal inconsistencies exist.
    Procedure
        Please consult SAP.

    Hi,
    As I mentioned in my previous post kindly check the consistency of the structure BUT000_TD.
    Regards,
    Sudheer.

  • Creation of Interaction object programatically for Business partner

    Hello,
    How to create Interaction object ( BUS20004  )programatically for  Business partner ? If anybody worked on it , plz let me know how we can create it for BP.
    BOR object for InteractionObject is: BUS20004 Interaction Object
    Regards
    Sandeep

    Dear Sandeep,
    Please use FMs CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE to create Interaction Record using the program.
    Thanks
    Vishal

  • Number ranges for Business Partner

    Hello experts,
    Can you please guide how to define different number ranges for differenet different parner functions such Bidder and Employee.
    Presently when I create a new employee for a Business partner who has newly registered with SRM, they both are getting same range of BP number, which makes the user list very long to manage/search while creating BID/Auction invitation.
    Please guide me. Thanks in advance
    Vijay

    Hello,
    find below the settings of table T77S0 in our system. We use grouping Z4 for org units. Be aware of the fact that number range and grouping have to have the same ID in this case.
    Regards
    Wolfgang
    GRPID SEMID GSVAL      ETEXT
    HRALX HRAC  X          Activate HR Integration
    HRALX MERID X          Enter Integration Error in IDOC
    HRALX MSGRE 0          Recipient of Error Message When Creating BP
    HRALX OADBP            Business Partner of Standard Address
    HRALX OADRE            Address Necessary for Business Partner?
    HRALX OBPON ON         Integration O-BP Activated
    HRALX OBWIG X          Ignore Business Partner Warnings
    HRALX ONUMB 2          Business Partner Number Assignment (Org. Unit)
    HRALX OPROL BUP004
    HRALX OSUBG Z4         Business Partner Subgroup (Organizational Unit)
    HRALX PALEO            Log: Organizational Units in ALE
    HRALX PALEP            Log: Employees in ALE
    HRALX PBPHR OFF        Employees Are Replicated from HR System
    HRALX PBPON ON
    HRALX PCATS            Integration P-BP for CATS Activated
    HRALX PINAC            Activate ALE Distribution of Inactive Employees
    HRALX PLEVE 3          Log: Detail Level of Error Messages (1 - 5)
    HRALX PNUMB 3          Business Partner Number Assignment (Employee)
    HRALX PPROL BUP003
    HRALX PQUAL            Import Qualifications
    HRALX PRTON            Log Active
    HRALX PSUBG            Business Partner Subgroup (Employees)
    HRALX PSYNO            Log: Organizational Units in Dialog
    HRALX PSYNP            Log: Employees in Dialog
    HRALX USRAC X          Create Relationship to User

  • Grouping of number range for Business Partner

    Hi Team,
    Where do we maintain grouping of number range for Business Partner and assignment of number range to group?
    Thanks,
    Sanjay

    Hi Sanjay
    Go to SPRO > Cross Application Components > SAP bussiness partner > Bussiness Partner > Basic Settings > Number Ranges and Groupings.
    Thanks
    pravin

  • Archive Link Authorization problem for Business Partner.

    Hi Experts,
    Currently we are attaching documents to respective objects through Tr. OAWD & these documents are available in service for object as attachment, until this it is working fine.
    But we are facing problem of authorization for archive link of ISU- Business Partner. Letu2019s say we had two users USER-A & USER-B responsible to upload documents of Business partners started with 1 & 2 respectively.
    We needed authorization control for USER A&B so that,
    USER-A should upload documents for Business Partner 1001 to 1999
    & USER-B should upload documents for Business Partner 2001 to 2999
    we need to know can we restrict USER A&B so that they can not upload documents for Business Partner for which they are not responsible. we allready checked the roles "SAP_BC_SRV_ARL_*  " but not found useful to restrict USER A&B.
    Thanks in advance....

    Hi Sam,
    as this sounds like you search for suitable authorization objects I think that the authorization trace in transaction ST01 could be useful for you. For further information please see the following link: http://wiki.sdn.sap.com/wiki/display/PLM/AuthorizationTraceintransactionST01
    Best regards,
    Christoph

  • Custom screen field in the SRM portal screen for Business Partner Bidder

    I need to add a custom screen field in the SRM portal screen for Business Partner. I have added this custom field in the include structure: CI_EEW_BUT000 and activated it.
    I was expecting to see the enhanced field available in the SRM portal screen when I create the bidder. But is not available.
    The new field are available if I edit an Business partner only.

    Hi,
    Please look into the following OSS Notes:
    Note 675800 - Business partner enhancement SRM on maintenance screen
    Note 672960 - User-defined fields 2
    Thanks,
    Pradeep

  • SD Account determination for business partner items

    Hi All!
    I need to understand how does the account determination works for business partner items. I know that al trx VKOA is where I can customize the account that is gonna be used at the GL items, but I can't find where is the customizing of the accounts for the business partner items. Could you help me?
    Thanks in advance!
    Fred

    Hi
    When you create a billing document (trx VF01) in SD, you can then go to trx FPE3 and the this document from a finantial point of view.
    In trx FPE3 you will see the ducument splited in two parts, the business partner items and the GL items. If you doble click over any line of the GL items (excluding taxes) you will see more information about this line and one of it is the GL account. This account is set via trx VKOA.
    Going back, if you doble click over any line of the Business partner items, you will see more information about this line and one of it is the GL account. But in this case I don't know where it should be customized.
    I hope I was clear enoght.
    Regards,
    Fred

  • Problem while enter address for business partner-tcode BPC1

    Dear Experts,
    I have already enter address for business partner completely in BPC1, but after saving, the data has been entered always gone and message appears: "Enter address for business partner".
    Please somebody advice me about this issue.
    Thank you in advance.

    Please check this thered follow the steps.
    [BDT|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6173fb9e-0701-0010-6083-a0001827a6ff]
    Create  a field group--> attch fields over there.
    Create a view > attach a field group over there.->If you double click the view , you have to create one screen and attach function modules for PBO and PAI.
    create a section --> Attach your view.
    Create a screen ---> Attach your section.
    Regards,
    Siva

Maybe you are looking for