on 10-02-2008 8:53 PM
Hi all,
I want to know if there is an SAP exit or a FM to get Posting period from the fiscal week. I looked in the forum but was not successful in getting a solution.
Thanks in advance.
Hi Rahul,
You could use the following FB:
CALL FUNCTION 'RST_TOBJ_TO_DERIVED_TOBJ'
EXPORTING
i_timnm_from = i_timnm_from <-Infoobject that needs to be converted (0CALWEEK)
i_timnm_to = i_timnm_to <-Infoobject to convert to (0FISCPER3)
i_timvl = l_timvl <-in your case 39/2008
I_FISCVARNT = i_fiscvarnt <- your company fiscal variant
I_BUFFER = rs_c_true <- set to 'X'
IMPORTING
E_TIMVL = l_result <- gives you back your result as string e.g. 010/2008
EXCEPTIONS
INCOMPATIBLE_TOBJS = 1
NO_INPUT_VALUE = 2
FISCVARNT_MISSING = 3
INPUT_NOT_NUMERIC = 4
WRONG_DATE = 5
WRONG_FISCPER = 6
X_MESSAGE = 7
OTHERS = 8
This one is used by SAP within update rules (mostly) to convert from a lower time level (0CALDAY) to a higher one.
It's up to you if you check for each exception or only for sy-subrc <> 0.
Hope that helps.
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
'LAST_DAY_IN_PERIOD_GET'
try this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Thanks for the reply.
I have a variable which has the last week value. And, I want to use this week variable to get the posting period of that week.
Say, for eg. I have Z_WEEK = 39, I want this value to be used to get the posting period. Z_WEEK is a customer exit variable.
Do you have idea an on this?
Thanks.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.