Validation for absence duplicate

Dear brothers,
How can i validate the absence when the employee inserts it , like the employee inserted an absence from "01-jan-2012" to "05-jan-2012" ... and for any reason HRMS manager or he himself inserts again the same leave with same dates?
The system is raising caution only now i want it to raise error and stops the user and not let him complete the insertion for the same dates absence.
Any help please
Thank you

Hi,
We had the same requirements and solved it by calling a package to check whether any Absence is overlapping with any another. So write the below pl/sql.Once done . Register this function and called the function from "BG_ABSENCE_DURATION" . Note: test it in Test instance before doing it in Production instance.
================================
BG_ABSENCE_DURATION
================================
l_lv_overlap = LV_OVERLAP_VALID(date_start,date_end)
IF l_lv_overlap = 0 THEN
duration = 'FAILED'
     invalid_msg = 'Your applied leave date overlaps with another leave date,please change the date and try again'
               RETURN duration
                    ,invalid_msg
================================
BG_ABSENCE_DURATION ENDS
================================
================================
LV_OVERLAP_VALID FUNCTION
================================
function xx_lv_overlap_valid(P_ASSIGNMENT_ID IN NUMBER,
P_START_DATE IN DATE,
P_DATE_END IN DATE)
RETURN NUMBER
IS
V_VALID_FLAG NUMBER DEFAULT 9;
V_OVERLAP_VAILD VARCHAR2(50) := 'XX';
BEGIN
BEGIN
SELECT PAAT.NAME INTO V_OVERLAP_VAILD
-- , PAA.DATE_START
-- , PAA.DATE_END
FROM PER_ABSENCE_ATTENDANCES PAA
, PER_ABSENCE_ATTENDANCE_TYPES PAAT
, PER_ALL_ASSIGNMENTS_F PAAF
WHERE PAA.ABSENCE_ATTENDANCE_TYPE_ID = PAAT.ABSENCE_ATTENDANCE_TYPE_ID
AND PAA.PERSON_ID = PAAF.PERSON_ID
AND PAAF.ASSIGNMENT_ID = P_ASSIGNMENT_ID
AND P_DATE_END BETWEEN PAAF.EFFECTIVE_START_DATE AND PAAF.EFFECTIVE_END_DATE
AND (P_START_DATE <= PAA.DATE_END
AND P_DATE_END >= PAA.DATE_START);
Exception
When NO_DATA_FOUND Then
V_OVERLAP_VAILD := 'XX';
END;
IF V_OVERLAP_VAILD = 'XX' THEN
V_VALID_FLAG := 1;
-- If not overlapped
ELSE
V_VALID_FLAG := 0;
-- if overlapped
END IF;
RETURN V_VALID_FLAG;
END xx_lv_overlap_valid;
Regards,
Shabeer

