Second working day of a month

hello abaper,
  Cud u pls tel me how to get second working date of any month

Function group                 Function group short text
Function Module Name           Short text for function module
CATSXT_UTIL
CATSXT_GET_HOLIDAYS
DTCO
CHECK_HOLIDAY
COLLECT_HOLIDAY_DT
FB00
BKK_CHECK_HOLIDAY
HRFBN00GENERAL                 Function Group for FBN FMs
HR_FBN_GET_HOLIDAY_PLAN_COST   Display FlexBen Holiday Cost in IT0377
HRFBN00MISCEL                  Function Group for Misce. Plans FBN
HR_FBN_UPDATE_HOLIDAY_QUOTA    Anmeldung eines Mitarbeiters für Sonstige Pläne
HRPAYBE_SRD_UN05
HR_BE_DAQ_UN05_NATUDAY_HOLIDAY Get nature of day
HR_BE_UN05_PUBLIC_HOLIDAY      Get replacement day for public holiday falling on a day-
off
HRPAYDETM01
HR_DE_CHECK_HOLIDAY
HR_DE_GET_HOLIDAY
HR_DE_REMOVE_HOLIDAY_FROM_LIST
HRTIM00FORMS
HR_FORMS_READ_HOLIDAYS
RHBD
RH_REQUEST_ON_BEFOREHOLIDAYS
RH_REQUEST_ON_HOLIDAYS
RPTM
RP_GET_REMAINING_HOLIDAY
SALP_UI                        User Interface for PerfDB
SALP_UI_F4_HOLIDAY             f4-help for holiday & factory calendar
SCA5                           Calendar: Additional functions
HOLIDAY_CALENDAR_GET
HOLIDAY_GET
SCAL                           Calendar functions
HOLIDAY_CHECK_AND_GET_INFO     Calendar function: Public holiday check with information
SCTR                           Transport public holiday texts
HOLIDAYTEXT_CORRECT_KEY
HOLIDAYTEXT_FIND_OUT_RULES
SFT1                           CHDO HOLIDAY => Gen. by RSSCD000
HOLIDAY_WRITE_DOCUMENT         CHDO HOLIDAY => Gen. by RSSCD000
SFT2                           CHDO HOLIDAYCAL => Gen. by RSSCD000
HOLIDAYCAL_WRITE_DOCUMENT      CHDO HOLIDAYCAL => Gen. by RSSCD000
WSAF
WSAF_OUTBOUND_PUBHOLIDAYS
try these...
ALSO
Date, Month and Popup Related Function Modules
Date/Month Related Function Modules:
DATE_COMPUTE_DAY u2013 Finds day of the month
DATE_CONV_EXT_TO_INT  - user formatted date is converted to system date
DATE_GET_WEEK  - convert date into year + week format
DATE_TO_DAY u2013 gives weekday from date
DATE_IN_FUTURE u2013 takes number of days and date  - gives future date in user format and system format
MONTH_PLUS_DETERMINE u2013 add or subtract month from a date
RH_GET_DATE_DAYNAME - return the day based on the date provied
DATE_COMPUTE_DAY
DATE_TO_DAY
RP_CALC_DATE_IN_INTERVAL_SG u2013 add/subtract year/month/days from a date
DAY_ATTRIBUTES_GET
WEEK_GET_FIRST_DAY u2013 take input as YYYYWW and it gives first day of the week.
MONTH_NAMES_GET u2013 language is only parameter. Returns internal table with months.
MONTH_PLUS_DETERMINE u2013 subtract months from date

