on 04-18-2006 2:53 AM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.