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

Calender day

Former Member
0 Likes
627

Hi Gurus,

I am trying to convert calenderday to fiscal day (i.e. day remains the same from calender day, Month and year are populated from function module.

I am getting error message that syst date : 00.00.0000 is not expected.

data:

i_tab(2) type c value 'V3',

i_tab1 like COMM_STRUCTURE-fiscper,

i_tab2 like COMM_STRUCTURE-fiscyear,

i_tab3(2) type c,

i_tab4 like COMM_STRUCTURE-dateto,

i_tab5(2) type c.

CALL FUNCTION 'UMC_CALDAY_TO_FISCPER'

EXPORTING

I_PERIV = i_tab

I_CALDAY = COMM_STRUCTURE-DATEto

IMPORTING

E_FISCPER = i_tab1.

break-point.

i_tab4 = COMM_STRUCTURE-dateto.

i_tab5 = i_tab4+6(2).

i_tab2 = i_tab1+0(4).

i_tab3 = i_tab1+5(2).

if i_tab5 >= 29.

i_tab5 = 28.

endif.

concatenate i_tab2 i_tab3 i_tab5 into RESULT.

any help greatly appreciated. Thanks.

Regards,

Reddy.

Hi Gurus,

I am trying to convert calenderday to fiscal day (i.e. day remains the same from calender day, Month and year are populated from function module.

I am getting error message that syst date : 00.00.0000 is not expected.

data:

i_tab(2) type c value 'V3',

i_tab1 like COMM_STRUCTURE-fiscper,

i_tab2 like COMM_STRUCTURE-fiscyear,

i_tab3(2) type c,

i_tab4 like COMM_STRUCTURE-dateto,

i_tab5(2) type c.

CALL FUNCTION 'UMC_CALDAY_TO_FISCPER'

EXPORTING

I_PERIV = i_tab

I_CALDAY = COMM_STRUCTURE-DATEto

IMPORTING

E_FISCPER = i_tab1.

break-point.

i_tab4 = COMM_STRUCTURE-dateto.

i_tab5 = i_tab4+6(2).

i_tab2 = i_tab1+0(4).

i_tab3 = i_tab1+5(2).

if i_tab5 >= 29.

i_tab5 = 28.

endif.

concatenate i_tab2 i_tab3 i_tab5 into RESULT.

any help greatly appreciated. Thanks.

Regards,

Reddy.

4 REPLIES 4
Read only

Former Member
0 Likes
589

HI,

report zrich_0001 .

data: posting_period like t009b-poper,

posting_year like bkpf-gjahr,

datum type sy-datum value '20060202'.

call function 'FI_PERIOD_DETERMINE'

exporting

i_budat = datum

I_PERIV = 'YT' "<-- Fiscal Year Variant

importing

e_gjahr = posting_year

e_poper = posting_period.

write:/ posting_period, posting_year.

Read only

0 Likes
589

Hi Avinash,

Thanks for reply. i want to concantenate the date to fiscal period and year. When i do the concatenation. I am getting error syst date :00.00.0000 not expected.

Any help grealty appreciated.

Regards,

Reddy.

Read only

0 Likes
589

HI,

Try these FM FIRST_DAY_IN_PERIOD_GET,LAST_DAY_IN_PERIOD_GET

Read only

0 Likes
589

Hi Avinash,

If input calender day is 00.00.0000, then i want result to be space otherwise calculate fiscal day. This is why i am getting the syst date : 00.00.0000 is not expected error.

Cheers,

Reddy.