Conversion to 0fiscper
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?
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'
iv_calmonth = comm_structure-calmonth
iv_periv = 'K4'
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.