Similar Messages

  • Create a validation for check double invoice

    Hi,
    I have read here on SDN for check double invoice on reference number. We want to create an warning message if same reference number is posted twice, not depending on invoice date. So if I, on 1st of October have posted an invoice with reference number 123 and then want to post with same reference number on 2nd of October I want to have an warning message. If I had understand right I need to make a validation for that. Is it true that I need to have a programmer to do that or how am I doing (one thread said that this was the solution, see; )?
    I suppose that my prerequisite will look as follows:
    BKPF-BLART = 'KR' OR BKPF-BLART = 'RE' (I want the check when entering both an invoice in FB60 and MIRO)
    How will my "check step" look like when I want to check if this reference has been entered before? Please describe in technical name.
    Is it possible to do a validation for getting a warning, or is it just possible with error message?
    I have also tried to change in IMG, in Material management > Logistics Invoice Verification > Incoming invoice > Set check for Duplicate invoices. Here we have all fields selected (check co. code, check reference, check inv. date). I changed to just select check reference, but this doesn´t solved my problem.
    Best regards Lisa

    Hello Lisa,
    Your first question,
    Yes system does not check MIRO invoice while posting FB60 invoice. Because when you post invoice with using FB60 transaction, system check BSIP table for duplication. But when you post MIRO invoice system doesn't fill BSIP table.
    So that your question answer is YES, you can register an invoice in MIRO with same reference without a warning.
    Your second question,
    BTE means Business Transaction Event. Those events are known as FI user-exit.
    So that when you posting an invoice with using FB60, system triggered on BTE 00001110 as i said on my previous message.
    I try to explain step by step how can you activate this BTE. But you need to ABAPer for giving warning message on this exit.
    Call FIBF transaction -> Settings -> Products -> ...of a customer
    Create a new line,
    Product : ZXX
    Text : BTE Products for FI Exit
    Product active : tick checkbox.
    Call SE37 for exit function and copy from FM SAMPLE_PROCESS_00001110 to ZFI_PROCESS_00001110. Then active your FM and go to FIBF transaction again.
    FIBF -> Settings -> Process Modules -> ...of a customer
    Define a new line.
    Process : 00001120
    Function Module : ZFI_PROCESS_00001110
    Product : ZFI
    And then you can some write ABAP code for validation and give warning message.
    In this FM, If you don't want to check duplicate invoice for your cases you can set export parameter e_nostd = 'X'.
    I hope it helps to you,
    Regards,
    Burak

  • Hyper-V cluster validation report "Found duplicate physical address" on nic team interfaces.

    I recently built a Windows 2012 Hyper-V cluster with 5 nodes. The validation report shows “duplicate physical address” error (error text pasted below).
    The hardware: HP BladeSystem – servers are BL460c blades, in a c7000 enclosure, connected to HP Virtual Connect switches.
    Each server has 2 physcal nics, teamed in Windows. In the NIC Teaming console, I created the following Team Interfaces and assigned each a VLAN ID:
    “Team1” (the default team)
    “Team1 - VLAN 204 – Management”
    “Team1 - VLAN 212 - 2012HB”
    “Team1 - VLAN 211 -Exchange DAG Replication”
    I also created 2 HV Virtual Switches. Neither one allows management interface to share. They are assigned to “Team1” and “Team1 - VLAN 211 -Exchange DAG Replication” respectively.
    Therefore, in Network Connection, I see the 2 physical Ethernet nics, and 4 “virtual” nics. Only 2 of them have IP addresses assigned: Management and HB. These are the two that the validation wizard complains
    about.
    The MAC address is not configurable in the NIC Teaming console, so I don’t see a way to resolve this error, except to use separate physical nics. I don’t want to do that because a) I would lose the benefits of
    the bandwidth aggregation that Virtual Connect provides, and b) When creating an Interface on a Team in Windows, it looks like it ALWAYS gives it the same MAC address, so that should be a supported configuration.
    Everything works just fine, and there are no other errors or IP conflicts or anything else. But I really want to fix it because I don’t know what unknown problems this may be causing.
    From the Cluster Validation report:
    Found duplicate physical address 10-60-4B-A9-4A-30 on node Cluster201.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster201.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Found duplicate physical address F0-92-1C-13-3C-2C on node Cluster202.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster202.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Found duplicate physical address 68-B5-99-C1-7E-9C on node Cluster210.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster210.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Found duplicate physical address 3C-4A-92-DE-1E-74 on node Cluster211.OurDomain.local adapter VC-Team - VLAN 212 - 2012HB and node Cluster211.OurDomain.local adapter
    VC-Team - VLAN 204 - Management.
    Found duplicate physical address 68-B5-99-C0-3D-50 on node Cluster212.OurDomain.local adapter
    Team1 - VLAN 212 - 2012HB and node Cluster212.OurDomain.local adapter
    Team1 - VLAN 204 - Management.
    Thanks!
    Dan

    Hi Dan,
    "It turns out that both hosts had the same default MAC address ranges for their virtual switches. Since the host vNICs were attached to the virtual switch on each host they received the first couple of MAC addresses from the switches.
    For details please refer to following link:
    http://www.jefflafr.com/blog/4/19/2013/conflicting-mac-addresses-when-building-a-hyper-v-cluster-with-converged-networking
    Hope this helps
    Best Regards
    Elton Ji
    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.

  • Driver not valid for HP Pavilion dv6t

    Need to update my Intel HD Graphic driver.
    Tried HP and Intel and both are stating that the driver being installed is not validated for this computer. Please obtain the appropriate driver from the computer manufacture. Set up will exit.
    Can anyone help? TY

    @ls1313 ,
    Hello and thank you for posting on the HP support forums.  Here is the link to the only supported drivers for your notebook.
    HP Pavilion dv6t-3000 CTO Entertainment Notebook PC
    I hope this helps.
    Have a great day and thank you for posting.
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    D5GR
    I work on behalf of HP

  • Validation for text field: Null and contains no spaces

    Currently on APEX 3.2
    I want to check 1 text field and 2 text areas to ensure they are not null and blank (hitting the space bar in the field) before submitting the page. How do I do both validations for on each field?

    I created a validation with a type of 'Function Returning Boolean' and using the following code in the expression:
    IF( TRIM( :P1_Text_Field) IS NULL
    Or LTRIM( :P1_Text_Field ) != :P1_Text_Field )
    THEN
    RETURN false;
    ELSE
    RETURN true;
    END IF;
    Edited by: Jeremy_F on Apr 12, 2012 8:15 AM

  • Payment for Absence Days in Off Cycle

    Hi,
    If an employee is to be absent during future payroll periods, for example, because of leave, you can pay the employee in advance for the period of the absence. The remuneration is calculated using Absence Valuation in Off Cycle Payroll.
    I facing problem in this to determine payment for Absence for Calendar Days = 22.
    The formula is Basic Salary/30 Days*Absence Day (Calendar Days).
    I tried changing the PCR X011 but the value is not determined.
    Can any Expert guide me to resolve this issue.
    I have one more doubts, If payment is made in Off Cycle for future Absence Days, then when regular Payroll run, system automatically reduce the Absence Days and pay for the remaining days.
    Regards,
    Ram

    Hi Sikindar,
    Thanks for the reply.
    Customer want every month the Calendar Days as 30 Days and 22 Days for two set of Employee Subgroup.
    The formula is below;
    ESG PCR 3 = Basic Salary/30 Days * No of Abscence Days (Calendar Days)
    ESG PCR 2 = Basic Salary/22 Days * No of Abscence Days (Calendar Days)
    You mean to say we can create two constant for two set of Employee Sub Group.
    Pls. see the screenshot of Table T554C.
    Now guide me how to write PCR for this.
    Regards,
    Ram

  • When trying to update my Apps I am being advised my account is not valid for the UK, I must switch to the Ireland store. How do I do this?

    When trying to update or purchase Apps I am being advised my account is not valid for the UK Store and I must switch to the IReland store. How do I do this?

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3.Tap "View Apple ID"
    4. Enter your user name and password.
    5. Tap "Country/Region."
    6. Tap "Change Country/Region"
    7. Select the region where you will be located.
    8. Tap "Done".

  • I have been using my Apple ID in India and recently i moved to Spain and now i can not see my indian apps.it says my apple ID is valid for only spanish store.how to download apps from Indian store being in Spain.

    I have been using my Apple ID in India and recently i moved to Spain and now i can not see my indian apps.it says my apple ID is valid for only spanish store.how to download apps from Indian store being in Spain.

    Did you try to change the location  in Settings/iTunes & AppStore/AppleID -> view Apple ID, log in ->Country/Region -> India?

  • Whenever I updated or downloaded a new app from the App Store, a message appears saying:   "Account Not In This Store Your account is not valid for use in the U.S. store. You must switch to the Swedish. store before purchasing."   I made some research onl

    Whenever I updated or downloaded a new app from the App Store, a message appears saying:
    "Account Not In This Store
    Your account is not valid for use in the U.S. store. You must switch to the Swedish. store before purchasing."
    I made some research online and asked a few of my friends with the same problem. All they did was sign out of iTunes from settings>iTunes & App Stores or from the App Store itself and signed back in. It worked for many of them but not with my iPhone 4s. It really does get on my nerves to always sign out and back in to the App Store as it sometimes works and allows me to update and download or most of the time it doesnt.
    When viewing my Apple ID account on my iPhone (after entering the password) it either views my account or says:
    "This Apple ID is only valid for purchases in the U.S. iTunes Store. You will be switched to that Store. Try your purchase again."
    So I press on OK then either switches me to the App Store app of its choice, or says "Cannot connect to iTunes Store".
    I tried restoring iOS6 hoping it was a bad installation, but i still have the same problem.
    Can anyone help me please?
    Arian

    Are you sure your AppleID is NOT tied to the US store? If you are trying to buy an app from the Swedish store you will be unable to do that. Some apps are only available on certain stores. That is why you get the "Cannot connect to the iTunes store" message when trying to buy that app. Your updates are being done from the US store ; thats why you can update sometimes and sometimes not.
    If you keep encountering problems contact iTunes support. They will help you sort it out.

  • Why do I get the message when I try to purchase an app or song on itunes using my iPhone5? "Account Not In This Store. Your account is not valid for use in the U.S. store. You must switch to the New Zealand store before purchasing."

    When I try to buy either an app or a song via iTunes, I have just started getting the following message and I am unable to change the store location. "Account Not In This Store. Your account is not valid for use in the U.S. store. You must switch to the New Zealand store before purchasing."
    This problem has only just started happening. I am on an iPhone5 iOS 7.0.4.
    Very frustrating. Can someone please tell me why & where the change has occured and how to fix it? In the past I have purchased many apps and songs on itunes and never had this problem.
    Thanks a mill :-)

    Click here and follow the instructions to change the iTunes Store country.
    (97125)

  • Outlook 2013 - Password change breaks S/MIME Certs "An error occurred in the underlying security system. Key not valid for us in specified state."

    AD password change comes up, user changes password.
    Tries to send signed or encrypted email with a Comodo S/MIME certificate, and gets the following error:
    ""An error occurred in the underlying security system.  Key not valid for us in specified state."
    I now have two reports of this error - one on Windows 7, and one on Windows 8.0 (remote user).
    The one on Windows 8.0, we tried removing their S/MIME cert from Outlook/Windows and re-adding, this did NOT resolve the issue.
    Plan was originally to have the 8.0 user ship their machine in, and wipe it, since nothing else could fix it and I wasn't finding anyone else with the same issue.  Now that I've got a second user with the same issue, its looking like a bug/issue and
    not a random glitch.
    Thanks in advance for any and all help with this!

    Hi,
    Thank you for your question.
    I am trying to involve someone familiar with this topic to further look at this issue.
    Thanks,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Report for absences

    Hi Friendsl,
    I need to create a absences report displaying the list of absences with the absence quota being deducted for the absence along with no.of days used in the quota and the year to which the quota belongs.I have checked in infotype 2001 but they is no field for absence quota deducted by the absence.
    Suppose if have the quotas as below in infotype 2006
    3 days from 2005
    30 days 2006
    30 days 2007
    I take 6 days of vacation in year 2006 through infotype 2001.This 6 days vacation has to be 3 days from quota of 2005 and 3 days from quota of 2006.
    The report should display this information as a list.
    Can anyone provide sample code on this..
    Thanks in advance,
    Vadivel

    Hi Vadivel,
    I think for your requirement ABAP query will do. Just create your own query and generate the report.
    Regards
    Pavani
    <b>Remainder: Points to be given on Answers</b>

  • Product is not valid for Sales org and distribution chain

    Hello friends,
    When i am saving the trade promotions , i am getting error message
    "Product XXXX is not valid for distribution chain XXXX, XXXX"
    I have maintained sales organization and distribution channel in commpr01 under sales and distribution tab.
    kindly help.
    Regards,
    Srinivas

    Hi Srinivas,
    the error is raised from the trade promotion CCA check - raised from method CL_CRM_MKTGS_PD_CCA_CHECK_HDLR~CHECK. There are the following checks performed:
    * There are several checks to do based on the distribtion chain
    * Execute the checks and identify which products fail which check
    1. *   Determine if the product passes the distribution chain check
    2. *   Determine if the product category 1 of the product assignment
       *   passes the product category check
    3. *   Determine if the product category 2 of the product assignment
       *   passes the product category check
    4. *   Determine if the product group of the product assignment
       *   passes the product group check
    5. *   Determine if the sales status of the product is set to blocked
    You may also need to check the sales and distribution data of the product category or product group of the mentioned product, if this is assigned to any.
    best regards,
    Johannes

  • Handle not valid for open spool request

    Hello everyone,
    i am facing an error while clicking the print preview option in change PO (me22n).
    i have given the dispatch time in further data of o/p as 'Send with application own transaction'.
    now, when i save and click print preview button i get an error as
    "Handle not valid for open spool request"
    Kindly give me some idea how to tackle this.
    Thanks
    gaurav

    Gaurav,
    I am having a similar issue and would appreciate if you could let us know how your problem was solved?
    What control parameters did you change to make this work?
    Thanks,
    Jay

  • I need to change from Japan App Store to Australia App Store. I get this every time I try using My MacID: "This Apple ID is only valid for purchases in the Japanese iTunes Store. You will be switched to that Store." What next TY. JohnCahill

    I moved from Japan to Australia. I need to change from Japan App Store to the Australian App Store. I get the following message every time I try using My MacID which was set up in Japan: "This Apple ID is only valid for purchases in the Japanese iTunes Store. You will be switched to that Store." At one point... by which path I do not remember... I was instructed to created a new ID. I fill out the new ID forms, but the address is rejected each time... quite confusing. Does it want a new name? But it says I cannot use an apple domain (tag?) even though I guess it has to be an apple address... ? So I have iTunes crdit cards purchansed in Australia, can't spend in AUstralian iTunes Store, get directed back to Japan each time, and can't open a new ID... What am I doing wrong? Thank you in advance.  John. Australia.

    You must have a separate Apple ID registered in the other store along with a valid bank-issued charge card in the other country, and a legal billing address in the other country.
    Sorry... But... You cannot use other countries itunes stores.
    You must be within the Country with a Valid Billing Address and Credit Card for that Country to use the iTunes Store of that Country..
    iTunes Store Terms of Service
    http://www.apple.com/legal/itunes/us/terms.html#SERVICE

Maybe you are looking for

  • How can you access the content behind an Animate .oam file in Muse?

    I have an animation to open doors at the bottom of a parallax scroll, but once the doors open, I cannot click on any of the buttons in my "room" that were set up in Muse. Anyone have any ideas of how to fix this? I am using CC for both programs. par·

  • Restore iBooks files from time machine backup after clean install

    I just did a clean install of Yosemite. I still have a Time Machine backup of my Mavericks install. iBooks in my new Yosemite install does not have all of my books and pdfs in it - just the ones I can download from the iBookstore. Is there an easy wa

  • Java - InputStream - Weird Characters in the Output!

    Hi, I have a software which outputs lines of numbers one by one. In another java program, I use BufferedReader as follows: BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream(),"US-ASCII")); where pr is the process which

  • Malfunction error when I connect

    Recently received an iPod from a friend. Everytime I try to connect the iPod [it's an 8g nano] I get the error message 'One of the USB devices attached to this computer has malfunctioned , and Windows does not recognize it.' Not sure what to do. Any

  • CUSTOM PAGE SIZES

    iWork > Pages > Document > Page Size : In the most recent update... The Inspector shows / has various pre-set templates.  Is there any way of creating custom sizes - for example 8.5" x 2"?