cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion to 0fiscper

Former Member
0 Kudos

Hi experts,

I need to know the code about 0fiscper conversion. I have the infoobject 0CALMONTH, and I wnat to convert to 0FISCPER in the update rules. Could somebody write me the ABAP code?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Mauricio,

Use Function Module FISCPER_FROM_CALMONTH_CALC. Give the value of 0CALMONTH and fical variant as input and you will get Fiscal year / period as output.

Hope it helps.

Regards,

praveen

Former Member
0 Kudos

I'm new in BW. Could somebody explain me step by step, please?

Thanks

Former Member
0 Kudos

In your update rules, choose update method routine and then click on the create icon. after that, you will need to copy and paste the code below and save:

$$ begin of routine - insert your code only below this line -

  • fill the internal table "MONITOR", to make monitor entries

data: l_fiscper type rsfiscper.

call function 'FISCPER_FROM_CALMONTH_CALC'

exporting

iv_calmonth = comm_structure-calmonth

iv_periv = 'K4'

importing

ev_fiscper = l_fiscper.

  • result value of the routine

result = l_fiscper.

  • if abort is not equal zero, the update process will be canceled

abort = 0.

$$ end of routine - insert your code only before this line -

Note that you may have to modify the code with respect to the fiscal year variant used. K4 is used here just for illustration.

Former Member
0 Kudos

Thanks John, I assigned points

Former Member
0 Kudos

Hi,

And also take a look on the links for more information.

With rgds,

Anil Kumar sharma .P

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mauricio,

You can use function module DATE_TO_PERIOD_CONVERT which converts a calendar date to fiscal year and posting period according to a fiscal year variant.

I hope this helps!

John

P.S. Actually Praveen's solution is better, yet it is similar as FISCPER_FROM_CALMONTH_CALC calls DATE_TO_PERIOD_CONVERT.

Message was edited by: John Danoff