Application Development 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: 

Parameter YEAR value???

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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.

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi Satish

Use the FM:

CALL FUNCTION <b>'DATE_TO_PERIOD_CONVERT'</b>

Regards,

Sree