Why couldn't I input a new pernr to create?

Hi experts,
I created a screen to create a pernr with infotypes. While it says 'entry doesn't exist in the table pa0003' when I input a new pernr. So what should I do?
Thanks!

In the methode VIEKN of the class CL_HRPA_VIEKN there is a test to see if PA0003 exists before it is created.
Use the enhancement to INSERT PA0003 at the begin and to DELETE PA0003 at the end.
METHOD viekn.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1 ) Classe CL_HRPA_VIEKN, Méthode VIEKN, Début D
*$*$-Start: (1 )--------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZDIH_APPLICATION_EXTERNE_CREAT.    "active version
DATA : lw_pa0003 TYPE pa0003.
DATA : fl_pa0003 TYPE flag.
CLEAR fl_pa0003.
*  If coming from Web dynpro
IF sy-cprog EQ 'SAPMHTTP' ANd pernr NE '00000000'.
*  Check if the infotype 3 already exists
  SELECT SINGLE * FROM pa0003 INTO lw_pa0003 WHERE pernr = pernr.
  IF sy-subrc NE 0.
    fl_pa0003 = 'X'.
    MOVE pernr TO lw_pa0003-pernr.
    MOVE '18000101' TO lw_pa0003-begda.
    MOVE '99991231' TO lw_pa0003-endda.
    MOVE '12' TO lw_pa0003-viekn.
    INSERT pa0003 FROM lw_pa0003.
  ENDIF.
ENDIF.
ENDENHANCEMENT.
*$*$-End: (1 )--------------------------------------------------------------------------------$*$*
----> original code of method <----
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2 ) Classe CL_HRPA_VIEKN, Méthode VIEKN, Fin D
*$*$-Start: (2 )--------------------------------------------------------------------------------$*$*
ENHANCEMENT 2 ZDIH_APPLICATION_EXTERNE_CREAT.    "active version
  IF sy-cprog EQ 'SAPMHTTP' AND pernr NE '00000000'.
    IF fl_pa0003 = 'X'.
      DELETE FROM PA0003 WHERE pernr = pernr.
    ENDIF.
  ENDIF.
ENDENHANCEMENT.
*$*$-End: (2 )--------------------------------------------------------------------------------$*$*
ENDMETHOD.