Similar Messages

  • How to create a recurrent event on the first or last work day of the month

    The lightning calendar allows selection of the first and last day of the month for recurrent events but for business I need to use the first and last WORK day of the month (Monday - Friday) to schedule particular tasks. In the calendar preferences under 'View' I can select the days that make up the work week but this does not transfer to an option in recurrent events. Is there another way to do this or is it just not available?

    Hi there,
    do know for the UlltimateBootCD4Win? This from CD bootable WinXP-BartPEedition with additional tools gives you the ability to make such things like partitioning, backup or formatting your HDD.
    It has many more applications which help you to maintain your system without booting your original OS.
    So I think that this CD will solve your partitioning issues.
    Heres a link: www.ubcd4win.com/
    Just try it and tell me your opinion.
    Nice weekend and greetings from the sunny south ;)

  • How can i get a number of working days in a month PL/SQL

    How can i get a number of working days in a month(excluding Saturday and Sunday) in a query in PL/SQL ?

    Please do a search before posting
    sql>
    select count(*)
    from(
    select trunc(sysdate,'month')+rownum-1 dy
    from all_objects
    where rownum <= last_day(sysdate) - trunc(sysdate,'month')+1)
    where to_char(dy,'fmday') not in ('sunday','saturday');
    COUNT(*) 
    23
    Message was edited by:
            jeneesh
    Please try yourself to change the query to one that doesn't use a subquery..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Calculate number of working days in a month

    Hi All,
    I am trying to build a report to calculate the performance of a sales rep for the current month. This report has to exclude the holidays (saturday, sunday and one extra day in each month) in order get the exact performance. Could anyone suggest me on how to go about writing a Case statement which would get me the number of working days in a month excluding holidays.
    Thanks

    Hi,
    There are no direct oracle function that could be used to get the desired results.
    However you could try using something like
    SELECT COUNT( *)
    FROM
    (SELECT ROWNUM RNUM
    FROM ALL_OBJECTS
    WHERE ROWNUM <= TO_DATE('&1') - TO_DATE('&2') + 1
    WHERE TO_CHAR(TO_DATE('&2') + RNUM - 1, 'DY') NOT IN('SAT', 'SUN');
    Give the two date ranges that you want to look for with the highiest one first. i.e say for example - 01-FEB-2011 to 31-DEC-2010 would give the working days in JAN. However note that you might have to check for holidays related to that country/region (which could be added as a seperate table).
    If you need to get an extra day in addition to the weekends, please give the dates accordingly
    SQL> SELECT COUNT( *)
    2 FROM
    3 (SELECT ROWNUM RNUM
    4 FROM ALL_OBJECTS
    5 WHERE ROWNUM <= TO_DATE('01-FEB-2011') - TO_DATE('01-JAN-2011') + 1
    6 )
    7 WHERE TO_CHAR(TO_DATE('01-JAN-2011') + RNUM - 1, 'DY') NOT IN('SAT', 'SUN');
    COUNT(*)
    22

  • Function module for getting teh last working day of a month.

    Hi GURUS,
    this is criteria,please help me 
    if V_T001B- FRYE1 < month entered in selection screen
              Then throw the error message
                Else
    Find the previous period and its last working day from the function module
          (i..e Assume entered date as June 2 2009 then
                   Period 6 -1 = 5.
         Pass the month 05 to function module then
                   Find last working day.
                   Keep it in a variable (V_LAST_PRD_WRKDAY)
                           Proceed further.
    thanks in advance,
    Rajeev

    Hi Rajeev,
    You can use Function Module LAST_DAY_IN_PERIOD_GET.
    Ex:
          CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
            EXPORTING
              i_gjahr = p_gjahr
              i_periv = lwa_t009b-periv
              i_poper = lwa_t009b-poper
            IMPORTING
              e_date  = s_audat-high.
    Regards,
    Ravi K

  • Need working days for all months in a given year

    Hi,
    I need no of working days for all the months in a given year.
    (i.e year is the input and the query should return 12 columns(jan-dec). Saturday and Sunday are holidays)
    Regards,
    Vignesh

    Maybe you can use this:
    break on month skip 1
    set linesize 200
    set pagesize 2000
    column month format a20
    column week format a4
    with req as (select '&Required_Year_YYYY' as yr from dual)
        ,offset as (select case when to_char(trunc(to_date(yr,'YYYY'),'YYYY'),'IW') in ('52','53') then 1 else 0 end as offset from req)
    select lpad( Month, 20-(20-length(month))/2 ) month,
           '('||week||')' as week, "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"
    from (
      select to_char(dt,'fmMonth YYYY') month,
      case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
           when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
           when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
           else to_char(to_number(to_char(dt,'iw'))+offset) end as week,
      max(decode(to_char(dt,'d'),'1',lpad(to_char(dt,'fmdd'),2))) "Su",
      max(decode(to_char(dt,'d'),'2',lpad(to_char(dt,'fmdd'),2))) "Mo",
      max(decode(to_char(dt,'d'),'3',lpad(to_char(dt,'fmdd'),2))) "Tu",
      max(decode(to_char(dt,'d'),'4',lpad(to_char(dt,'fmdd'),2))) "We",
      max(decode(to_char(dt,'d'),'5',lpad(to_char(dt,'fmdd'),2))) "Th",
      max(decode(to_char(dt,'d'),'6',lpad(to_char(dt,'fmdd'),2))) "Fr",
      max(decode(to_char(dt,'d'),'7',lpad(to_char(dt,'fmdd'),2))) "Sa"
      from ( select trunc(to_date(req.yr,'YYYY'),'y')-1+rownum dt
             from all_objects, req
             where rownum <= add_months(trunc(to_date(req.yr,'YYYY'),'y'),12) - trunc(to_date(req.yr,'YYYY'),'y') )
          ,offset
      group by to_char(dt,'fmMonth YYYY'),     case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
                                                    when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
                                                    when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
                                                    else to_char(to_number(to_char(dt,'iw'))+offset) end
      ) x
    order by to_date( month, 'Month YYYY' ), to_number(x.week)
    / L.

  • Get working days of actual month in time management

    Hello,
    a customer wants his employees to work some additional time every workday. The time is different for each employee and has to be specified on a monthly basis, but has to be shown daily in time sheet.
    Days with holidays or illness do not require additional work, but count when calculation daily quota.
    I would like to use P0050-ZTZUA to store the value of the hours which the employee has to work extra per month.
    Now I need to divide this value through the number of workdays of the actual month, to get a value per day. Unfortunately I did not find any operation to get number of workdays.
    Thanks in advance

    Hello again.
    I did not get it!
    I made a simple PCR "Z123" just to test, how to count days. It looks like this:
               D VARSTCURMO
    **           HRS=1     ADDDB9082
    I call this with ACTIO Z123 and see, that the result for timetype 9082 is 1 at every day that is evaluated in my calculation period.
    In the example I do not care for workingdays, I just wanted to test, if the counting of days is functioning.
    Since the timetype 9082 is cumulated, I get number of days of period at the end of the time calculation in SALDO-Table.
    For example:
    Day               Saldo in 9082
    January  1             1
    January  2             2
    January  3             3
    January 31            31
    My problem is, that I need the number of days at each day of the calculation. Already at January 1 I need to divide a given amount of time through the number of days (31 in the example).
    I'm afraid, that this issue cannot be solved?

  • How to calculate number of working days in current month?

    hi gurus,
    In a customer exit I am trying to check if the system date is the 3rd business day of the current month.  Is there any FM module that i can use?
    thanks in advance...

    Use this Function module WDKAL_DATE_ADD_FKDAYS.

  • Get working day of month for specific date

    Hi,
    I need to get the working day of a month for a specific date. For example: Which working day is the 15th of september 2005...
    Is there any function module, I could use?
    Cheers Arne

    HI arne,
    1.  DATE_CHECK_WORKINGDAY
        This is the FM.
    2. Along with that u will have to use some logic.
    3. Just copy paste in new program
       (it will help in the logic)
    <b>It will list out
    all the working days
    between two given dates</b>
    REPORT abc.
    data : num type i.
    parameters : frdate type sy-datum default '20051216'.
    parameters : todate type sy-datum default '20051221'.
    perform getinfo using frdate todate changing num.
    break-point.
    *&      Form  getinfo
          text
    FORM getinfo USING fromdate todate CHANGING numofdays type i.
      DATA :  d TYPE sy-datum.
      d = fromdate - 1.
      DO.
        d = d + 1.
        IF d > todate.
          EXIT.
          endif.
          CALL FUNCTION 'DATE_CHECK_WORKINGDAY'
            EXPORTING
              date                       = d
              factory_calendar_id        = '01'
              message_type               = 'I'
            EXCEPTIONS
              date_after_range           = 1
              date_before_range          = 2
              date_invalid               = 3
              date_no_workingday         = 4
              factory_calendar_not_found = 5
              message_type_invalid       = 6
              OTHERS                     = 7.
        IF sy-subrc = 0.
          numofdays = numofdays + 1.
          write :/ d.
        ENDIF.
        ENDDO.
      ENDFORM.                    "getinfo
    regards,
    amit m.

  • Display data for last working day of month

    Hi
    I am trying to chart values for the last six years but only to plot the value for the last working day of the month, except for the current month where I am taking an average of the month so far. Everything I've tried has so far failed spectacularly. Has anyone resolved a similar problem?

    If I understand your dilemma correctly, you may want to create a cross-tab and then create the chart off of the cross-tab. Is the data in your tables that you want to chart on something like this:
             4/30   5/30   6/30   7/31   8/29       Sept.
    Row 1    20      30      10      25      20    (avg for month) 
    Row 2    5         10      8       15     15    (avg for month)
    etc.
    If so, 1) can you show an example of the data and 2) what kind of chart do you want to create?

  • To get the list of working days-3 to working days+10 of every month

    Hi,
    I am looking for a query,which will give me the list of working days in a column (except Saturday and Sunday)ranging from
    [Working day- 3] to [Working day +10]of each month from (April 2014 ) till 2016 December.Could you please help me in achiving it.
    Note :Working day -3 means ,When the first working day of a month is [ 1st April ,Monday].
    So it has to result as March 27,28 and 29 as my last working days.
    Same logic applies for Working day +10(it needs to give total 10 dates,which excludes Saturday and Sunday)
    Regards,
    Ramesh

    DECLARE @monthDate datetime
    SET @MonthDate = '20140401'
    SELECT [Date]
    FROM
    SELECT [Date],ROW_NUMBER() OVER (PARTITION BY DATEDIFF(mm,0,[Date]) ORDER BY [Date]) AS Seq,
    ROW_NUMBER() OVER (PARTITION BY DATEDIFF(mm,0,[Date]) ORDER BY [Date] DESC) AS BSeq
    FROM dbo.CalendarTable(DATEADD(dd,- 10,@MonthDate),DATEADD(yy,2,@MonthDate),1,0)
    )t
    WHERE (Seq BETWEEN 2 AND 11 AND [DATE] > @MonthDate)
    OR BSeq BETWEEN 1 AND 3
    ORDER BY [Date]
    CalendarTable can be found here
    http://visakhm.blogspot.in/2010/02/generating-calendar-table.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Schedule - 3rd working day of month

    How to set up a schedule that will execute on 3rd (or fourth) working day of every month?

    Hi
    The schedule expression is something like below, but OWB can't express that - you can express execute a weekday every 4/5 weeks for example. Or you can execute on the 3/4 day (no working day specification in OWB) of each month.
    I think this is what you really want though... (this is the schedule expression for Oracle database scheduler);
    FREQ=MONTHLY; BYDAY=MON,TUE,WED,THU,FRI; BYSETPOS=3
    Cheers
    David

  • Absence Quota to be generated on basis of Working Day

    Hi Experts,
    I have got a scenario in Time management ( negative time management, no time evaluation) where the client wants absence quota to be generated on the basis of working days of employee. I have checked the configuration for creating base entitlement V_t559E but the following options are available:
    Currently i have done the cofiguration on the basis of Accrual period, leave entitlement is 22 days in a year. Wherein entilement each month is coming to 1.83 leaves, but client wants that in case employee is come for only 5 working days in a month the leave generation should accordingly get prorated and in case of 0 working days in a month there should be no entitlement.
    Calendar year
    Accrual period
    Time evalution period
    Payroll period
    Other period
    Please help.
    Regard,
    Jyoti

    Firstly Update the Period Parameters as per ur dates this has to be done manually T549Q
    later generate the Pay Roll Periods useing this Period Paramter
    and Change the evaluation Period parameter  in T559L to the Period paratmeter  which you have generated
    a lot of threads has been raised on the same issue please check

  • Payment terms based on working days

    Dear colleagues
    I would like to base payment terms on, for example, the last working day of the month, or the last working day of the trimester instead of working with fixed days.
    Would someone know if this is possible and if so, how can that be arranged?
    Thanks and regards,
    Marlies

    Dear,
    as far as I know, this is not possible into the SAP Standard System.
    I'm sorry about it.
    Mauri

  • NO of days in a month excluding weekdays

    hi all
    which is the easiest way to find out the no working days in a month excluding the weekdays in amonth
    i used while loop to get the count of weekdays in a month
    while condition
    day(date)='sun'
    i:=i+1;
    loop
    is there any other easiest way
    thnks & regards

    Not entirely sure i understand your question, but here's something that should be modifiable enough to fit your needs.
    The 'datez' is just me generating dates for January and February 2008.
    With the query i have asked for the number of days NOT Saturday or Sunday (so working days).
    If you need to account for statutory holidays and the like you will need a static table as the last poster suggested.
    ME_XE?with
      2     datez as
      3  (
      4     select
      5        to_date('01-jan-2008', 'dd-mon-yyyy') + (level - 1) as my_datez
      6     from dual connect by level <= to_date('01-mar-2008', 'dd-mon-yyyy') - to_date('01-jan-2008', 'dd-mon-yyyy')
      7  )
      8  select trunc(my_datez, 'MM'), COUNT(*)
      9  from datez
    10  where to_char(my_datez, 'D') NOT IN (1,7)
    11  group by trunc(my_datez, 'MM')
    12  /
    TRUNC(MY_DATEZ,'MM')                 COUNT(*)
    01-JAN-2008 12 00:00                       23
    01-FEB-2008 12 00:00                       21
    2 rows selected.
    Elapsed: 00:00:00.04Message was edited by:
    Tubby

Maybe you are looking for