2009 Jan 19 8:01 AM
Hey Experts,
I am trying to create Bonus report in HR. As there is an unavailabilty of fiscal year field i am creating it through ranges. i am using the function module PERIOD_DAY_DETERMINE
Move : fyear to d_gjahr,
'12' to d_monat,
'V3' to d_periv.
CALL FUNCTION 'PERIOD_DAY_DETERMINE'
EXPORTING
I_GJAHR = d_gjahr
I_MONAT = d_monat
I_PERIV = d_periv
IMPORTING
E_FDAY = d_fday
E_LDAY = d_lday
E_SPERIOD = d_SPERIOD
EXCEPTIONS
ERROR_PERIOD = 1
ERROR_PERIOD_VERSION = 2
FIRSTDAY_NOT_DEFINED = 3
PERIOD_NOT_DEFINED = 4
YEAR_INVALID = 5
OTHERS = 6
.
What is happening in this function module is d_monat if given as 2, the date range is coming up only for the month of may. I. E the output for the above function module is
d_fday = 01.03.2009
d_lday = 31.03.2009 ( if the input parameter is given as 2008).
i want that if 2008 is given the date range should be fiscal year date range.
Regards,
G. Shankar
dear,
it is not clear by your statement that what you want.
you told that u dont have fiscal year but you are putting in fiscal year field.
well if u want date range of that month of fiscal year then you are using right fm module.
but don hard code month, month should be come as variable
if if u will put
fy 2008
month 2
periv v3
then date will b
01.05.2008
31.05.2008
regards
vijay dwivedi
2009 Jan 19 9:22 AM
dear,
it is not clear by your statement that what you want.
you told that u dont have fiscal year but you are putting in fiscal year field.
well if u want date range of that month of fiscal year then you are using right fm module.
but don hard code month, month should be come as variable
if if u will put
fy 2008
month 2
periv v3
then date will b
01.05.2008
31.05.2008
regards
vijay dwivedi
2009 Jan 19 9:36 AM
Hi Shankar,
U can use FM:- GET_CURRENT_YEAR
Eg:-
CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING
BUKRS = L_COMPANY_CODE
DATE = SY-DATUM
IMPORTING
CURRY = BLOCK_END
PREVY = BLOCK_BEGIN.
2009 Jan 19 10:51 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |