Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function modules

Former Member
0 Likes
1,159

Hi,

Please tell me regarding these function modules:

FIRST_DAY_IN_PERIOD_GET

LAST_DAY_IN_PERIOD_GET

what are they used for and what terms or these terminologies

mean?

7 REPLIES 7
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,085

did you read the documentations of these FMs in SE37? Everything is clearly written down there...

Read only

0 Likes
1,085

Unfortunatly its documentation is not available over there ;-).

Both Fm is to determine the day in perticuler Fiscal period.one is for determine first day and other is for determine last day for fiscal yr.

Amit.

Read only

Former Member
0 Likes
1,085

Hi Poonam,

To convert fiscal year and period to the calendar date of the first day of the period,use function module FIRST_DAY_IN_PERIOD_GET.

To convert fiscal year and period to the calendar date of the last day of the period,use function module LAST_DAY_IN_PERIOD_GET.

If any further information require revert back... i would help my best.

Regards

Narin Nandivada.

Read only

0 Likes
1,085

hey thanks for the brief description.

i am not vey clear in fiscal year and periods.

can u tell me converting fical year and period to 1st day of period mean????

Read only

Former Member
0 Likes
1,085

Hi Poonam.

FIRST_DAY_IN_PERIOD_GET - Gets first day of a period.

LAST_DAY_IN_PERIOD_GET - Gets last day of a period.

Both Relates with getting the dates in terms of fiscal year.

Mandatory Fields:

I_GJAHR - Fiscal Year.

I_MONMIT - Midmonth for half periods - Not mandatory.

I_PERIV - Period version.

I_POPER - Fiscal Period.

Same fields for both.

Real time scenario:

Sometimes the requirements can be based on some user exits.

For example: Requirement of days in terms of fiscal period, that is not calender period.

We can consider this case when Calender period and fiscal periods are the same.

Reward points if usefull.

REGARDS

Harsh

Read only

Former Member
0 Likes
1,085

hi check this example i had ...

this is to get the first and last dates of the periods....

REPORT ZVISH_STAN_PERIOD.

data: V_PERIOD LIKE T009B-POPER,

V_GJAHR1 LIKE T009B-BDATJ,

V_DATFRM LIKE SY-DATUM,

V_DATTO LIKE SY-DATUM .

parameter: p_date like sy-datum.

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

EXPORTING

I_DATE = P_DATE

I_PERIV = '08'

IMPORTING

E_BUPER = V_PERIOD

E_GJAHR = V_GJAHR1.

DO 3 TIMES.

clear: V_DATFRM, V_DATTO.

CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'

EXPORTING

I_GJAHR = V_GJAHR1

I_PERIV = '08'

I_POPER = V_PERIOD

IMPORTING

E_DATE = V_DATFRM.

CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'

EXPORTING

I_GJAHR = V_GJAHR1

I_PERIV = '08'

I_POPER = V_PERIOD

IMPORTING

E_DATE = V_DATTO.

write: V_DATFRM, V_DATTO.

IF V_PERIOD = '001'.

V_PERIOD = '12'.

V_GJAHR1 = V_GJAHR1 - 1. "D10K951022

ELSE.

V_PERIOD = V_PERIOD - 1.

ENDIF.

ENDDO.

Read only

Former Member
0 Likes
1,085

Hi Poonam.

A fiscal period corresponds to a period of no more than twelve months, at the end of which a business closes its books and prepares its financial statements. As a rule, the fiscal period ends on December 31.

But , again based on the requirment of business a client may reduce a work span to any period less than 12 month.

whatever does it may be ,

function module FIRST_DAY_IN_PERIOD_GET gives the 1st day and function module LAST_DAY_IN_PERIOD_GET gives the last day of very fiscal period.

Reward if found helpful.

Anirban Bhattacharjee