Hierarchy
⤷
⤷
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 | Constant | Private | Type reference (TYPE) | D | '99991231' | 20091006 | |||
| 2 | Constant | Private | Type reference (TYPE) | D | '18000101' | 20091006 | |||
| 3 | Instance attribute | Private | Object reference (TYPE REF TO) | CL_SAWE_PERIOD_TOOL | Wrapper for Badi bs_period_toolset_context | 20091020 | |||
| 4 | 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 | Instance method | Private | Method | Adjust month | 20091006 | |
| 2 | Instance method | Public | Method | Calculate Date in Interval | 20091010 | |
| 3 | Instance method | Public | Method | Calculates the number of days between two dates | 20091014 | |
| 4 | Instance method | Public | Method | Calculate Month in Interval | 20091013 | |
| 5 | Instance method | Public | Method | Calculate Week in Interval | 20091012 | |
| 6 | Instance method | Private | Constructor | CONSTRUCTOR | 20091020 | |
| 7 | Instance method | Public | Method | Get Dates by passing the days count | 20090923 | |
| 8 | Instance method | Public | Method | Get Dates within a range of dates | 20090923 | |
| 9 | Instance method | Public | Method | Returns first/last day of a Kmoth | 20091015 | |
| 10 | Instance method | Public | Method | Returns first/last day for a given KWeek | 20091015 | |
| 11 | Instance method | Public | Method | Returns first day of a Kmoth | 20091015 | |
| 12 | Instance method | Public | Method | Returns first day for a given KWeek | 20091015 | |
| 13 | Instance method | Public | Method | Returns first KMonth for a given KWeek | 20091015 | |
| 14 | Instance method | Public | Method | Returns first KWeek of a Kmonth | 20091015 | |
| 15 | Static method | Public | Method | Get Instance | 20091015 | |
| 16 | Instance method | Public | Method | Returns last day of a Kmoth | 20091015 | |
| 17 | Instance method | Public | Method | Returns last day for a given KWeek | 20091015 | |
| 18 | Instance method | Public | Method | Returns first KMonth for a given KWeek | 20091015 | |
| 19 | Instance method | Public | Method | Returns last KWeek of a Kmonth | 20091015 | |
| 20 | Instance method | Public | Method | Get Months by taking the month count and the begin month | 20091012 | |
| 21 | Instance method | Public | Method | Get the Month name | 20100125 | |
| 22 | Instance method | Public | Method | Returns KMonth for a given day | 20091015 | |
| 23 | Instance method | Public | Method | Returns first/last KMonth for a given KWeek | 20091015 | |
| 24 | Instance method | Public | Method | Get Weeks by taking the week count and the begin week | 20090925 | |
| 25 | Instance method | Public | Method | Get Weeks by taking the week count and the begin date | 20091012 | |
| 26 | Instance method | Public | Method | Returns KMonth for a given day | 20091015 | |
| 27 | Instance method | Public | Method | Returns KMonth for a given day | 20091015 | |
| 28 | Instance method | Public | Method | Gets First day of the month | 20091007 | |
| 29 | Instance method | Public | Method | Gets the last day of the month | 20091014 | |
| 30 | Instance method | Public | Method | Splits the Date | 20090923 | |
| 31 | 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 | CV_MON | Call by reference | Type reference (TYPE) | P | Month | 20091006 | |||
| 2 | CV_ROUND | Call by reference | Type reference (TYPE) | P | Round | 20091006 | |||
| 3 | CV_YRS | Call by reference | Type reference (TYPE) | P | Years | 20091006 | |||
| 4 | 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 | EV_CALCULATED_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | Calculated Date | 20091010 | |||
| 2 | IV_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | Date | 20091010 | |||
| 3 | IV_DAYS | Call by reference | Type reference (TYPE) | SAWE_PERIOD | Day | 20091010 | |||
| 4 | IV_MONTHS | Call by reference | Type reference (TYPE) | SAWE_PERIOD | Month | 20091010 | |||
| 5 | IV_SIGNUM | Call by reference | Type reference (TYPE) | CHAR1 | '+' | Sign | 20091010 | ||
| 6 | 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 | EV_NUMBER_OF_DAYS | Call by reference | Type reference (TYPE) | SAWE_PERIOD | Period | 20091014 | |||
| 2 | IV_DATE_FROM | Call by reference | Type reference (TYPE) | DATUM | Date | 20091014 | |||
| 3 | IV_DATE_TO | Call by reference | Type reference (TYPE) | DATUM | Date | 20091014 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | 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 | EV_CALCULATED_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Calculated Month | 20091013 | |||
| 2 | IV_BEGIN_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Begin Month | 20091013 | |||
| 3 | IV_MONTHS | Call by reference | Type reference (TYPE) | SAWE_PERIOD | Months | 20091013 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | 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 | EV_CALCULATED_WEEK | Call by reference | Type reference (TYPE) | KWEEK | Calculated Week | 20091012 | |||
| 2 | IV_BEGIN_WEEK | Call by reference | Type reference (TYPE) | KWEEK | Begin Week | 20091012 | |||
| 3 | IV_WEEKS | Call by reference | Type reference (TYPE) | SAWE_PERIOD | Weeks | 20091012 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | 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 | ET_DATES | Call by reference | Type reference (TYPE) | SAWE_T_DATES | Dates | 20090923 | |||
| 2 | IV_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | Date | 20090923 | |||
| 3 | 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 | ET_DATES | Call by reference | Type reference (TYPE) | SAWE_T_DATES | Dates | 20090923 | |||
| 2 | IV_BEGIN_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | Begin Date | 20090923 | |||
| 3 | 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 | EV_FIRST_DAY | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | 20091015 | ||||
| 2 | EV_LAST_DAY | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | 20091015 | ||||
| 3 | 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 | EV_FIRST_DAY | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | Begin Date | 20091015 | |||
| 2 | EV_LAST_DAY | Call by reference | Type reference (TYPE) | SAWE_END_DATE | End Date | 20091015 | |||
| 3 | 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 | IV_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Factory calendar: Month | 20091015 | |||
| 2 | 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 | IV_WEEK | Call by reference | Type reference (TYPE) | KWEEK | 20091015 | ||||
| 2 | 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 | IV_WEEK | Call by reference | Type reference (TYPE) | KWEEK | 20091015 | ||||
| 2 | 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 | IV_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Factory calendar: Month | 20091015 | |||
| 2 | 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 | 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 | IV_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Factory calendar: Month | 20091015 | |||
| 2 | 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 | IV_WEEK | Call by reference | Type reference (TYPE) | KWEEK | 20091015 | ||||
| 2 | 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 | IV_WEEK | Call by reference | Type reference (TYPE) | KWEEK | 20091015 | ||||
| 2 | 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 | IV_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Factory calendar: Month | 20091015 | |||
| 2 | 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 | ET_MONTHS | Call by reference | Type reference (TYPE) | SAWE_T_MONTHS | Month Details | 20091012 | |||
| 2 | IV_BEGIN_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Factory calendar: Month | 20091012 | |||
| 3 | IV_MONTHS | Call by reference | Type reference (TYPE) | SAWE_PERIOD | Months | 20091012 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | Invalid Input Month | 20091012 |
Method GET_MONTH_NAME Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | EV_LTEXT | Call by reference | Type reference (TYPE) | T247-LTX | Name of the month - Long text | 20100125 | |||
| 2 | EV_STEXT | Call by reference | Type reference (TYPE) | T247-KTX | Name of the month - Short text | 20100125 | |||
| 3 | IV_DATE | Call by reference | Type reference (TYPE) | SYDATUM | Current Date of Application Server | 20100125 | |||
| 4 | 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 | IV_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | 20091015 | ||||
| 2 | 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 | EV_FIRST_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Months | 20091015 | |||
| 2 | EV_LAST_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Factory calendar: Month | 20091015 | |||
| 3 | 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 | ET_WEEKS | Call by reference | Type reference (TYPE) | SAWE_T_WEEKS | Weeks Details | 20090925 | |||
| 2 | IV_BEGIN_WEEK | Call by reference | Type reference (TYPE) | KWEEK | Factory calendar: Week | 20090925 | |||
| 3 | IV_WEEKS | Call by reference | Type reference (TYPE) | SAWE_PERIOD | Weeks | 20090925 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | 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 | ET_WEEKS | Call by reference | Type reference (TYPE) | SAWE_T_WEEKS | Weeks Details | 20091012 | |||
| 2 | IV_BEGIN_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | Begin Date | 20091012 | |||
| 3 | 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 | IV_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | 20091015 | ||||
| 2 | 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 | EV_FIRST_WEEK | Call by reference | Type reference (TYPE) | KWEEK | Factory calendar: Week | 20091015 | |||
| 2 | EV_LAST_WEEK | Call by reference | Type reference (TYPE) | KWEEK | Factory calendar: Week | 20091015 | |||
| 3 | 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 | EV_DATE | Call by reference | Type reference (TYPE) | SAWE_BEGIN_DATE | Date | 20091007 | |||
| 2 | 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 | EV_END_DATE | Call by reference | Type reference (TYPE) | DATUM | Date | 20091014 | |||
| 2 | IV_MONTH | Call by reference | Type reference (TYPE) | KMONTH | Factory calendar: Month | 20091014 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | No valid date | 20091014 |
Method SPLIT_DATE Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | EV_DAY | Call by reference | Type reference (TYPE) | SAWE_DAY | Day | 20090923 | |||
| 2 | EV_MONTH | Call by reference | Type reference (TYPE) | SAWE_MONTH | Month | 20090923 | |||
| 3 | EV_YEAR | Call by reference | Type reference (TYPE) | SAWE_YEAR | Year | 20090923 | |||
| 4 | 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 | CV_ACT_DATE | Call by reference | Type reference (TYPE) | D | 20091006 | ||||
| 2 | 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 |