SAP ABAP Class CL_SAWE_DATE (Utility Class for Date)
Hierarchy
EA-APPL (Software Component) SAP Enterprise Extension PLM, SCM, Financials
   IS-PRS-LS (Application Component) Lean Staffing
     PSAWE_CO_REUSE (Package) Reuse objects for Structure Package EA-SAWE
Properties
Class CL_SAWE_DATE  
Short Description Utility Class for Date    
Super Class    
Instantiability of a Class 0  Private 
Final    
General Data
Message Class    
Program status     
Category 0   
Package PSAWE_CO_REUSE   Reuse objects for Structure Package EA-SAWE 
Created 20090923   SAP 
Last change 20130531   SAP 
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
Class CL_SAWE_DATE has no forward declaration.
Interfaces
Class CL_SAWE_DATE has no interface implemented.
Friends
Class CL_SAWE_DATE has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 GC_HIGH_DATE Constant Private Type reference (TYPE) D '99991231' 20091006
2 GC_LOW_DATE Constant Private Type reference (TYPE) D '18000101' 20091006
3 MO_BS_PERIOD_TOOLSET Instance attribute Private Object reference (TYPE REF TO) CL_SAWE_PERIOD_TOOL Wrapper for Badi bs_period_toolset_context 20091020
4 MO_INSTANCE Static Attribute Private Object reference (TYPE REF TO) CL_SAWE_DATE Utility Class for Date 20091015
Methods
# Method Level Visibility Method type Description Created on
1 ADJUST_MONTHS Instance method Private Method Adjust month 20091006
2 CALC_DATE_IN_INTERVAL Instance method Public Method Calculate Date in Interval 20091010
3 CALC_DAYS_BETW_DATES Instance method Public Method Calculates the number of days between two dates 20091014
4 CALC_MONTH_IN_INTERVAL Instance method Public Method Calculate Month in Interval 20091013
5 CALC_WEEK_IN_INTERVAL Instance method Public Method Calculate Week in Interval 20091012
6 CONSTRUCTOR Instance method Private Constructor CONSTRUCTOR 20091020
7 GET_DATES Instance method Public Method Get Dates by passing the days count 20090923
8 GET_DATES_FOR_DATE_RANGE Instance method Public Method Get Dates within a range of dates 20090923
9 GET_DAY_OF_A_MONTH Instance method Public Method Returns first/last day of a Kmoth 20091015
10 GET_DAY_OF_A_WEEK Instance method Public Method Returns first/last day for a given KWeek 20091015
11 GET_FIRST_DAY_OF_A_MONTH Instance method Public Method Returns first day of a Kmoth 20091015
12 GET_FIRST_DAY_OF_A_WEEK Instance method Public Method Returns first day for a given KWeek 20091015
13 GET_FIRST_MONTH_OF_A_WEEK Instance method Public Method Returns first KMonth for a given KWeek 20091015
14 GET_FIRST_WEEK_OF_A_MONTH Instance method Public Method Returns first KWeek of a Kmonth 20091015
15 GET_INSTANCE Static method Public Method Get Instance 20091015
16 GET_LAST_DAY_OF_A_MONTH Instance method Public Method Returns last day of a Kmoth 20091015
17 GET_LAST_DAY_OF_A_WEEK Instance method Public Method Returns last day for a given KWeek 20091015
18 GET_LAST_MONTH_OF_A_WEEK Instance method Public Method Returns first KMonth for a given KWeek 20091015
19 GET_LAST_WEEK_OF_A_MONTH Instance method Public Method Returns last KWeek of a Kmonth 20091015
20 GET_MONTHS Instance method Public Method Get Months by taking the month count and the begin month 20091012
21 GET_MONTH_NAME Instance method Public Method Get the Month name 20100125
22 GET_MONTH_OF_A_DAY Instance method Public Method Returns KMonth for a given day 20091015
23 GET_MONTH_OF_A_WEEK Instance method Public Method Returns first/last KMonth for a given KWeek 20091015
24 GET_WEEKS Instance method Public Method Get Weeks by taking the week count and the begin week 20090925
25 GET_WEEKS_FROM_DATE Instance method Public Method Get Weeks by taking the week count and the begin date 20091012
26 GET_WEEK_OF_A_DAY Instance method Public Method Returns KMonth for a given day 20091015
27 GET_WEEK_OF_A_MONTH Instance method Public Method Returns KMonth for a given day 20091015
28 MONTH_GET_FIRST_DAY Instance method Public Method Gets First day of the month 20091007
29 MONTH_GET_LAST_DAY Instance method Public Method Gets the last day of the month 20091014
30 SPLIT_DATE Instance method Public Method Splits the Date 20090923
31 VALID_DATE Instance method Private Method Valid Date 20091006
Events
Class CL_SAWE_DATE has no event.
Types
Class CL_SAWE_DATE has no local type.
Method Signatures