Similar Messages

  • Why won't emails display in new mailbox I created?

    Hi, I wanted to make another mailbox/folder to put specific emails in, did what I've always done, except the ones I've copied to the new box don't sit in the folder, they are only shown on my computer drive, not in the mail window, like all the others! Why is this happening?

    BDAqua wrote:
    Hmmm, this "folder in my Finder", is it located in...
    /Users/YourUserName/Library/Mail/Mailboxes/
    Yes, along with all the other ones. However, many have a second, with duplicate names, but with .mbox after it, while some don't, including the one I created. As a workaround I just renamed one of the folders that was working, "delivered", that I never use. However, while I can put messages or copies in it, in my Finder, it is still titled "delivered" even though the correct emails are inside it. It's just this kind of stuff that Apple used to explain, right there in their Help window, you used to be able to go through every program, and when deciding how to set preferences, it told you, line by line what everything meant. Now, it's sink or swim, hunt around for some info here, there, and often end up coming here, posting questions or searching for answers, or sometimes just searching the web. It's very frustrating & disappointing, as Apple used to be well-loved for it's ease of use, and customer service... no more. Something as simple as this should be, I have to end up spending a lot of wasted time & energy, hunting an answer to a very minor question.....

  • HR ABAP-How to copy a PERNR into another new PERNR?

    Hi All,
            How can we copy all the Infotype details related to a Personnel Number into another new Personnel number?
    Thanks in Advance,
       Anjaly

    Hi anjaly,
    1. There is no method/concept of Copying, w.r.t Personnel number.
    2. A new pernr,
        has to be hired in the system FIRST,
        via pa30/pa40 (hiring action),
    3. ONLY THEN,
    4. A new pernr is created in the sytem,
    5. ONLY AFTER THAT,
       we can put other data realted to pernr in the system using pa30 or anything else.
    regards,
    amit m.

  • How can I have any new pernr creation dynamically trigger custom code

    I would like to develop a custom process that is triggered whenever a new pernr is created. So basically when pa40 is used to hire an employee, is there a way for this new hire event to trigger my custom code. I would like to grab the new pernr, look up the CP object just created, and save this CP data in a custom infotype. I looked into the possibility of using dynamic actions, and the user exit zxpadu02 option. The options I mentioned may work, but I was hoping to find a more solid solution where the moment a pernr and its CP are created, my custom code can execute.

    The major issue with the user-exit approach is the fact that screen navigation varies during the pa40 process depending on action and country grouping. When the user-exit executes during infotype 0000 processing, the new pernr and CP object have not yet been created. If we use a different infotype (IT0002 for example) to trigger our custom code in the bapi, we may get unexpected results due to user unpredictability. If they decide to exit the hiring screens early for some reason.

  • Why am i having trouble inputing a new credit cards info?

    Can someone tell me why it keeps directing me to ITUNES SUPPORT when trying to input a new credit card to use?

    What didn't work? Your email didnt go through? You have to get in touch with iTunes support and wait for a response. It does not happen instantly. It can take up to 48 hours to hear back from them.
    if you want to try to call them, try this.
    http://www.contacthelp.com/directory/Internet/Web+Sites/iTunes?ListingID=373
    i think its the same phone number as this.
    U.S. iPod, Mac and iPad technical support:
    (800) APL-CARE (800-275-2273)

  • How to Generate a new PERNR using  HR_MAINTAIN_MASTERDATA in WD?

    Hi Experts;
    Can I get some sample code for creating a new PERNR using HR_MAINTAIN_MASTERDATA  FM. ???!!!
    I've created  a  some input fields in webdynpro using infotype PA0002 and depending upon those  fields I want to generate a PERNR number .
    Plz help me with some sample code ..
    Thanks in Adv.
    Bunty

    what am I missing in the below code ??? is the code correct ??? Using the below code how will I get the new PERNR value ??
    method ONACTIONSAVE .
        DATA lo_nd_final_node TYPE REF TO if_wd_context_node.
        DATA lo_el_final_node TYPE REF TO if_wd_context_element.
        DATA ls_final_node TYPE wd_this->element_final_node.
          DATA lv_inits LIKE ls_final_node-inits.
          DATA lv_nachn LIKE ls_final_node-nachn.
          DATA lv_vorna LIKE ls_final_node-vorna.
           DATA lv_titel LIKE ls_final_node-titel.
           DATA lv_gesch LIKE ls_final_node-gesch.
           DATA lv_natio LIKE ls_final_node-natio.
           DATA lv_famst LIKE ls_final_node-famst.
             DATA lv_gbpas LIKE ls_final_node-gbpas.
             DATA lv_stras LIKE ls_final_node-stras.
              DATA lv_ort01 LIKE ls_final_node-ort01.
              DATA lv_pstlz LIKE ls_final_node-pstlz.
               DATA lv_telnr LIKE ls_final_node-telnr.
              DATA lv_locat LIKE ls_final_node-locat.
                DATA lv_usrid LIKE ls_final_node-usrid.
    *   navigate from <CONTEXT> to <FINAL_NODE> via lead selection
        lo_nd_final_node = wd_context->get_child_node( name = wd_this->wdctx_final_node ).
    *   get element via lead selection
        lo_el_final_node = lo_nd_final_node->get_element(  ).
    *   get single attribute
        lo_el_final_node->get_attribute(
          EXPORTING
            name =  `INITS`
          IMPORTING
            value = lv_inits ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `NACHN`
        IMPORTING
          value = lv_nachn ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `VORNA`
        IMPORTING
          value = lv_vorna ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `TITEL`
        IMPORTING
          value = lv_titel ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `GESCH`
        IMPORTING
          value = lv_gesch ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `NATIO`
        IMPORTING
          value = lv_natio ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `FAMST`
        IMPORTING
          value = lv_famst ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `GBPAS`
        IMPORTING
          value = lv_gbpas ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `STRAS`
        IMPORTING
          value = lv_stras ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `ORT01`
        IMPORTING
          value = lv_ort01 ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `PSTLZ`
        IMPORTING
          value = lv_pstlz ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `LAND1`
        IMPORTING
          value = lv_land1 ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `LOCAT`
        IMPORTING
          value = lv_locat ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `TELNR`
        IMPORTING
          value = lv_telnr ).
    * get single attribute
      lo_el_final_node->get_attribute(
        EXPORTING
          name =  `USRID`
        IMPORTING
          value = lv_usrid ).
    DATA lv_new_pernr LIKE ls_final_node-new_pernr.
    * get single attribute
      lo_el_final_node->SET_attribute(
        EXPORTING
          name =  `NEW_PERNR`
        IMPORTING
          value = lv_new_pernr ).
    CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
    * EXPORTING
    *   PERNR                    = '00000000'
    *   MASSN                    =
    *   ACTIO                    = 'INS'
    *   TCLAS                    = 'A'
    *   BEGDA                    = SY-DATUM
    *   ENDDA                    = '99991231'
    *   OBJPS                    =
    *   SEQNR                    =
    *   SPRPS                    =
    *   SUBTY                    =
    *   WERKS                    =
    *   PERSG                    =
    *   PERSK                    =
    *   PLANS                    =
    *   DIALOG_MODE              = '0'
    *   LUW_MODE                 = '1'
    *   NO_EXISTENCE_CHECK       = ' '
    *   NO_ENQUEUE               = ' '
    * IMPORTING
    *   RETURN                   =
    *   RETURN1                  =
    *   HR_RETURN                =
      TABLES
        proposed_values          =
    *   MODIFIED_KEYS            =
    endmethod.

  • Why if i disconnect my external drive, i cannot create a new project,

    why if i disconnect my external drive, i cannot create a new project, I've got, message : the operation couldn't be completed cannot allocate memory,
    what i want is to create m "scratch disk" on my internal hard disk.

    It works i reinstalled it properly and repaired permissions too. but how come now it doesn' t display h264 files before to have transcoded them. Yesterday i had h264 displayed immediately

  • Why can't I record a new track?

    Hi. I'm getting reacquainted with the new Garageband and laid down an acoustic mandolin track. Now I want to lay down an acoustic guitar track. But no matter where I click to activate the new acoustic track, the recording seems to go OVER the mandolin track (which I also can't hear). Why can't I record a new track where the guitar is indicated, and why can't I hear the mando as I do this? In the previous version of garageband this was straightforward. Thanks, david

    We need to know more details. 
    Have you set the "Record enable" button in the track header?  (Track > Track Header > Show Record enable). Which track is enabled for recording?
    Have you set an input in the Smart Controls > Info pane for the track?
    Also:
    What kind of track did you use? An Audio Track? A Guitar Track?
    Did you create the Guitar track by duplicating the Mandolin track? Then Crate a new track for your guitar from scratch. Dplicating tracks will link them.

  • Error message 'entry pernr inexistent dans pa0003' while creating new pernr

    Hi experts,
    I created a screen for creating new HR employee (pernr). Whatever FM I used to create the new pernr from the screen there is always the error message: 'entry 1234(pernr to create) doesn't exist in pa0003' when I save it. That's why???
    Thanks!

    When you say you are creating new pernr, are you doing a new hire? You will do this through transaction PA40 that will create a pernr when you do new hire! I will ask the same thing..what FM are you using?
    Mithun

  • Why couldn't I see two other video call participants on my iPad?

    My 2 friends and I wanted to chat.  They were on laptops and could see each other but only heard my voice.  I used an ipad and couldn't see either one of them but heard their voices.  Why couldn't I see them?     This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content. A link to this post appears where the post was originally added.

    Thanks. 16 people and many more have this issue as well, so I have no doubt that it's not my iPad.
    I checked the app store and saw that they have now removed the paying feature, so it's an entirely free app now. I'm also told I have never downloaded this app despite having it on all my devices, so I suspect it is being treated as a new app after those updates. That would explain why some people ended up paying twice at first.
    I'm afraid that the issue won't ever be resolved now that they have stopped working on the "old" McTube Pro that, for many of us, still supports caching.

  • TS3276 I have recently had a problem with one of my hotmail accounts, some sort of virus sending random emails to people in my address book. Hotmail advised me to change my password for that account, which I did. Why won't mail recognise the new password?

    I have recently had a problem with one of my hotmail accounts, some sort of virus sending random emails from my address book. Hotmail advised me to delete all contacts and change the password for that account, which I did on my laptop running windows XP. The change was successful and I was able to send and receive emails with no problem. I then had to change the account password on my iPhone 4s, which I did and it too was successful but when I came to change the password on my iMac, running the latest version of Lion it would not recognise the new password. I have tried to remove the account details and re-install but every time I go to add new account my old details are in the box. This is very frustrating as I use my iMac for all my profects and I need to access my email. Please help.

    hi guys,
    I had already deleted all reference to the hotmail account in question from the keychain access app, I have also tried to delete and re-instal the account details from within mail. The icon in the side bar dissapears but when I go to Add Account, the old account details are in the new account box. I then input my new password but am told that the server does not recognise it. If I access hotmail via google on the iMac I can get into my account with no problems. I am thinking there must be some other form of security system within the mac software that is blocking the new password. This is driving me nuts. I have been trying to resolve this for the last two days. Thank you for your advise anyway.

  • Why is the sound of my new ipad cutting out intermittently and what does Apple recommend to solve the problem in lieu of any updates?

    Why is the sound of my new ipad cutting out intermittently and what does Apple recommend to solve the problem in lieu of any updates? All of a sudden without changing any settings, the audio on my NEW ipad cuts in and out on applications/ games, keypad noise and lock sounds. The rocker button only seems to work while the sound is intermittently being heard before, after a few seconds of noise not doing anything when sound goes off.
    This is highly frustrating as I've noticed others posting about such issues as far back as April. Anybody had the same thing happen to them? Is this likely software (ios6) or hardware issue? What are the solutions Apple???

    Apple has no physical stores of their own in Dubai, so unless you mean that you purchased from the online Apple Store for the UAE, you purchased from a dealer, who may or may not have been authorized. You can check the expiration date of the warranty on your iPad yourself by entering in the serial number here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do
    If it does indeed show the warranty has expired, then what you need to do from here will depend on who you purchased the iPad from and when you really did purchase it. Perhaps you actually purchased it in August and are just misremembering? Check your receipt. If you confirm that you did purchase within the last calendar year, tell us exactly where you got it and we can probably offer advice.
    Regards.

  • CRM 2011: when auditing is turned off, why do existing Audit records lose "New Value"?

    Not sure if this is by design (if so, would love to know why!) or if this is a bug.  Let's say I have auditing turned on for Accounts.  I change the phone number in the Main Phone field from 555-1111 to 555-5555, and an audit record is
    created showing the Old Value (555-1111) and New Value (555-5555).  Great.  Now I turn off auditing. The system goes back to the audit record that had previously been created, and modifies it so that it shows the Old Value (555-1111),
    and inserts an icon into the New Value field indicating auditing was turned off.  The tool tip for that icon states "Auditing was stopped and restarted.  The new values for the fields that changed during this period cannot be identified or recorded."
    First of all (minor picky issue) auditing hasn't been turned back on yet, despite what the tool tip says (says the same thing whether or not auditing is turned back on).  But the real problem is
    why the existing audit record's New Value would be removed... why would that happen?!?  We're talking about a historical update.  It really did change, and the system knew what it changed from/to, so why would the system remove that new value
    from the audit record?  Logically I would expect that any changes made
    while auditing is off would not be logged, and that once auditing is turned back on, Old/New values would correspond to whatever was/is in the system at the time that any new audit record is created, so there may be a disconnect between an older audit
    record and a new one (old record's New Value not matching the new record's Old Value, because changes were made while auditing was off). And it's quite apparent when auditing is turned off, because an audit record is created stating "Auditing Disabled". 
    Any ideas if there's a logical reason why it would do this, or if this is really a bug that Microsoft needs to fix?  We have a client with a business need to periodically turn off auditing while integration updates run between CRM and another system
    (otherwise hundreds of thousands of unnecessary audit records would be created).  But if they're going to lose audit data every time they disable auditing, the auditing is worthless.

    We wouldn't ever temporarily turn auditing off on purpose... it's happening when we import managed solutions.  We have vendors with managed solutions that contain system entities such as Contacts.  When importing their solution, it momentarily
    turns auditing off on those entities.  The only evidence of this is audit records indicating "Entity Audit Stopped", and of course the loss of all the most  recent "new value" on all audit records.  The interesting (?) parts of this are:
    1. When importing the managed solution, the recommended option to keep all existing customizations is selected.  I would think this would include the audit settings on the entity, but apparently not (sort of... see #2).
    2. As soon as the managed solution is imported, in addition to creating an "Entity Audit Stopped" audit record on relevant entities and wiping out new values, it apparently turns auditing back on, yet there's no record of this (in customizations, the entity
    still (or once again) indicates auditing is enabled; but on records for that entity, there is no "Entity Audit Enabled" record.   
    So, now it's on to working with the vendors, to dig into their managed solutions and see if there's a way to prevent this!

  • Why is HP SimplePass on my new windows 8.1 machine, when I do not have a finger or card reader?

    Why is HP SimplePass on my new windows 8.1 machine, when I do not have a finger print or card reader?
    It keeps popping up and asking me to use it?
    Can it be used to keep my passwords?
    What Version of SimplePass are you using?   Unknown, apparently you have to use it to find the version number.
    What is your Operating System? Windows 7 32 or 64bit? or?   Windows 8.1  64 Bit
    Which browser are you using?  Internet explorer version 11, and Fire fox version 34.0
    Can you give me a example of a Website that is giving you this problem?  Have not used it yet.
    Is is every webcard or just one or two websites that have this problem?  Have not used it yet
    What is your computer product number? (NOT serial number?)  HP 15-f039wm Notebook PC
    Thanks for any help you can offer.

    Hi,
    You could check the blog below.
    How to Enable Group Policy Debugging on Windows 7 / 8 Clients
    http://clintboessen.blogspot.jp/2014/01/how-to-enable-group-policy-debugging-on.html
    Note: Microsoft provides third-party contact information to help you find technical support. This contact
    information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    If you have any questions about Group Policy, you could get better support from Group Policy forum.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverGP
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Why every time i hit my new message or iMessage notification it goes and creates a new message to the person who sent the message

    why every time i hit my new message or iMessage notification it goes and creates a new message to the person who sent the message?

    Hey Rkbethel
    There are two ways to resolve this for you. For the first is go and do a Reset All Settings by going to Settings > General > Reset > Reset All Settings. It will not delete anything on your iPhone, but it will put all settings back to default. If it does not work, the next step would be to restore the iPhone back to factory settings.
    iTunes: Restoring iOS software
    http://support.apple.com/kb/ht1414
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

Maybe you are looking for

  • I cannot view my videos after upgrading to OSX

    I cannot view my videos after upgrading to OSX. Each video I try to open the message on the black background is Blocked Plug-In. In system preferences I have the latest Java but Flash Player does not upgrade to Flash 12 after numerous attempts.

  • I need to get some video files onto my iphone from a computer that does not have my itunes library on it

    Currently I am away from home, and using a computer that does not have my main itunes library on it. I do, however, have some video files on this computer that I would like to place onto my phone for the drive home tomorrow. Unfortunately,  It seems

  • Help SOAP to RFC Scenario using BPM (Synchronous communication)

    Hi, I am doing a scenario from SOAP to RFC scenario(Synchronous communication).  Here I am creating a PM Notification in the SAP system through a webservice.  I am using three BAPI'S here, 1. BAPI_ALM_NOTIF_CREATE  2. BAPI_ALM_NOTIF_SAVE 3. BAPI_TRAN

  • FI Baseline date substitution

    Hello Experts, I'm doing a date substitution for the baseline date under the following condition: if actual delivery date is set then use it else if not then if planned delivery date is set then use else use invoice date or document date we are doing

  • Kernel patch Upgrade Form 994 to1068(40B_EXT)

    Hi, We are migrating OS,DB From V5R2 to V5R4. We are currently working with COM kernel on our OLD boxes. Now we have applied 4.0B_EXT kernel 994 successfully from CD(51020599) in new Box. Now need to apply 1068 patch to support our V5R4 box. How can