Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Fiscal Year - Help needed

Hello Experts,

I am in ECC 6.0. My Company has a 4-4-5 calender. In my selection screen, I have to default the current and previous fiscal year. For that I have called the below function module. Everything is good. But when I do a extended code check it says

"Current ABAP Command is Obselete. An explicit work area is necessary in the 00 context. use "append wa to s_gjahr [sorted by]"

Can anyone suggest me how to write the code so that my error will be solved.

FORM set_default_fiscal_year.

DATA: lv_poper TYPE poper, "Fiscal Period

lv_gjahr TYPE gjahr. "Fiscal Year

*Get current fiscal year



i_date = sy-datum

i_periv = gc_fiscal_variant


e_buper = lv_poper

e_gjahr = lv_gjahr


input_false = 1

t009_notfound = 2

t009b_notfound = 3


CHECK sy-subrc = 0.

*Get previous fiscal year

s_gjahr-low = lv_gjahr - 1.

s_gjahr-high = lv_gjahr.

s_gjahr-sign = 'I'.

s_gjahr-option = 'BT'.

APPEND s_gjahr.


Former Member

While using select single you need to use full key in the where clause

Here in CSKT you missed in the primary key field DATBI and in CSKU you missed field KTOPL

and the messages from SLIN is are warning and not errors

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question