10-17-2007 8:28 AM
Hi All,
For my requirement I am using FM 'PYXX_READ_LAST_CRT'. See below:
CALL FUNCTION 'PYXX_READ_LAST_CRT'
EXPORTING
molga = '10' " 'US'
pernr = pernr
year = ???
TABLES
last_crt = it_crt
I need to retrieve the data for a Fiscal year based on the begda & endda entered in the Data Selection Period. What value should I pass to the parameter YEAR above and how?
Thanks in advance.
Satish
10-17-2007 8:34 AM
Hi
To get the current fiscal year and period:
data: gjahr LIKE t009b-bdatj,
per LIKE t009b-poper.
CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = sy-datum
i_periv = 'UT'
IMPORTING
e_buper = per
e_gjahr = gjahr
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
10-17-2007 8:58 AM
Hi Satish
Use the FM:
CALL FUNCTION <b>'DATE_TO_PERIOD_CONVERT'</b>
Regards,
Sree