Ansicht
Dokumentation

/FRE/DB_TS_GENERATE - module for generating time series

/FRE/DB_TS_GENERATE - module for generating time series

Addresses (Business Address Services)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module generates time series and additional information concerning time series.

A time series is a range of successive periods defined by imported start and end limiters. Those limiters can be days, weeks or months. For periodicity, days, weeks or months can also be used.

The periods of the time series will be written to an internal table.

  • For daily time series, an internal table with three formats is exported:
  • Date in date type dats, for example "20020501",

  • Date as character(10), for example "01.05.2002",

  • Date as character(13) with day name, for example "WE 01.05.2002".

  • For weekly time series, an internal table with two formats is exported:
  • Week in type ACCP, for example "200223",

  • Week as character(10), for example "CW 23.2002".

  • For monthly time series, an internal table with three formats is exported:
  • Month in type ACCP, for example "200205"

  • Month as character(9), for example "M 05.2002"

  • Month as character(6), for example "MAY 2002"

The function module can be used with two different parameter combinations (but can be combined with additional parameters):

  • Creating a time series from the imported start period to the imported end period
The time stream is divided into the required target periodicity. As start and end limiters dates, weeks or months can be imported. As target periodicity, days (= D), weeks (= W) or months (= M) can be required. When the time series is to be divided into days, the day type must be specified as well:
  • 1 = Calendar days

  • 2 = Weekdays

  • 3 = Workdays

To generate a time series for a target periodicity, any period type (date, week or month) can be imported as a limiter, but the imported start and end limiter must be of the same type. For example, to generate a daily time series (i_target_periodicity = D), the following import parameters are allowed:
  • i_start_date / i_end_date

  • i_start_week / i_end_week

  • i_start_month / i_end_month

  • Creating a time series via imported start date and an imported border period
Border periods may be weeks or months. The system calculates the appropriate border from the start date and then splits it into the target periodicity (days, weeks or months). The allowed target periodicity depends on the border period:
border period   target periodicity
Week   Calendar days
  Weekdays
  Workdays
Month   Calendar days
  Weekdays
  Workdays
  Weeks

Te following table shows the allowed combinations:

  I_TARGET_PERIODICITY I_DAY_TYPE I_FACTORY_CALENDAR I_CALC_PERIOD_DATA I_INCL_BORDER_PERIOD_START/END
I_START_DATE I_END_DATE
start date end date D = days 1, 2 or 3 1: not necessary; 2 or 3: necessary - -
start date end date W = weeks - - optional optional (related to target periodicity)
start date end date M = months - - optional -
I_START_WEEK I_END_WEEK
start week end week D = days 1, 2 or 3 1: not necessary; 2 or 3:necessary - -
start week end week W = weeks - - optional -
start week end week M = months - - optional optional (related to target periodicity)
I_START_MONTH I_END_MONTH
start month end month D = days 1, 2 or 3 1: not necessary; 2 or 3: necessary - -
start month end month W = weeks - - optional optional (related totarget periodicity)
start month end month M = months - - optional -
I_START_DATE I_BORDER_INTERVAL
start date W = week D = days 1, 2 or 3 1: not necessary; 2 or 3: necessary -
start date M = month D = days 1, 2 or 3 1: not necessary; 2 or 3: necessary - -
start date M = month W = weeks 1, 2 or 3; 1: not necessary; 2 or 3: necessary optional optional (related to target periodicity)

The possible day types are

  • 1 = Calendar days
  • 2 = Weekdays
  • 3 = Workdays

The parameter I_CALC_PERIOD_DATAcan only be set in combination with an imported factory calendar.

The import of the factory calendar is always necessary for day types 2 and 3, or when additional period data is required.

For the combinations, the day type is necessary in order to decide whether a week is to be included or not:

  • Start date, border interval = M, target periodicity = W
  • Start month, end month, target periodicity = W

Example

Notes

Further information





Parameters

ET_PERIOD_DATA
ET_TS_DAILY
ET_TS_MONTHLY
ET_TS_WEEKLY
I_BORDER_INTERVAL
I_CALC_PERIOD_DATA
I_DAY_TYPE
I_END_DATE
I_END_MONTH
I_END_WEEK
I_INCL_BORDER_PERIOD_END
I_INCL_BORDER_PERIOD_START
I_NUM_FUTURE_PERIODS
I_NUM_PAST_PERIODS
I_PLANNING_CALENDAR
I_START_DATE
I_START_MONTH
I_START_WEEK
I_TARGET_PERIODICITY
I_TZONE

Exceptions

/FRE/CX_DB
/FRE/CX_DB_CALENDAR_NOT_FOUND
/FRE/CX_DB_TS_CALL_MODULE
/FRE/CX_DB_TS_INTERNAL_ERROR
/FRE/CX_DB_TS_WRONG_PARAM
CX_STATIC_CHECK

Function Group

/SAPLDB_TS

CL_GUI_FRONTEND_SERVICES - Frontend Services   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 11470 Date: 20240424 Time: 061209     sap01-206 ( 85 ms )