cancel
Showing results for 
Search instead for 
Did you mean: 

Posting period from Fiscal week

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

andreas_klapper
Explorer
0 Kudos

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

Former Member
0 Kudos

'LAST_DAY_IN_PERIOD_GET'

try this.

Former Member
0 Kudos

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.