Adding prefix 'E' to BP Number of Role 'Employee' while creation

Hi,
I have a requirement wherein I have to add prefix 'E' to the BP Number of Employee role while creation. For this I am using a method 'CHANGE_BEFORE_UPDATE' of BADI 'PARTNER_UPDATE'. I am pasting the code below. While debugging, I am checking the value in internal table 'lt_but000_new' and I can see that prefix 'E' is getting added in BP Partner Number. But, the same is not happening when it is getting saved. Can anyone suggest me what should I do to achieve this functionality.
method IF_EX_PARTNER_UPDATE~CHANGE_BEFORE_UPDATE.
  DATA: lt_but000_old           TYPE STANDARD TABLE OF but000,
        lt_but000_new           TYPE STANDARD TABLE OF but000,
        ls_but000_new           TYPE but000,
        lv_partner_guid         TYPE bu_partner_guid,
        lv_emp(10)              TYPE C,
        lv_role                 TYPE BOOLE_D,
        ls_role                 TYPE bup_bprole,
        lt_role                 TYPE STANDARD TABLE OF BUP_BPROLE initial size 0.
business partners ************************************************
  CALL FUNCTION 'BUPA_GENERAL_CALLBACK'
    TABLES
      et_but000_old = lt_but000_old
      et_but000_new = lt_but000_new
    EXCEPTIONS
      OTHERS        = 0.
CALL FUNCTION 'BUP_BUPA_BPROLES_GET'
IMPORTING
   E_ROLESET       = lv_role
  TABLES
    T_BPROLES       = lt_role
READ TABLE lt_role into ls_role with key role = 'BUP003'.
if sy-subrc = 0.
LOOP AT lt_but000_new into ls_but000_new.
  SHIFT ls_but000_new-partner LEFT DELETING LEADING 0.
  CONCATENATE 'E' ls_but000_new-partner into lv_emp.
  ls_but000_new-partner = lv_emp.
  MODIFY lt_but000_new from ls_but000_new TRANSPORTING partner.
ENDLOOP.
endif.
endmethod.

Hi,
You can do this particular scenario in SPRO settings itself.
Only thing is you need to check in the SPRO settings in number ranges as well as groupings that you define as external. (Tick the check box present there).
Number assignment: The business partner number range object is BU_PARTNER. Generally, there are three types of number assignment when business partners are created from the R/3 system.
01 = This is the internal interval of BU_PARTNER.
02 = External number assignment, the system uses the number from a specific internal interval of the object.
03 = The number is transferred from HR and a prefix is added. In this case, a specific external interval, which must be defined as XX00000000 (up to XX99999999), is used (where XX denotes any two letters).
Any one of the three intervals can be set up for HR integration.
You can use 02, so that when a business partner is created from employee data, the partner number will be identical to the employee. The value of this interval will equal that of the employee number range interval in R/3.
Also, not all the business partners will be employees from R/3, there would likely to be external partners of various types under various roles other than Employee (for e.g. u2013 Vendor, Bidder, Sold-To, Ship-To etc). These business partners would be present only in the CRM system, and not in the R/3 system. Thus, we require an internal interval as well to create these business partners on the fly.
And then this is the exact definition for External number grouping.
It means that this external grouping is used as the standard grouping.
The BDT selects this standard grouping if a business partner number was assigned to a business partner when the latter was created, but not a grouping.
Hope your problem is resolved with this.
- Venkat

