How to Find First Date and End Date of Period in ABAP/4

If you know year, month and fiscal year variant and you want to know the first date and end date of that period, you can apply function module "PERIOD_DAY_DETERMINE" in ABAP/4 to get them.

Example


CALL FUNCTION ’PERIOD_DAY_DETERMINE’
EXPORTING
I_GJAHR = ’2006’ "Year
I_MONAT = ’01’ "Month
I_PERIV = ’F2’ "Fiscal Year Variant

IMPORTING
E_FDAY = FIRST_DATE
E_LDAY = END_DATE
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_VERSION = 2
FIRSTDAY_NOT_DEFINED = 3
PERIOD_NOT_DEFINED = 4
OTHERS = 5.

Post new comment