Method ADJUST_MONTHS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing CV_MON Call by reference Type reference (TYPE) P Month 20091006
2 Changing CV_ROUND Call by reference Type reference (TYPE) P Round 20091006
3 Changing CV_YRS Call by reference Type reference (TYPE) P Years 20091006
4 Importing IV_ACT_MONTH Call by reference Type reference (TYPE) NUM02 ABAB Dictionary: Two-Digit Numeric Field 20091006

Method ADJUST_MONTHS on class CL_SAWE_DATE has no exception.

Method CALC_DATE_IN_INTERVAL Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_CALCULATED_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE Calculated Date 20091010
2 Importing IV_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE Date 20091010
3 Importing IV_DAYS Call by reference Type reference (TYPE) SAWE_PERIOD Day 20091010
4 Importing IV_MONTHS Call by reference Type reference (TYPE) SAWE_PERIOD Month 20091010
5 Importing IV_SIGNUM Call by reference Type reference (TYPE) CHAR1 '+' Sign 20091010
6 Importing IV_YEARS Call by reference Type reference (TYPE) SAWE_PERIOD Year (two digits) 20091010

Method CALC_DATE_IN_INTERVAL on class CL_SAWE_DATE has no exception.

Method CALC_DAYS_BETW_DATES Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_NUMBER_OF_DAYS Call by reference Type reference (TYPE) SAWE_PERIOD Period 20091014
2 Importing IV_DATE_FROM Call by reference Type reference (TYPE) DATUM Date 20091014
3 Importing IV_DATE_TO Call by reference Type reference (TYPE) DATUM Date 20091014
# Exception Resumable Description Created on
1 NO_VALID_PERIOD No valid period for calculation 20091029

Method CALC_MONTH_IN_INTERVAL Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_CALCULATED_MONTH Call by reference Type reference (TYPE) KMONTH Calculated Month 20091013
2 Importing IV_BEGIN_MONTH Call by reference Type reference (TYPE) KMONTH Begin Month 20091013
3 Importing IV_MONTHS Call by reference Type reference (TYPE) SAWE_PERIOD Months 20091013
# Exception Resumable Description Created on
1 INVALID_INPUT_MONTH Invalid Input Month 20091013

Method CALC_WEEK_IN_INTERVAL Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_CALCULATED_WEEK Call by reference Type reference (TYPE) KWEEK Calculated Week 20091012
2 Importing IV_BEGIN_WEEK Call by reference Type reference (TYPE) KWEEK Begin Week 20091012
3 Importing IV_WEEKS Call by reference Type reference (TYPE) SAWE_PERIOD Weeks 20091012
# Exception Resumable Description Created on
1 INVALID_INPUT_WEEK Invalid Input week 20091013

Method CONSTRUCTOR Signature

Method CONSTRUCTOR on class CL_SAWE_DATE has no parameter.
Method CONSTRUCTOR on class CL_SAWE_DATE has no exception.

Method GET_DATES Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_DATES Call by reference Type reference (TYPE) SAWE_T_DATES Dates 20090923
2 Importing IV_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE Date 20090923
3 Importing IV_DAYS Call by reference Type reference (TYPE) SAWE_PERIOD 001 Period in Days 20090923

Method GET_DATES on class CL_SAWE_DATE has no exception.

Method GET_DATES_FOR_DATE_RANGE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_DATES Call by reference Type reference (TYPE) SAWE_T_DATES Dates 20090923
2 Importing IV_BEGIN_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE Begin Date 20090923
3 Importing IV_END_DATE Call by reference Type reference (TYPE) SAWE_END_DATE End Date 20090923

