Where to find the validation for table

Hi Friends,
I'm new to HRMS. This is my senario. USers entering the Leave. When entering the leave, it is validating the leave days , and throws error. If they entering for the same person, same from date and same to date, it will show error that *'Record already exist'*. Otherwise , it will accept the new records. My situation is, if the person applied for 5 days. but he returned back into 4 days. So, when they tried to update those records also , it showing same error, *'Record already exist'*.
These validation they have done in fast formula..
IF(PFC_IN_CHECK_ABSENCE_OVERLAP(ASG_NUMBER,date_start,date_end)<>0) THEN
duration='FAILED'
invalid_msg='Your absence days are overlapping with an existing absence'
Procedure called in Fast Formula,
FUNCTION pfc_in_check_absence_overlap (p_employee_number VARCHAR2, p_start_date DATE, p_end_date DATE)
RETURN NUMBER
IS
CURSOR c_count
IS
SELECT 1
FROM per_absence_attendances absence,
per_absence_attendance_types absence_types,
per_all_people_f person
WHERE person.person_id = absence.person_id
AND absence.absence_attendance_type_id = absence_types.absence_attendance_type_id
AND TRUNC (SYSDATE) BETWEEN person.effective_start_date AND person.effective_end_date
AND person.employee_number = p_employee_number
AND ( (p_start_date BETWEEN absence.date_start AND absence.date_end)
OR (p_end_date BETWEEN absence.date_start AND absence.date_end)
l_count NUMBER := 0;
l_dummy c_count%ROWTYPE;
BEGIN
OPEN c_count;
FETCH c_count
INTO l_dummy;
IF c_count%FOUND
THEN
l_count := l_count + 1;
ELSE
l_count := 0;
END IF;
CLOSE c_count;
RETURN l_count;
END;
I need to change that, it should permit to update the records. Please let me know, how to do that, where to change and where to check.
Pl. help. This is little bit urgent.
Thanks in ADvance.
Mano

Can I confirm I understand your requirement correctly. Is this right:
* You have overlapping absence validation at the moment
* This errors whenever you try and create/update an absence where any day of this absence overlaps with an existing absence (ie, it starts between an existing absence, or ends between an existing absence)
* The problem with this validation in the case of update is that its validating against itself
Is that right?
If so, what you'd usually do in this case is get the cursor to ignore the absence being updated. For example:
FUNCTION pfc_in_check_absence_overlap (p_employee_number VARCHAR2, p_start_date DATE, p_end_date DATE, p_absence_attendance_id number default null)
RETURN NUMBER
IS
CURSOR c_count
IS
SELECT 1
FROM per_absence_attendances absence,
per_absence_attendance_types absence_types,
per_all_people_f person
WHERE person.person_id = absence.person_id
AND absence.absence_attendance_type_id = absence_types.absence_attendance_type_id
AND absence.absence_attendance_id <> nvl(p_absence_attendance_id, -1)
AND TRUNC (SYSDATE) BETWEEN person.effective_start_date AND person.effective_end_date
AND person.employee_number = p_employee_number
AND ( (p_start_date BETWEEN absence.date_start AND absence.date_end)
OR (p_end_date BETWEEN absence.date_start AND absence.date_end)
However, the problem here is getting hold of the absence_attendance_id. This isn't available to the Fast Formula, although I think if you're on release 12.1.3 it might be.
So with your current solution there's no way of getting the cursor to ignore the absence being updated. An alternative solution would be to implement this logic in API User Hooks on create_person_absence and update_person_absence. These hooks can pass in p_absence_attendance_id, which means you can then stop it erroring on itself.
If you moved to API User Hooks could you keep the same PLSQL as above (the version I modified). For more details on implement API User Hooks please see:
Understanding and Using Application Program Interface (API) User Hooks in Oracle HRMS [ID 73170.1]

Similar Messages

  • PA-US  Where to find the documentation for renumeration type?

    Gurus,
    Where to find the documentation for renumeration type details for IT0008 in SAP Library?
    I tried in HR sections under ERP of SAP Library, but could not find the place.
    Thanks,

    Revathi,
    I see an option to change the enum type in IT0008 maintenance screen.
    Which simply changes section of the screen as "salary" to "pay scale" and vice versa.
    I want to understand the difference between those in terms of payroll process (calculations).
    Hence, I was trying to find documentation in this regard in SAP Library.
    Thanks,

  • Where i find the drivers for hp j5783 scaner

    where i find the drivers for hp j5783 scaner

    Hello ezraie, and welcome to the HP Forums, I hope you enjoy your experience!
    I see you are looking for the drivers.  I would like to help.
    I would recommend following this link to the HP Officejet J5783 All-in-One Printer Drivers.
    Please let me know if you have any questions.  Thanks for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Where to find the logs for cronacle queues

    hi i m using redwood explorer 7.0.3 . Someboday had hold the cronacle queues . it was giving the message queues held by operator . But we don't know who held the queues. Can anbody tell where we can find the logs for these queues i.e who made changes w.r.to Cronacle queues.
    Regards,

    Hi,
    Yes this can depend on your system configuration
    To view the current settings of all parameters, you can:
    Use the Redwood Explorer and navigate to Configuration > Environment > Schedulers > SCHEDULERNAME > Parameters..
    Use the SHOW PARAMETERS or SHOW ALL command in the Redwood Shell.
    Look in the Master agent trace file.
    also check the operator messages in cronacle.
    Regards

  • Where to find the DTDs for 10.1.2.0.0

    Hi,
    where can I find the DTDs for the oc4j config files?
    In the default server.xml I found "http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd" but in the same xml file I found the following element which I cannont find in the 9_04.dtd.
    <j2ee-logging-config path="./j2ee-logging.xml" />
    Thanks for your help
    Günther

    Here's the j2ee-logging elements from the 10.1.2 DTD
    <!-- j2ee-logging config -->
    <!ELEMENT j2ee-logging-config (#PCDATA)>
    <!ATTLIST j2ee-logging-config path CDATA #IMPLIED
    <!ELEMENT application-server (library*, rmi-config?, sep-config?, jms-config?, javacache-config?, j2ee-logging-config?, principals?, log?, java-compiler?, transaction-config?, global-application, application*, global-web-app-config?, max-http-connections?, web-site*, global-thread-pool?, compiler?, metric-collector?, cluster? )>
    The j2ee-logging.xml file doesn't appear to have a DTD or XSD defined for it.
    cheers
    -steve-

  • Can some tell me where to find the documentation for Oracle forms 6i,11g

    Hi Everyone
    Can someone please tell me where to find the online documentation for Oracle Forms 11g and 6i .
    Thanks in advance
    Gautam

    Most of the design time documentation is included in the Design-time tools (Builders). Specifically in the Builder Online Help. This information is no longer available on a web site. As for Forms 6i, hardly any of that information is available on the Oracle site any longer. That version has been obsolete for several years. You can find some of the old deployment documentation for 6i (6.0.8):
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/techlisting-084882.html

  • Where to find the documentation for technical wage types?

    Gurus,
    I  need help finding the documentation for technical wage types such as /001...
    There are hundreds of them...
    Thanks,

    you can go to the view v_512w_d, choose your country grouping, the list of wagetypes will be displayed.
    there will be a help button available next to the wagetype name.
    you can view documentation either for technical or modal wagetypes.
    Have a good day!

  • Where to find the mapping for a Transformation

    Hi guys i have a problem...i have activated the infocubo 0IC_C03 and i notice that the mappings of 2LIS_03_BF dont have all the fields mapped and i assume that is an error of activation where i can find the complete mappinf that should be for this cube in order to realize if its correct or not?
    I hope sombody could help me....
    Regards....

    Hi,
    There is a table in BW where you can see the mappings for a DS for R/3 to BW..
    table name is RSOSFIELDMAP
    Hope this answers your question
    Regards,
    Srini

  • Where to find the source for HttpServlet

    Hello,
    I have the javaee.jar file but I also want to browse the sourcecode.
    Where can I find the src.zip or equivalent?
    I'm using eclipse btw.
    Thanks,
    Marcel

    Thanks for that.
    To conclude this thread:
    - sources for J2EE can be found in de source of the container.
    You can download Apache Tomcat source of Glassfish source for example.

  • 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 for LV 8.x or 7.x.
    So my question is where do I find the instrument old drivers for LabView 6.x?
    Thanks a lot,
    Al.

    For existing drivers (not recently developed), you can send an e-mail to [email protected] and request LV6.x drivers. 

  • Where to find the drivers for DB2 data base

    Hi All,
          I want to use JDBC adapter to connect to DB2 data base . I want to know where i can find the required drivers for the DB2 data base.If some one can provide the exact link that would be great.
    Regards,
    Tarun.

    hey
    Download universal driver for DB2,the jar file
    http://www-128.ibm.com/developerworks/db2/library/techarticle/0203zikopoulos/0203zikopoulos.html
    also have a look at the following to install these driver in XI
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
    thanx
    Aamir

  • Help! where to find the JDK for Unix ??

    I want to install a tomcat project in the Operation System (Digital Unix 4.0F) , It is a matter of great urgency. who can tell me where I could find
    the URL to down load the JDK for Digital Unix 4.0F ?
    thank you very much.

    I don't think there is a JDK for this platform...

  • Any one can show me where to find the JRE for MAC?

    I am trying to develop an application to run on PC and MAC. For PC, I can easily get the JRE to run it. But for MAC, what can I found is only MRJ 2.2.5. If I not wrong, I found that I can only run the applet(unable to support the SWING) but not the application. Anyone know where can I get the JRE for MAC which can run the application (same as the JRE1.3 for PC )
    There are a few MAC which has different OS. All of these MAC are too old to upgrade with latest OS so I cannot have the latest JAVA 2 technology support which is integrated in the latest OS. The MAC are running with OS 7 and OS 9 so anyone can tell me where to get the JRE that able to run the application that develop by using the JAVA 2?

    You probably already looked at
    http://devworld.apple.com/java/classic.html
    It doesn't look like they have one for Java 2 unless youupgrade to Mac OS X.

  • Where I find the connector for UNIX Telnet 9.0.4.4...?

    I am configuring the connector for UNIX Telnet 9.0.4.4 and in the documentation I requested this connector.
    On the home page of the Oracle connector exists only for UNIX Telnet 9.0.4.2.0
    Any suggestions

    - login to metalink
    - go to patches and updates
    - search for a patch for your connector
    - download and install the patch

  • Where can find the site for firmware download?

    We plant to upgrade our firmware, and I am looking the site for firmware download.

    [http://sunsolve.sun.com]

Maybe you are looking for

  • Does anyone know how to get photos from iCloud back on your iPhone?

    I was having issues with my iPhone 4 not charging anymore. I went to the apple store today and ended up having to buy a replacment phone. When I was going through the set-up, I tried to do an iCloud restore but wasn't able to as the new iPhone didn't

  • Itunes gives me an error message when i try to update iphone

    Im trying to update my iphone on itunes and it gives me an error message everytime, what am i doing wrong? I have the latest verison of itunes.

  • Prevent creation of additional common objects at the  same time ...

    Context: A Super User group may require to be allowed to create and/or change queries in Production Would be possible to prevent creation of additional common objects like rectricted and calculated key figures and variables at the same time allowing

  • RFC in background process.

    Hi All, I hve to process a RFC in background process. For doing that firstlly i hve creted va rfc n it's wkg fine then using this syntax i called this rfc for background task CALL FUNCTION 'Y_DYNTABLE1_AJ' IN BACKGROUND TASK DESTINATION 'rfc_bacgroun

  • In Design View, not seeing PHP includes

    I'm on a new Vista laptop using DW CS3, and pages whose contents displayed in Design View before aren't displaying in Design View. They're PHP pages with some includes, such as this one: http://www.miraverse.com/manifold20/studio/music-room.php In De