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

Fisical year

Former Member
0 Likes
841

By using GM_GET_FISCAL_YEAR

i can Fisical years but while i am using this in Program

Its not giving output.

1)

DATA:G_BUDAT LIKE SY-DATUM,

I_FYV TYPE PERIV,

F_BUDAT(4),

CALL FUNCTION 'GM_GET_FISCAL_YEAR'

EXPORTING

I_DATE = G_BUDAT

I_FYV = 'V3'

IMPORTING

E_FY = F_BUDAT

EXCEPTIONS

FISCAL_YEAR_DOES_NOT_EXIST = 1

NOT_DEFINED_FOR_DATE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IN F_BUDAT NO VALUE IS COMING

IF i give GM_GET_FISCAL_YEAR in se37 transaction its giving fiscial year in output.

2)

for january month its not giving fisical year (output) in se37 also for GM_GET_FISCAL_YEAR.

Pl help me regarding this.

Cheers,

Simha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
748

Hi

Check whether the fiscal variant V3 exists in Table T009 or not?

if it exists the output will come .

reward if useful

regards,

Anji

By using GM_GET_FISCAL_YEAR

i can Fisical years but while i am using this in Program

Its not giving output.

1)

DATA:G_BUDAT LIKE SY-DATUM,

I_FYV TYPE PERIV,

F_BUDAT(4),

CALL FUNCTION 'GM_GET_FISCAL_YEAR'

EXPORTING

I_DATE = G_BUDAT

I_FYV = 'V3'

IMPORTING

E_FY = F_BUDAT

EXCEPTIONS

FISCAL_YEAR_DOES_NOT_EXIST = 1

NOT_DEFINED_FOR_DATE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IN F_BUDAT NO VALUE IS COMING

IF i give GM_GET_FISCAL_YEAR in se37 transaction its giving fiscial year in output.

2)

for january month its not giving fisical year (output) in se37 also for GM_GET_FISCAL_YEAR.

Pl help me regarding this.

Cheers,

Simha

4 REPLIES 4
Read only

Former Member
0 Likes
749

Hi

Check whether the fiscal variant V3 exists in Table T009 or not?

if it exists the output will come .

reward if useful

regards,

Anji

Read only

Former Member
0 Likes
748

Hi..

Just paste this code..

DATA:G_BUDAT LIKE SY-DATUM,

I_FYV TYPE PERIV,

F_BUDAT(4).

<b>G_BUDAT = SY-DATUM.</b>

CALL FUNCTION 'GM_GET_FISCAL_YEAR'

EXPORTING

I_DATE = G_BUDAT

I_FYV = 'V3'

IMPORTING

E_FY = F_BUDAT

EXCEPTIONS

FISCAL_YEAR_DOES_NOT_EXIST = 1

NOT_DEFINED_FOR_DATE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

<b>write f_budat.</b>

Read only

0 Likes
748

if i give sy-datum it will come but i need to get that date from table.

i cant give that sy-datum for that field.

pl help me

regards,

Simha.

Read only

Former Member
0 Likes
748
chk this

DATA:G_BUDAT LIKE SY-DATUM,
I_FYV TYPE PERIV,
F_BUDAT(4),

G_BUDAT = SY-DATUM.

CALL FUNCTION 'GM_GET_FISCAL_YEAR'
EXPORTING
I_DATE = G_BUDAT
I_FYV = 'V3'
IMPORTING
E_FY = F_BUDAT
EXCEPTIONS
FISCAL_YEAR_DOES_NOT_EXIST = 1
NOT_DEFINED_FOR_DATE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.