Similar Messages

  • To save the sales order number in custom table while creation of the order.

    Hi Experts,
    Does there exist any exit to save the sales order number in a custom table while the sales order is created in VA01. The requirement is to capture the sales order number in a Z table when a field (payment terms ) is changed during the sales order creation.
    Regards,
    Sunitha

    Hi Sunita,
    You can store your data in the User exit MV45AFZZ in the form 'userexit_save_document'.
    You can navigate to MV45AFZZ from SE38 wherein an access key needs to be generated for that program, if you know to implement enhancement points then you can create an implicit enhancement point in this form without generating an access Key.
    Regards,
    Ravi Kiran

  • Iphone dialing. A basic phone allows number manipulation to add a prefix on a stored number in contacts, is there a way to do that?

    Iphone dialing. A basic phone allows number manipulation to add a prefix on a stored number in contacts, is there a way to do that?
    This is specially useful while traveling and you need to use numbers stored in a domestic style. Adding the possibility to have a prompt or cursor in the number dialing screen would be very helpful

    Further to my question Ill add an example:
    I'm in the US and need to call to Mexico City, the way to do,it is +52 55 12345678. This number is stored (and has been stored for years in yahoo contacts) as 12345678, the way you dial it locally; so now in order to call I need to add +5255 as a prefix to my stored contact.
    This is extremely easy in other simple phones and smartphones like Blackberry by copying, pasting and editing the final number you need but it seems impossible on iPhone. It requires a great deal of manual copying.
    I travel a lot and would be very thankful for a solution

  • Limitation on number of roles in oracle menu or segmentation fault in menu

    Hi All,
    Is there any limitation on the number of roles we can have in oracle menu? We are having around 300 roles created in our menu and after that if we try to add new role we are not able to compile the menu file. In the windows the form builder closes abruptly and in Linux it gives us segmentation fault error. Did anyone face the problem? Also if there is any solution then please provide the same.
    Please let me know.
    Thanks in advance!
    Ashish

    I just wonder how many forms do you have that you needed to create 300 roles. We normally create a role for one set of users. It means you've 300 different set of users for your application !!.

  • Add tcode to large number of roles

    Hi all,
    Is there a way to add a tcode to large number of roles (around 20) using pfcg? It would be great if I can do it once instead of modifying role by role.
    Thanks.

    Yes, You can actually write a ABAP program, but bottom line is that you cant edit more than one role at a time in PFCG.
    The program would also have to edit one role at a time

  • Minimize the number of roles using the Bolt-onu2019s

    I read a artical from SDN it discribes the process of maintating Orgnization Authorization in saperate Role. This helps to reduce the no of roles been created. Below is the discribtion. And I tolly agree with the concept . Read below .
    >According to Artical
    >You can make use of the Bolt-on concept to reduce the total number of profiles that need to be built in an implementation. An example will clarify the benefits of its implementation.
    >Letu2019s consider the purchase requisitions. There are two business rules exist for approving the purchase requisitions. One is the plant code, and the other is the Release code. Assume that you company has 10 different Release codes, for various approval ranges. Now, on the other hand, if you have 20 plants, you need to have 20 X 10 = 200 roles. That is 10 roles per plant.
    >By using the Bolt-on concept, this can be achieved by removing the authorization objects which control user status (these objects contain no organizational value component) from the transactional role and placing them within their own unique global role with the plant code. This way, you will end up with creating 10 transaction roles without the plant code and 20 global roles, which will have only the plant code in it.
    >Further, the appropriate combinations can be determined by the business requirements.
    >This approach reduces exponentially the number of roles that need to be built. The end result is that 30 roles are required to achieve the same objective.
    >The same Bolt-on process can be implemented when the authorization check is done on an organization level. However, this process will be viable only when the number of roles that needs to be created are more.
    As of my understanding we need to isolate all Auth objects from a role and make a saperate role specially only for Org structure. And then give combination of those Org Roles to provide access for those Org Units.
    My Question is
    1) how do we Identify all Auth obejcts that give access to a Org unit from a given role.
    2)How to make a role that gives Authorization for a perticular Org Unit only. (And that role should not have any authorization for Tx or activities)
    3)What is recemmended to maintain Org unit Authorization ? Is Bolt-onu2019s mehod suitable to maintain all Org Unit Authorizations?
    Edited by: Hussain Sehorewala on Jul 2, 2008 4:11 PM

    >
    Jurjen Heeck wrote:
    > It is non SAP-standard and I generally advise against them for just that reason. It requires a lot of documentation and checks to make sure no-one destroys the concept just by following SAP guidelines. Also upgrades can cause a lot of problems with bolt-ons.
    >
    > Jurjen
    I agree 100% with Jurjen.  It can work well but in the vast majority of times I have seen them, they have led to reduced control, reduced auditability and basically been a mess.  SecureInfo have a tool which builds roles in this way but it also has appropriate controls in place too.
    If you look at the following scenario:
    You have a functional role and an org role.
    If you have org roles for each func role then you are in the same situation as you are with derived roles.
    If you start to combine auth objects to build a bigger org role then you are assigning additional auth objects over and above what the transactions in the func role require.  We all know that to properly secure something, you need to control by auth object so in this case you are already potentially opening yourself up to giving excess access.
    6 months later you want to remove a tcode from the func role.  If you maintain std SAP method properly then the auth objects will also be removed too if it not shared.   With lots of these objects in the org role then you will need to cross check every single tx in the func role with every object in the org role.  Most people don't bother & that's one of the reasons why this build method can get very, very messy as you lose the link between t-code and object that SU24 provides.
    I've used this method in BW a few times & it works really well, but for R/3 it usually ends up with more trouble than it solves.   There are situations where is can make things easier but I would only use it as a supplement to a standard method role build.

  • Automate adding unique passwords to a number of pdf files

    Is there a way to automate adding unique passwords to a number of pdf files

    No you can't. Although Acrobat SDK claims support for that it does not actually work. At least I was unable to get Acrobat to register my encryption filter and use it. I was told it has something to do with the export restrictions. You can, I think, use Acrobat SDK to create a standalone application that does what you want but I myself never tried that.

  • Maximum Number of Roles that can be assigned to a user

    Hi Experts,
    Can anyone please clarify me , what is the limit for the maximum number of roles
    that can be assigned to a user
    Thanks and Regards,
    Sanjeev Anand.

    Hi Sanjeev,
    You can assign a particular user to any number of Roles as long as they are not conflicting.
    But you can assign 150 Profiles to a Role.
    null

  • Limit on Number of Roles per User

    We seem to have run into a limit on the number of roles that you can add to a user object. We are running IDM 5.0 sp1. Is this a know issue or is there a configuration setting we can change? The error that we are getting is as follows:
    com.waveset.util.InternalError: Summary String length (2697) exceeds maximum (2048).

    I got the solution for this problem
    1) Change the database to support more data in summary attribute
    2) Change the configuration--> repositoryconfiguration to support more data in summary attribute.
    Please note: After changing the configuration app server needs a restart.

  • Table for BP Role Employee

    Hi Experts,
    Through tcode BP, it is possible to extend the BP number to a few BP roles.
    I have extended the BP to role "Employee".
    There is a section for Employee Data on Identification tab.
    Here, I am able to assign User ID (from SU01) to BP.
    However, I am not able to search for the table that stores the information.
    The only available info is the structure from the screen, BUS000EMPL-USERNAME.
    Please assist, Experts.
    Thank you.
    HJMY

    Hi there,
    Check the answers given in this thread:
    Table linking user to BP employee
    Kind regards,

  • How to pass Employee number of MSS - Employee Search to Start Process

    Hi All,
    Just like HR admin role, Employee Information number is getting passed in Display Processes, Start Processes, and Personnel File, we have to make same scenario working for MSS also.
    In MSS, General Information Page, when manager selects the Employee, then that Employee Number should get passed in Display Personnel File and also in Start Process.
    I am new to HR module so I have not explined the requirement properlly, but Experts may be knowing this. Please help.
    Regards,
    Nikesh

    Hi Siddharth Rajora,
    I have actually 2 doubts..
    1. You mean to say this can be done and is already implemented, but I think it will only work if we put "Display Personnel File and Start Process" under "Related Activities" area right ?
    2. But user wants these views in the Detailed Navigation, so if he selects PERNER from general Information Page, and then if he clicks on "Start Process (under Detailed Navigation)" , then it shud show list of processes for that Employee.
    Can you please guide me properly.

  • Is It Possible To Create Different Personnel Number For One Employee

    HI Experts,
            My Client need to get Different Personnel number for one employee,i.e for Trainee one Personnel number need to generate and same person when moving from Trainee to Probation another new personnel number should generate and again when same person move from Probation to Permanent another new personnel number should generate.
    1. How to generate 3 different Personnel number for One employee?
    2. How these 3 Personnel number should get linked, if want to get report for this one employee?
    Kindly help me.
    Thanks,
    Lavanya
    Message was edited by: Sikindar A

    Hi Lavanya,
    Your requirement can be fulfilled but not recommended...
    As you want to generate different position number at different stage of employment....
    i.e Trainee to Probation to Permanent...
    First go for Trainee Position Hiring ....  and generate first Number Say 5000000
    Then suppose employee complete training after 1 Yrs.. then again go PA 40 enter date as 01.01.2015 say... & execute... & give Ref. Personnel Number (5000000) & different position number... this time...
    This will link up all the personnel date from previous hiring record... & as per your need you can modify it.... Finally one more number be generated....
    Similarly,, you can do for Permanent employee...
    Once training or Probation period gets completed you can lock/ separate that employee  number
    Report ...
    You can get necessary details in IT0031...& with different Position numbers which you will using at different stage of hiring...
    Hope this should sort your issue..
    Regards,
    Veeram

  • Bad magic number in super-block while trying to open /dev/sda2

    hello,
    So I've a linux partition, and then I wanted to install a Windows copy. I've only 1 HDD with differents partition into it:
    sda5 (swap)
    sda6 /user
    sda7/var
    sda8 / (which contain the boot and root of course)
    sda3 /home
    sda2 NTFS (windows xp)
    So, as I had linux installed before windows, I had to make my sda2 NTFS (87) under my cfdisk. Then, I went to install windows, everything worked fine, windows booted with his boot system, but I had to restore grub with my archlinux live cd:
    grub> find /boot/grub/stage1
    grub>root (hd0,7)
    grub>setup (hd0)
    everything worked successfully, my grub loaded till while booting archlinux I got this error:
    couldn't find ext2 superblock, trying backup blocks...
    e2fsck: Bad magic number in super-block while trying to open /dev/sda2
    The superblock could not be read or does not describe a correct ext2
    filesystem. If the device is valid and it really contains an ext2
    filesystem (and not swap or ufs or something else), then the superblock
    is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
    What I tried is to run the e2fsck -b 8193 /dev/sda2 but right after that, I thought about it, this isn't linux partition so of course, the superblock isn't the same as they are ntfs type from widnows?
    I've read on some forum but unfortunately didn't solve my problem, if anyone has any suggestion before I format the NTFS partition, I'd really appreciate it.
    best regards, maz

    what I think it happened, is that after installing windows your partitions numbers got twisted a bit. What you have to do is to edit /etc/fstab, and check out your linux and swap partitions mounting entries, I believe you just have to change the number of /dev/sda[number] coresponding to your linux partition in fstab
    If you can't solve it, post the output of
    fdisk -l
    and
    cat /etc/fstab
    Last edited by I'mGeorge (2011-07-21 20:53:31)

  • While creation of a equipment and assignment of personnel number

    Hi
    I have activated partner function to the Equipment catagery.
    While creating equipment using T.code IE01,  I am assigning personnel number to the person responsible partnerfunction.
    After that personnel number getting defaulted to operator field as per config setting.
    I can create equipment and assign person responsible succussfully.
    But at the time of assignment of personnel number with partner function person responsible,  I am getting information messege always like
                     " No customer master record exists for customer 10003511"
    I would request you please suggest how  to "delink the above message" while creation of a new equipment and assigning the personnel number.
    Thanks & Regards
    CHSR

    Hello
    Please check the personal Number is active or exists in HR Master with its validity.Use TC for checking PA20 for checking the same.
    Regards,
    Rakesh

  • Relationship b/w the PO number field in the SO creation screen(va01) and th

    Hi All,
    What is the relationship b/w the PO number field in the SO creation screen(va01) and the sales order .
    Can we maintain a specific number range for the PO Number??
    If yes where do we maintain the setting?
    Cheerzz..
    Subbz..

    Hello,
    This is nothing to do with a SAP purchase order, and you can't maintain any number range for the same as it is not a system proposed one.
    Imagine, the customer is sending a purchase order to you, and you are creating a sales order. We can give a reference to the customers PO number in this filed. It doesn't have any effect.
    It is widely used in reporting.
    Prase

Maybe you are looking for