Method GET_DATES_FOR_DATE_RANGE on class CL_SAWE_DATE has no exception.

Method GET_DAY_OF_A_MONTH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_FIRST_DAY Call by reference Type reference (TYPE) SAWE_BEGIN_DATE 20091015
2 Exporting EV_LAST_DAY Call by reference Type reference (TYPE) SAWE_BEGIN_DATE 20091015
3 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091015

Method GET_DAY_OF_A_MONTH on class CL_SAWE_DATE has no exception.

Method GET_DAY_OF_A_WEEK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_FIRST_DAY Call by reference Type reference (TYPE) SAWE_BEGIN_DATE Begin Date 20091015
2 Exporting EV_LAST_DAY Call by reference Type reference (TYPE) SAWE_END_DATE End Date 20091015
3 Importing IV_WEEK Call by reference Type reference (TYPE) KWEEK 20091015

Method GET_DAY_OF_A_WEEK on class CL_SAWE_DATE has no exception.

Method GET_FIRST_DAY_OF_A_MONTH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091015
2 Returning RV_FIRST_DAY Value transfer Type reference (TYPE) SAWE_BEGIN_DATE 20091015

Method GET_FIRST_DAY_OF_A_MONTH on class CL_SAWE_DATE has no exception.

Method GET_FIRST_DAY_OF_A_WEEK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_WEEK Call by reference Type reference (TYPE) KWEEK 20091015
2 Returning RV_FIRST_DAY Value transfer Type reference (TYPE) SAWE_BEGIN_DATE Begin Date 20091015

Method GET_FIRST_DAY_OF_A_WEEK on class CL_SAWE_DATE has no exception.

Method GET_FIRST_MONTH_OF_A_WEEK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_WEEK Call by reference Type reference (TYPE) KWEEK 20091015
2 Returning RV_MONTH Value transfer Type reference (TYPE) KMONTH Months 20091015

Method GET_FIRST_MONTH_OF_A_WEEK on class CL_SAWE_DATE has no exception.

Method GET_FIRST_WEEK_OF_A_MONTH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091015
2 Returning RV_FIRST_WEEK Value transfer Type reference (TYPE) KWEEK Factory calendar: Week 20091015

Method GET_FIRST_WEEK_OF_A_MONTH on class CL_SAWE_DATE has no exception.

Method GET_INSTANCE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning RO_INSTANCE Value transfer Object reference (TYPE REF TO) CL_SAWE_DATE Utility Class for Date 20091015

Method GET_INSTANCE on class CL_SAWE_DATE has no exception.

Method GET_LAST_DAY_OF_A_MONTH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091015
2 Returning RV_LAST_DAY Value transfer Type reference (TYPE) SAWE_END_DATE End Date 20091015

Method GET_LAST_DAY_OF_A_MONTH on class CL_SAWE_DATE has no exception.

Method GET_LAST_DAY_OF_A_WEEK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_WEEK Call by reference Type reference (TYPE) KWEEK 20091015
2 Returning RV_LAST_DAY Value transfer Type reference (TYPE) SAWE_END_DATE End Date 20091015

Method GET_LAST_DAY_OF_A_WEEK on class CL_SAWE_DATE has no exception.

Method GET_LAST_MONTH_OF_A_WEEK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_WEEK Call by reference Type reference (TYPE) KWEEK 20091015
2 Returning RV_MONTH Value transfer Type reference (TYPE) KMONTH Months 20091015

Method GET_LAST_MONTH_OF_A_WEEK on class CL_SAWE_DATE has no exception.

Method GET_LAST_WEEK_OF_A_MONTH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091015
2 Returning RV_LAST_WEEK Value transfer Type reference (TYPE) KWEEK Factory calendar: Week 20091015

Method GET_LAST_WEEK_OF_A_MONTH on class CL_SAWE_DATE has no exception.

Method GET_MONTHS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_MONTHS Call by reference Type reference (TYPE) SAWE_T_MONTHS Month Details 20091012
2 Importing IV_BEGIN_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091012
3 Importing IV_MONTHS Call by reference Type reference (TYPE) SAWE_PERIOD Months 20091012
# Exception Resumable Description Created on
1 INVALID_INPUT_MONTH Invalid Input Month 20091012

