FM for Holiday & Next Working day

HI All,
Please suggest any  single FM, which can give the current day is Holiday or not. If, Yes, the what is the next working day for a Facorty calender ID.
Both validation should be happend in a single FM.
Thanks & Regards,
Prabhakar.
Moderator message: FAQ, please search for previous discussions of this topic.
Edited by: Thomas Zloch on Apr 18, 2011 6:13 PM

hi ,
Pls check this FM
CALL FUNCTION 'BKK_CHECK_HOLIDAY'
        EXPORTING
          i_date            = wf_cntdt
          i_calendar1       = 'B1'
        IMPORTING
          e_x_no_workingday = wf_holi.
*get actual working days upto report date.
  it_act_work_days-dat_from  = w_date-low.
  it_act_work_days-dat_to    = w_date-high.
  APPEND it_act_work_days.
*calculate actual working days.
  CALL FUNCTION 'WFCS_FCAL_WDAYS_GET_S'
    EXPORTING
      pi_time_interval = it_act_work_days
      pi_fcalid        = 'B1'
    IMPORTING
      pe_wdays         = wf_actdays.
regards
Deepak.
Edited by: Deepak Dhamat on Apr 18, 2011 12:31 PM

Similar Messages

  • Netdue date alteration with next working day

    Hi,
    I have one report for Accounts Receivables .
    In this when net due date falls on holiday, i need to shift this "net due date"  to a next working day.
    I have one FM "DATE_CONVERT_TO_FACTORYDATE" which i can use for the purpose.
    As a input to this FM we need to give Factory calendar ID which is an attribute to Infoobject 0PLANT.
    Unfortunately i do not have 0PLANT in my datamodel. But i do have 0COMP_CODE in my datamodel.
    As i do not have any link between Factory calendar ID and 0COMP_CODE i am searching for an appropriate solution so that i could use this FM to shift net due date to Next working if the net due date is an holiday.
    Any Ideas?

    Simran
    I am not sure if we can get a direct link from 0plant to 0comp_code, but you can enhance the master data of the 0company code to add the factory caledar and load them manually into 0plant.
    Let me know if this helps..
    Regards,
    Avinash

  • Function  in param, start_date & number , return sums next working day

    Hi Friends,
    I need a funtion which can take in parameters as start_date and number , sum them as new date and return new_start_date as workind day.
    Suppose '15-SEP-2009' + 6 should return 23-SEP-2009 as new date.
    Basically the sum of date and number should return next working day (excluding saturday,sunday).
    e.g '15-SEP-2009' + 6 =21-SEP-2009 , but it includes saturday and sunday , so it should return 23-SEP-2009.
    Thanks
    Niren

    Hi, Niren,
    The first respondent gave a better function for testing for work days (Monday through Friday). If there's a bug with Saturdays, I'm sure that can fixed. Also,that function depends on your NLS settings. If that's an issue for you, that can be fixed, too. The idea that there are 5 work days in any 7 consecutive days will cut down the execution time considerable.
    A function like I suggested would be useful if you had to consider holidays as well as weekends.
    Here's an untested example:
    CREATE OR REPLACE FUNCTION  work_days_away
    (      in_start_date         DATE
    ,      in_day_cnt         NUMBER
    RETURN     DATE
    DETERMINISTIC
    IS
         IF  in_start_date - TRUNC (in_start_date, 'IW') >= 5
         OR  is_holiday (in_start_date)
         THEN
              RETURN  work_days_away ( in_start_date + 1
                               , in_day_cnt
         ELSIF  in_day_cnt >= 1
         THEN
              RETURN  work_days_away ( in_start_date + 1
                               , in_day_cnt    - 1
         ELSE
              RETURN  in_start_date;
         END IF;
    END     work_days_away;This use the date format 'IW', which does not depend on NLS settings, rather than 'D', which does.

  • Billing date of 2nd/4th saturday getting pushed to next working day.

    whenever my client trying to create bill of service order, bills on 2nd/4th saturday, the billing date is getting pushed to next working day. I checked their calender, they have maintained 2nd/4th saturday as holiday in holiday calender. However the validity is only till 2009. But the bills are getting still getting pushed. Am not too keen on using validation, please help.

    Hi,
    Are they creating invoices thru back ground ( using batch job ) ? in this case in the holiday calendar 2n'd and 4'th saturday is holiday, so the system is proposing new work day. you have to check all the three calendars once again let me know.
    Thanks,
    Chandu.

  • URGENT: Add Non-working day value to the next working day

    Hello expertz!
    I have a requirement were i need to shift the values of the non-working days to the next working day. The report allready works, showing only the values for the working days, but for example if i have the amount of 100 on 06.12.2009 (saturday) i want that this value is added to the amount of 09.12.2009, which is the next working day.
    Does anybody knows a solution to do this? Is this possible in BEx?
    Please advise if you think this is not possible.
    Thanks for the help.
    Nuno

    Hi Anil,
    I really appreciate your suggestion, but i'm still not getting the point. How to store the value of the non-working day in a variable and then add it where? Can you please clarify?
    Thank you very much for your help.
    Nuno

  • Hi guys, I recently got a new MacBook Pro with a USB Superdrive. A disc won't eject, does anyone know of a way to eject it? I'm in Morocco for the next 10 days so going to an Apple store is not possible. Any help would be gratefully received, thanks

    Hi guys, I recently got a new MacBook Pro with a USB Superdrive. A disc won't eject, does anyone know of a way to eject it? I'm in Morocco for the next 10 days so going to an Apple store is not possible. Any help would be gratefully received, thanks

    Five ways to eject a stuck CD or DVD from the optical drive
    Ejecting the stuck disc can usually be done in one of the following ways:
      1. Restart the computer and after the chime press and hold down the
          left mouse button until the disc ejects.
      2. Press the Eject button on your keyboard.
      3. Click on the Eject button in the menubar.
      4. Press COMMAND-E.
      5. If none of the above work try this: Open the Terminal application in
          your Utilities folder. At the prompt enter or paste the following:
            /usr/bin/drutil eject
    If this fails then try this:
    Boot the computer into Single-user Mode. At the prompt enter the same command as used above. To restart the computer enter "reboot" at the prompt without quotes.

  • Holiday as Working day - Marked as leave is not deducting from Quota

    Hi Experts,
    Please help me with below mentioned scenario.
    We have one holiday calendar for two personnel areas however holidays are different in both personnel areas, and as it is middle of year so I can't create a new holiday calendar for other personnel area so we maintain special day as working day in factory calendar to change holiday as working day for one personnel area.
    Holiday Calendar :- HA (haryana) ,                      Personnel Area (A)           Personnel Area (B)
    Holidays :-     25th Till 28th Oct Diwalii,                25th till 28 Holiday             26 & 27 Holiday only (25 & 28 working in special day rule)
    Issue :- personnel area (B) Now if Employee is getting leave for 25th (which is holiday in calendar and maintained as working day in special day rule) it is not deducting leave from quotas.
    Issue :- Half Employee on 25th are marked as Holiday (HH) in system however half have Absent (AA) in report.
    **(Should I try to make a deduction rule and counting rule for 25th & 28th as it is holiday & working togather... if yes thn what needs to be selected in counting rule)**
    Please provide inputs in this regards as it is urgent.
    Thanks you!!
    Anshul

    Hi Swapnil,
    Thanks man, I understood now, Yes you are right as but it is not working when I am trying to solve this issue after maintaining IT 2003. Now I have to go with second solution however I made Counting rule and deduction rule but facing issue assigning counting rule to Absence Type so the question is Do i need to make new absence type then counting rule and deduction rule or I can just make a counting rule and assign it to the existing Absence type?????
    Please help me through the process as I am little confused, just explain a bit like.. I need to make counting rule and assign it from <so & so> place.
    Thank you so much for your precious time,
    Anshul Upadhyay

  • Calculate next working day in future

    Hi,
    I hope somebody of you could help me here. I have the requirement to find the next working day 2 days after the visit. I need to join two tables which have an N to N relation.
    This is the first source table tbl_cust with customer and visiting day:
    customer_id    Name     visit_day       company_id
    1                   Tobias    27.08.2011  100
    2                   Hans      30.08.2011  100
    3                   Lars       27.08.2011   200
    4                   Dave      29.08.2011   200The second table tbl_comp_days includes the days where the different companies work:
    company_id  company_day    working_day (yes/no)
    100             27.08.2011       no
    100             28.08.2011       no
    100             29.08.2011       yes
    100             30.08.2011       yes
    100             31.08.2011       yes
    100             01.09.2011       yes
    200             27.08.2011       yes
    200             28.08.2011       yes
    200             29.08.2011       no
    200             30.08.2011       yes
    200             31.08.2011       yes
    200             01.09.2011       yesNow I want to calculate the second next work of the company joined with the customer visit_day
    Means: tbl_cust.visit_day + 2
    when tbl_comp_days.working_day is yes
    if tbl_cust.visit_day is not a working day find the next possible working day + 2 working days
    Output example:
    customer_id    Name     visit_day       visit_day_plus_2
    1                   Tobias    27.08.2011  31.08.2011
    2                   Hans      30.08.2011  01.09.2011
    3                   Lars       27.08.2011   30.08.2011
    4                   Dave       29.08.2011   01.09.2011Thanks for your help
    Tobias

    Hi, Tobias,
    Here's one way:
    WITH     got_r_num    AS
         SELECT     c.customer_id, c.name, c.visit_day, d.company_day  AS visit_day_plus_2
         ,     ROW_NUMBER () OVER ( PARTITION BY  c.customer_id
                                   ORDER BY          d.company_day
                           )         AS r_num
         FROM    tbl_cust       c
         JOIN     tbl_comp_days  d  ON   c.company_id  = d.company_id
                                 AND  c.visit_day   < d.company_day
                          AND  c.visit_day   >= d.company_day + 10     -- See note
         WHERE   d.working_day       = 'yes'
    SELECT     customer_id, name, visit_day, visit_day_plus_2
    FROM     got_r_num
    WHERE     r_num     = 2
    ;If you'd post CREATE TABLE and INSERT statements for the sample data, then I could test it.
    The last join condition ( c.visit_day >= d.company_day + 10) isn't strictly necessary. Depending on the size of the company_day table, it may make execution faster, by limiting the join to days soon after visit_day, rather than any time after visit_day. As I wrote it, it assumes that there will always be at least 2 working days in any period of 10 consecutive days. (In my company, there are always at least 2 working days in a period of 5 consecutive days.) You cam change the "magic number" 10 to anything else, or you can omit that condition altogether.
    Edited by: Frank Kulash on Aug 23, 2011 10:49 AM
    Added note.

  • Identifying the date as holiday or working day

    hi
    if a date is given then how to find, that day is holiday or working day.
    plz reply soon.
    regards
    kq

    Hi..
    You can find it by calling the FM <b>DAY_ATTRIBUTES_GET </b>
    DAY_ATTRIBUTES_GET : Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuesday), whether the day is a holiday, and more.
    reward if Helpful.

  • Schedule line confirmation on next working day

    Hi,
    For a sales org, (IE93) in a sales order if we request delivery on 25.12.2009 (Xmas day), APO availability check is performed and it is confirming on the next/prior working day.
    But in case of other sales org(GB93) it is confirming on the same day(on Xmas itself, which is a holiday)..
    We want the same control for GB93 also.. Any idea?
    Regards,
    Mayil

    Hi,
    Check the Factory calender Assignmene for these two COMPANY CODES, PLANT, in OVR3
    I believe the Factory calender is different for these two Organisational Units.
    Check the Factory calender settings in OVR3 transaction code
    Please revert back if you need further details
    thanks,
    santosh

  • ABAP General Forum in Santa mode for the next 10 days.

    Dear gurus,
    In an attempt to close some threads neglected by the OP's this year and achieve SDN's goals with regards to points (see the Welcome thread about the UN food program and other donations made by SAP based on annual contributions) I will be combing through selected threads from the current year and closing them as moderator.
    It will be impossible to do a perfect and complete job of this, but I will try my best to be fair and concentrate on those who have contributed valueable inputs of information but not been recognized appropriately.
    Feel welcome to post links to threads which you feel are candidates for me to take a look into, or even add to the "FAQ & Memorable threads" sticky. You can also contact me via my Business Card details.
    Also please close your own threads and do not dump them all to the top again unless there is a good reason to comment further (the comment field is not mandatory!)
    Cheers and merry christmas to all,
    Vijay
    Message borrowed from [Julius's thread|SDN Security Forum in "Santa" mode for next 10 days;

    Hi folks,
           i have a requirement like to fetch data business entity  and business area  in  REBDBE  transaction can you please provide the tables .
    i found VIBDBE for business entity details but i need table for business area linking with business entity.
    regards
    maruti
    Edited by: maruthi.k on Dec 21, 2009 12:12 PM

  • Calendar object for the next week day

    I have a calendar object,
    How can I get the calendar object the comes on the next Tuesday or for that matter any week day.
    For example I have the calendar object for today ie. Monday, 7th Aug 2006. How can I get the calendar object for the first saturday after today.

    What you do is calculate how many days ahead it is.
    This would be the target day, less today's day
    reduced to modulo 7. Add 7 to guarantee the %
    operator works correctly e.g.
    cal.add(Calendar.DAY_OF_YEAR,(7 + Calendar.SATURDAY -
    cal.get(DAY_OF_WEEK)) % 7);
    Requires that the numeric values associated with the days of the week are ordered and one apart. Even thought this is the case, the API does not say this is the case so it should not be assumed.

  • I can't activate iTunes Match. Why does it tell me that my computer can't be used for the next 85 days?

    Since yesterday, my iTunes keeps telling me, I can't use this Computer with iTunes Match for another 85 days because an other AppleID has been entered.
    That didn't happen tho!

    Is it possible that you used a different Apple ID to purchase something from the iTunes Store that uses DRM (copy protection), which you are now trying to sync?
    If so, when you get that prompt to enter Apple ID and password, you need to enter that other Apple ID and its password, not your current Apple ID.
    You can check the item that fails to sync.  Locate it on a list in iTunes.  Right-click it and select Get Info.  On the Info window Summary tab, if Kind is Protected AAC audio file, it has DRM.  Also note what it says for Apple ID.  That is the Apple ID you need to authorize.
    NOTE:  One computer can be authorized to play content purchased with more than one Apple ID.

  • Working day for a Holiday Calendar

    Hi, experts.
    I'm looking for a FM that returns me the next working day based on a Holiday Calendar (SCAL).
    It should have the same functionality as Factory Calendar FM FIMA_DAY_CONVERT_TO_WORKINGDAY.
    Can you help me out?
    Thanks in advance,
    Flavia

    Use this function module & make sure you pass the plant details, as factory calendar mostly depeneds on the Plant.
    Below is just an example to get the plant depending on Requisition & pass it to the function module.
    Createdate --> will be the current date.
    SELECT SINGLE t~fabkl
           INTO lv_fabkl
           FROM ( t001w AS t
             INNER JOIN eban AS e ON ewerks = twerks )
           WHERE banfn = reqnumber.
    CALL FUNCTION 'FKK_ADD_WORKINGDAY'
      EXPORTING
        i_date            = createdate
        i_days            = days
        I_CALENDAR1       = lv_fabkl
      I_CALENDAR2       =
    IMPORTING
       E_DATE            = workingday.
      E_RETURN          =

  • How can i find out the next 2 working days.

    Hi Experts,
    Based on a given date, i would like to find out the next 2 working days.
    Help me out.
    Regards,
    Mansi.

    Hi,
    Use this FM WRF_PSCD_GET_NEXT_WORKDAY
    first get the first working day and pass that day again to get the next working day
    and also pass the calender id for the same
    Import parameters               Value
    I Import parameters               Value
    I_DATE                          09/15/2007
    I_CALENDAR1                     US
    I_CALENDAR2
    Export parameters               Value
    E_WORKDAY                       09/17/2007
    Regards
    Shiva

Maybe you are looking for