User Exit at 2001 absences

Hi,
I need a user exit to give me an error at 2001 in some case,Its about;when the users create absences record after employee left the company.for example employee left or fired the company at 10022009 and now the users can enter absence after 10022009,To prevent this, I need a user exit.
thanks,
Mehmet

Hi,
Goto CMOD, The exit name is PBAS0001, here go for the second function exit EXIT_SAPFP50M_002 , and write the include ZXPADU02 with your functionality .
Also see the sample code provided there to fetch data from infotypes . For reading data from Infotype first CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn and then again CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp after modifying the contents of infotype.
In this exit u can check the employee status, and then through an error message according to your requiremenrt.

Similar Messages

  • User-exits - Infotype 2001

    Hi,
    Can anyone tell me which user-exits exist when creating an infotype 2001?
    I need to make a validation when saving one infotype 2001, so I need to know which user-exits can I use.
    Thanks in advance for your help.
    Best regards,
    Sónia Gonçalves

    Hi,
    You must implements the function EXIT_SAPFP50M_002 (the include ZXPADU02) for After Input. In this Include you can check if the infotype is going to be saved (ex. sy-ucomm = UPD and somethings like this).
    There is another possibility with an object of the interface method IF_EX_HRPAD00INFTY~IN_UPDATE. This method is called when you are going to save.
    We make normaly these checks in 2001, 2002 and 2003 and all works properly.
    Kind Regards
    Jaime

  • HR-ABAP-want user exit for pa30  for creation 2001 infotype for sick leave

    Hi ALL,
             My requirement like, whenever I try to create a sick leave through PA30 Tcode for infotype 2001 then the has to be trigger like, if the personnel joing date will be from Feb-Dec any date of the year then, the SL will be valid for next year Jan.
    Ex; Todya I am creating SL on 2001 infotype. then the condition will
            If joining date not Jan 2007 then,
             Leave will be valid for next year Jan 2008.
    So, let me know is there any user exit for  this.
    Thanks In advance.
    J.P

    Find myself

  • Update infotype from user exit

    Hi,
    My requirement is to update a infotype from a user exit. I have a internal table with some records created in the user exit pbas0001. Now i need to update these records in the infotype 2001(absences). I tried using HR
    INFOTYPEOPERATIONS directly from the user exit and it didn't work. If i create a include program and create a subroutine within the include program and call it in the user exit still i am getting a error message. How can update the infotype from the user exit.
    Can someone send the example code for how to export the internal table from the user exit and import it in another program and update the infotype from that prgm.

    Put the entire code in another Report & SUBMIT that report from the User exit.. this will isolate the two work processes & the Z table should get updated..
    ~Suresh

  • USER EXIT to be added in IT2001

    Hey Experts,
    I have the following requirment and i havnt worked on HR ABAP.
    Please provide me the solution and how to reach the user exit in the infotype.
    User exit needs to be added to IT 2001 to include the logic mentioned below:
    a.     For every new record of subtype ANLE or ANLS in IT2001 for any employee, check the IT 0000 (infotype actions), table P0000 if any Action Type I2 (Termination of Contract) exists
    b.     If found, check the Quota balance for current year for Quota Type 30 (Accrued annual leave), 31 (Carried over annual leave), 32 (Accrued home leave)
    c.     Quota balance for each type can be found from IT2006 (Absence Quotas), Table P2006 by deducting P2006-KVERB from P2006-ANZHL
    d.     If leave applied is not within this quota, throw error message u2013 Leave exceeds available quota by #(actual no. exceeding)
    thanks in advance.
    Regards,
    Ram
    Moderator message: "spec dumping", please work yourself first on your requirement.
    Edited by: Thomas Zloch on Sep 28, 2011 2:20 PM

    Hi Shilpa,
    there is no hard code rule to use the specific user exit for substitutions, attached screen shots will help you to resolve the issue.
    Step 1: Go to the t.code: OKC9, specify the controlling area and event 0001.
    Step 2 :  Create the substitution and select the step (attachment 1)
    Step 3: below mentioned screen shot specify the any existing user exit (naming conversion starts with U) by F4 option and double click on the particular exit
    Step 4: you can see the Report ZGGBS800, here you can create the user exit next free number starts with U naming conversion, once it's created the replace the existing user exit in the substitution rule.
    Hope this will help you to understand the user exit process in substitution rule.
    Note: Only substitution rules there is no hand code rule for user exit, for other transactions we need to check the SAP delivered exits.
    Make sure that substitution rule must be activated once exit created
    Thanks & Regards
    Srinu

  • User exit for infotype 21

    i  want o find out user exit for infotype 21   for the time and  Absences  plsea help me out

    >
    SANDEEP JADHAV wrote:
    > Not working   man , when i used  infotype 21  and using subtype     i am getting  "  Creating   Absences "  screen   
    >  now  i am entering time and   Absences  hours when i save the entries  , now on that spot i want to find  out  user exit  but i am unable to get it
    >
    > Please help me out
    You meant infotype 2001, right?  the User exit  EXIT_SAPFP50M_002 works perfect or you could try the AFTER_INPUT method of the BAdI HRPAD00INFTY
    ~Suresh

  • User exit problem

    Hi,
    My requirement is to stop deletion of infotype 2001 record for some specific users. I am not able to achieve this through authorization, as through authorization if a user is given create access automatically he gets modify and delete access.
    So, I have tried EXIT_SAPFP50M_002 user exit from PBAS0001 enhancement.
    The problem with this user exit is that it is triggered for all infotypes. Since I want this to execute for only infotype 2001 and not for all infotypes in PA30. Anyone have an idea how to achieve this.
    Following is my code in exit:
    Case sy-ucomm.
      When 'UPDL'.
        Message 'Record cannot be deleted.' Type 'E'.
    EndCase.
    Thanks,
    Waqas Rashid
    Moderator message: please use more descriptive subject lines for your posts.
    Edited by: Thomas Zloch on Jan 26, 2011 3:48 PM

    Hi,
    Try this.
    CASE INNNN-INFTY.
    WHEN '2001'.
       "Your code comes here.
    ENDCASE.
    Regards,
    Jovito

  • Restricting vendors -any user exits please?

    Hi,
    I have a requriement where while creating Vendors they have configured in such a way that it has to be approved for all the create and change vendors. since there is some sensitive information like bank accounts and names .
    now we have changed the requriement where in we need to restrict the information only for certain conditions
    vendor employee account group B007 and company code 2001 and for rest they donot need any approval and can be directly created or changed.
    Is there any user exit or any other way where we can put this restriction.
    We cannot put the configuration for specific requirements either the configuration is on or off in total.
    Any help would be greatly appreciated.
    Thanks and Regards,
    Ravi Kumar L

    Hi Max,
    In XK02 if we change any of the Sensitive fields(like name bank account,bank key...). then it pops up a message that document is saved but needs to be confirmed.
    For confirmation we need to login to FK08 and then press the confirm buttom for that vendor.
    Now our requirement is we need that confirmation for some vendor employee account group B007 and company code 2001 and for rest they donot need any approval and can be directly created or changed.
    As Suggested by Himanshu and You I have been in touch with the Basis guys for the creation of a Z object and authorization so that i can call the Authorization object in the user exit.
    they too are not sure. so i need to confirm them so that they can go ahead with the creation of the z object. Since this involves business we need to tell them if this is possible or not fore hand and take their approval.
    Can you suggest if we are going in the right direction.
    Thanks,
    RK

  • User Exit that triggers for Change operation

    Hi All..
    I want a user exit which triggers when I enter into an infotype(2001) from tcode PA30.
    My actual requirement is to show the field REFNR in display mode.
    By using the exit PBAS0001 exit0001 I can make the field REFNR in displaymode for create operation.
    But in change operation of the infotype the exit is not getting triggered.
    Regards,
    Anji.

    chk these
    Transaction Code - PA30                     Maintain HR Master Data
    Enhancement/ Business Add-in            Description
    Enhancement
    PBASRP01                                PA: User exit distributed reporting
    PBAS0002                                PA: Enhancements for Personnel Administration - Menu
    PBAS0001                                PA: Pers.Admin./Recruitment: Default values and checks
    PARA0002                                Enhancement for Calculating Annual Salary; IT0008,14,15
    PARA0001                                Enhancement for Determining the Number of Periods
    HRRPAI01                                User exit for FB HR_ENTRY_DATE and HR_LEAVING_DATE
    HRPC0001                                HR: PC download authorization
    HRPBAS01                                User Exit for HR Master Data
      Business Add-in
    HRPAD00_PREM                            Definition of User Exit for Collective Search Help PREM
    HRPADUS_PBAS_0001                       Customer Exit for Message handling
    HRPAD_SUBTY_CHECK
    HR_F4_GET_SUBTYPE                       HR: Entry help for subtypes
    HR_FAST_ACTION_CHECK                    Check fields on the fast entry screen
    HR_INDVAL                               HR: Indirect wage type valuation
    HR_SET_PKGAB
    HRPAD00_RECOG_SCREEN                    Employee - Recognition Screen
    HRPAYXX_DELETE_PERNR                    BAdI for Reports Deleting Personnel Numbers
    HRPAD00_PAPM                            Definition of User Exit for Collective Search Help PAPM
    HRPAD00_GET_AF_0008                     Additional Fields for Basic Pay Infotype (0008)
    HRPAD00_ENTRY_LEAVE                     HR_ENTRY_DATE and HR_LEAVING_DATE
    HRPAD00_ADRS                            HR: Address formatting
    HRPAD00MGEACTIVATION                    Activation Action BAdI for Global Employees
    HRPAD00INFTY                            Update / Infotype maintenance
    HRPAD00AUTH_TIME                        Time Logic in the PA Authorization Check
    HRPAD00AUTH_RECORD                      Spanish Data Privacy Law: Exit for Recording
    HRPAD00AUTH_CHECK                       HR: Authorization Check
    HRIV_REDUCE_AMOUNT                      Reduction within Indirect Valuation

  • CATS user-exit

    Hello,
    We have added a custom field (say cust01) to the CAT2 transaction to enter working time and it works fine. However, when absences are entered, we would like to have this cust01 values at the staging table. But based on certain situation we do not want it to be transferred to the time infotype.
    Is there any user-exit to analyze the data in staging tables like PTEX... and decide what needs to be transferred to the infotypes.
    Thanks in advance for all your information.
    Regards,
    saplover

    Hi,
    Check this thread for the user exits in CATS.
    Re: User exit in CAT2
    Regards,
    Manoj.

  • User exit for SalesDocumentParser

    Hi there,
    Has anyone ever implement the user exists for the com.sap.isa.isacore.action.SalesDocumentParser class?
    I tried but it does not seem to execute. Here is what I did:
    1. Created a class that inherited from SalesDocumentParser
    2. Created a new directory WEB-INF/xcm/customer/modification
    3. Created a new factory-config.xml file in this directory (see content below)
    4. Checked it all in and NWDI deployed the application
    Content of factory-config.xml :
    <factory xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xml="http://www.w3.org/XML/1998/namespace">
         <!-- SCA: IMplement the user exit in the parser class -->
         <factoryClass isa:extends= "../factoryClass[@name = 'salesDocumentStandardParser']"
              className = "com.foo.Z_SalesDocumentParser" />
    </factory>
    Any help would be appreciated.
    Regards,
    Christiaan

    Hi-
    Have the below include in your factory-config.xml above your <factoryclass> tag
    <xi:include href="$/modification/factory-config.xml#xpointer(factory/*)"/>
    let us know if you still not able to execute your custom class
    -Raj

  • User Exit manually created, needs to be activated

    Dear All,
    I am a PP consultant and in the absence of ABAPER here needs to do the following. Please provide your inputs.
    For MRP run material selection, I have created a user exit manually in PP-config. The help of this transaction says "User exist must be activated in the SAP externsion concept. The name of the extension is M61X0001."
    Please let me know what is this, where do i activate this and what are the codes that i write to choose the materials having certain MRP controller(MARC-DISPO).
    Thanks in advance.
    Sumeet
    P.S. > The config is done in SPRO>PRODUCTION>MATERIAL REQ.PLANNING>PLANNING-->uSER eXIT.material selection for planning run.

    Hi Summet,
    See sumeet, u see the definition of user exit in Tcode SMOD.
    So goto Tcode SMOD->M61X0001. Once u enter into it, click on components on application toolbar. Then u can find 2 Function modules.
    EXIT_SAPLM61C_001
    EXIT_SAPMM61X_001
    Goto Tcode CMOD to implement the user exit. So goto Tcode CMOD->ZM61X0001->create and add M61X0001 to ur implementation.
    Now write the required code in these function modules, and then click on Activate Project to activate the user exit.
    Try this and get back to me incase of anu queries.
    Dont forget to reward points if found useful.
    Thanks,
    Satyesh

  • User exit for PA61 - Validations to IT2001 & IT2002 upon save

    Hi,
    I got a requriement as follows:
    User enters time thru PA61 and I need perform some calculations upon saving the weeks time in PA61.
    I have to do two tasks:
    1) I need to read the hrs entered by the user in PA61 for that week
    2) Upon save, I need to calculations and save that to IT2001 & IT2002 based on Absence types.
    PLease let me know any user exit, where i can write code & how to read the time for the particular week.
    Thanks,
    Shrini

    HI Shreenivas
    As Omid said , PA61 is T-Code for maintain time data its like PA30. but if you need to put any validation or any business check, you can use the User Exit  (enhancement) PBAS0001 via t-code SMOD.
    here you can select the functional module EXIT_SAPFP50M_002 and write your customer logic (ABAP code) for IT2001 and IT2002 in the include ZXPADU02.
    Thanks,
    Dinesh

  • CATW user exit

    Hi there
    I'm trying to create a dropdown similar to the attendance/absence dropdown in CATW.
    Could anyone please kindly tell which user exit I should use? 
    Thanks in advance.

    Hello Vtest,
    This is how u do...
    In user exit EXIT_SAPMM06E_004.
    data: begin of th_head occurs 0.
           include structure thead.
    data: end of th_head.
    data: begin of th_line occurs 0.
           include structure tline.
    data: end of th_line..
    clear: th_head, th_line.
    refresh: th_head, th_line.
    th_head-tdobject = 'EKKO'.
    th_head-tdid = 'F14'.
    th_head-tdspras = sy-langu       .
    append th_head.
    th_line = '*'.
    th_line = 'this is first line'.
    append th_line.
    clear th_line.
    th_line = '*'.
    th_line = 'this is second line'.
    append th_line.
    CALL FUNCTION 'SAVE_TEXT'
       EXPORTING
       CLIENT                = SY-MANDT
         HEADER                = th_head
       INSERT                = ' '
       SAVEMODE_DIRECT       = ' '
       OWNER_SPECIFIED       = ' '
       LOCAL_CAT             = ' '
    IMPORTING
       FUNCTION              =
       NEWHEADER             =
       TABLES
         LINES                 = th_line
    EXCEPTIONS
       ID                    = 1
       LANGUAGE              = 2
       NAME                  = 3
       OBJECT                = 4
       OTHERS                = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    this should work for you.

  • User exit ZXPADU02 - evaluating SY-UCOMM

    Hello everyone,
    I am trying to display an error message whenever someone tries to create a new work schedule rule (P0007-SCHKZ) in infotype 7. However, the error message should just come up when the user is trying to save his data.
    I am using user exit ZXPADU02 for this purpose. My problem is that SY-UCOMM does not seem to hold reliable data in this user exit, and SSCRFIELDS does not seem to be supported at all.
    My code looks like this (only the relevant code snippet in ZXPADU02):
    CASE INNNN-INFTY.
            WHEN '0007'.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING PRELP = INNNN
            IMPORTING PNNNN = P0007.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING PRELP = PSAVE
            IMPORTING PNNNN = P0007_ALT.
          IF P0007_ALT-SCHKZ <> P0007-SCHKZ
          AND IPSYST-MASSN IS INITIAL " do not warn within an info group of a personnel action
          AND SY-UCOMM = 'UPD'. " only warn when saving the data -> problem here <-
            MESSAGE 'Do not change IT7 directly or else.' TYPE 'I' DISPLAY LIKE 'E'.
            SHOW_DATA_AGAIN = 'X'.
          ENDIF.
    At first glance, the above works nicely.  But this is what happens when I test more thoroughly:
    I create a new period in IT 7, enter a P0007-SCHKZ other than the one that was previously valid, press F11. Some warnings appear (for different reasons), which I dismiss using the Enter key. Afterwards, the above code fires, the error message is being displayed, and I am thrown back into the data screen. So far, so good.
    Now I simply alter the value in the field "Weekly hours" (P0007-WOSTD) and press Enter (!). Again a series of warnings appear, including one that a dataset is going to be deleted (seeing that an IT 7-period with just the same date range already exists). I confirm that with Enter, and the data is being saved. The above code does not fire because I have only pressed Enter - but the data is being saved anyway!
    Looks like a pretty erroneous behavior on the side of the SAP system. The question is whether I have a chance to do something about it in the code.

    Mihir Nagar wrote:
    Dear Petersen,
    Your IF condition seems ok. I doubt on the message statement. Can you replace your message statement with type E.
    MESSAGE 'Do not change IT7 directly or else.' TYPE 'E'.
          ENDIF.
    Hope this works.
    Regards,
    Mihir.
    I did not expect this to work, because normally you use type 'E'-messages only in certain PAI-environments, but it does the job, thank you!
    make use of  field IOPER of the structure  PSYST to check on the infotype actions INS, MOD, COP, DEL...
    In this particular case I did not care, so I did not check that. IT 7 should only be maintained through personnel actions in our case.
    Next you can check with sy-ucomm field the different between "enter" and "save". With "save" sy-ucomm will be 'UPD'.
    That is what I did, but as I described, there was a situation when SY-UCOMM is SPACE, but the system saved anyway due to a prior save attempt.

Maybe you are looking for

  • HT1178 can I add a external hard drive to my time capsule

    I have a time capsule. and I want to add a external hard drive. how can I do that?

  • Serious bug in LabView 8.5 Formula Node

    Hello, Thought I would warn my fellow LabView programmers about a serious error in the Formula Node: The problem may be encountered by anyone running a non-us LabView installation: I am located in Norway, and over here we use the comma (,) as the sep

  • Iphone 5 plug in but don't recharge

    Hello everybody ! I plug my iphone 5 in but it doesn't recharge ! He's off and the screen is black, with battery with 3 sticks .. When i plug off, i see the battery and the cable sync. I already try the button up + home .. nothing again ! I change th

  • Want to run SAP on IPad

    Hello to every one, I m working in a company where SAP is implemented. Clients are using it on PCs through LAN. I want to run it on IPad as well through Wifi. Is there any specific client of SAP for IPad or any web application that run in any browser

  • Please comment - we are planning to use GG in unconventional way to replica

    Please comment - we are planning to use GG in unconventional way to replicate all changes except the purge on source      Hi we have source and target DB. We want GG to replicate all changes on source to target. But we purge monthly data from source