Method GET_MONTH_NAME Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_LTEXT Call by reference Type reference (TYPE) T247-LTX Name of the month - Long text 20100125
2 Exporting EV_STEXT Call by reference Type reference (TYPE) T247-KTX Name of the month - Short text 20100125
3 Importing IV_DATE Call by reference Type reference (TYPE) SYDATUM Current Date of Application Server 20100125
4 Importing IV_KMONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20100125

Method GET_MONTH_NAME on class CL_SAWE_DATE has no exception.

Method GET_MONTH_OF_A_DAY Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE 20091015
2 Returning RV_MONTH Value transfer Type reference (TYPE) KMONTH Months 20091015

Method GET_MONTH_OF_A_DAY on class CL_SAWE_DATE has no exception.

Method GET_MONTH_OF_A_WEEK Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_FIRST_MONTH Call by reference Type reference (TYPE) KMONTH Months 20091015
2 Exporting EV_LAST_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091015
3 Importing IV_WEEK Call by reference Type reference (TYPE) KWEEK 20091015

Method GET_MONTH_OF_A_WEEK on class CL_SAWE_DATE has no exception.

Method GET_WEEKS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_WEEKS Call by reference Type reference (TYPE) SAWE_T_WEEKS Weeks Details 20090925
2 Importing IV_BEGIN_WEEK Call by reference Type reference (TYPE) KWEEK Factory calendar: Week 20090925
3 Importing IV_WEEKS Call by reference Type reference (TYPE) SAWE_PERIOD Weeks 20090925
# Exception Resumable Description Created on
1 INVALID_INPUT_WEEK Invalid Input Week 20091012

Method GET_WEEKS_FROM_DATE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ET_WEEKS Call by reference Type reference (TYPE) SAWE_T_WEEKS Weeks Details 20091012
2 Importing IV_BEGIN_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE Begin Date 20091012
3 Importing IV_WEEKS Call by reference Type reference (TYPE) SAWE_PERIOD Weeks 20091012

Method GET_WEEKS_FROM_DATE on class CL_SAWE_DATE has no exception.

Method GET_WEEK_OF_A_DAY Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE 20091015
2 Returning RV_WEEK Value transfer Type reference (TYPE) KWEEK Factory calendar: Week 20091015

Method GET_WEEK_OF_A_DAY on class CL_SAWE_DATE has no exception.

Method GET_WEEK_OF_A_MONTH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_FIRST_WEEK Call by reference Type reference (TYPE) KWEEK Factory calendar: Week 20091015
2 Exporting EV_LAST_WEEK Call by reference Type reference (TYPE) KWEEK Factory calendar: Week 20091015
3 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091015

Method GET_WEEK_OF_A_MONTH on class CL_SAWE_DATE has no exception.

Method MONTH_GET_FIRST_DAY Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_DATE Call by reference Type reference (TYPE) SAWE_BEGIN_DATE Date 20091007
2 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091007

Method MONTH_GET_FIRST_DAY on class CL_SAWE_DATE has no exception.

Method MONTH_GET_LAST_DAY Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_END_DATE Call by reference Type reference (TYPE) DATUM Date 20091014
2 Importing IV_MONTH Call by reference Type reference (TYPE) KMONTH Factory calendar: Month 20091014
# Exception Resumable Description Created on
1 DATE_IN_NO_DATE No valid date 20091014

Method SPLIT_DATE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_DAY Call by reference Type reference (TYPE) SAWE_DAY Day 20090923
2 Exporting EV_MONTH Call by reference Type reference (TYPE) SAWE_MONTH Month 20090923
3 Exporting EV_YEAR Call by reference Type reference (TYPE) SAWE_YEAR Year 20090923
4 Importing IV_DATE Call by reference Type reference (TYPE) SYDATUM SY-DATUM Date 20090923

Method SPLIT_DATE on class CL_SAWE_DATE has no exception.

Method VALID_DATE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Changing CV_ACT_DATE Call by reference Type reference (TYPE) D 20091006
2 Importing IV_SIGN Call by reference Type reference (TYPE) C 20091006

Method VALID_DATE on class CL_SAWE_DATE has no exception.
History
Last changed by/on SAP  20130531 
SAP Release Created in 605