cancel
Showing results for 
Search instead for 
Did you mean: 

Fiscal Year Period Routine issue

Former Member
0 Kudos
187

Hello All ,

I have upload problem while loading data from 2LIS_11_VAITM to infocube 0SD_C03 .

In the update rules 0FISCPER and 0FISCYEAR are mapped to Update Date Statistics 0ST_UP_DTE.

This causes a problem.

So I have written a routine on 0FISCYEAR as below ,

RESULT = COMM_STRUCTURE-ST_UP_DTE+0(4).

And then loaded data by making fiscal year variant = V3 Constant .

This data load is successful.

and Then anothe routine for 0FISCPER as below ,

RESULT = COMM_STRUCTURE-ST_UP_DTE+0(6).

If I load data now , i get an upload error as

'

Fiscal year variant V3 is not maintained for calendar year 0200'

The Fiscal Year Varient is Coming from R3 as field but do not have Fiscal Year or Period in the related data source 2LIS_11_VAITM.

Please help me ,

regards ,

Amol K.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

answered

Former Member
0 Kudos

keep fiscal year variant as v3

for fiscal year period from the corresponding date field 0ST_UP_DTE u write a formula

DATE_FISCPER(ur date field ,'v3' ).

to fiscal year this formula...

DATE_FISCYEAR( ur date field ,'v3' ).

the routine u can writing is throwing error in calcualting that fiscal period ur fiscal year is of length 7 and from the date u are picking some first six chars which is wrong for to convert these u can use these standard formulas... u try these formula it will workkk..........

Regards

vamsi

Edited by: vamsi talluri on Dec 13, 2008 1:00 PM

former_member205352
Active Contributor
0 Kudos

RESULT = COMM_STRUCTURE-ST_UP_DTE+0(6).

If setup date is 20081212

then result = 2008121 which is wrong.

it should be 2008012 or it actually depends on V3.

0FISCEPER should be YYYYMMM format note MMM (3 digits).

So thats your problem in coding.

Inorder to correct it :

Either map 0FISCPER directly to set up date in update rules of infocube.

or

Use DATE_TO_PERIOD_CONVERT function module to convert in routines.

or

Use the formulas as mentioned above by Vamsi.

Hope this helps.

Former Member
0 Kudos

hello Vamsi ,

Thanks for suggestion.

I have made Fiscal Year Variant = V3 in update rule.

I have written formula for 0FISCPER in update rules as below ,

DATE_FISCPER( ST_UP_DTE, 'V3' )

And then loaded data .

It is giving me error as below ,

'Error in a formula function'

After that I changed the formula as below ,

DATE_FISCPER( ST_UP_DTE, FISCVARNT )

but got the same error message 'Error in a formula function'.

Do I need to go routine only.

Regards ,

Amol

Former Member
0 Kudos

Hi Amol,

IF( IS_INITIAL(ST_UP_DTE ), '0', DATE_FISCPER( ST_UP_DTE, 'V3' ) )

I guess the value for date is cmg as no value or intial then the loading may fail please check this now...

Simialarly write for fiscyear also

here i am checking whether the date has any value if so it converts to fiscper according to 'v3' else if assigns zero to the output....

Give the technical name accordingly to ur date field....

Hope it helps otherwise get back to me..

Regards

vamsi

Former Member
0 Kudos

Hello Vamsi ,

I applied the formula given by you ,

But still getting same error message ,

Error in a formula function

Reg

Former Member
0 Kudos

Hello ,

I tried with below code ,

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

EXPORTING

i_date = COMM_STRUCTURE-ST_UP_DTE

i_periv = COMM_STRUCTURE-fiscvarnt

IMPORTING

e_buper = RESULT+4(3).

But it is not working ...Data is not loading to Infocube.

former_member205352
Active Contributor
0 Kudos

If you are writing this for 0FISCPER then it is as below :

data : zperiod like T009B-POPER,
         zyear like T009B-BDATJ.

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
EXPORTING
i_date = COMM_STRUCTURE-ST_UP_DTE
i_periv = COMM_STRUCTURE-fiscvarnt
IMPORTING
e_buper = zperiod
E_GJAHR = zyear.

Concatenate zyear zperiod into RESULT.

Hope this helps.

Former Member
0 Kudos

hello ,

I have maintained Fiscal Year Variant properly = V3 in SPRO ( OB29 ).

regards ,

Amol K.