cancel
Showing results for 
Search instead for 
Did you mean: 

How to build a text variable to change the posting period to calender month?

sherif_elkoumy
Participant
0 Kudos

Hello guys,


I need to build a text variable to change the posting period that the use enters at the beginning of executing the report into the corresponding month in the calender. The business year starts in October each year. When the user enters 1 in Posting period variable, the report shows him the data for October as I said because our business year starts from October and not January. for instance, posting period 01. 2014 corresponds to 10. 2013. This what I need to show, in the column should 10. 2013 shown and not 01 2014.

The user enter in the beginning Business Year for instance 2014 and posting period for instance 01. These inputs should be shown as in calender year as follow posting period is 01 corresponds to cal month 10 in year 201, these should be show. Please see screen shot.

Do I need to write any ABAP code or there is any other method to do it internally with the available variable tools w/o Coding ??

best regards,

Sherif

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182470
Active Contributor
0 Kudos

You need to write a User exit code to convert Posting per to Calmonth for the Text variable.

sherif_elkoumy
Participant
0 Kudos

Hello Suman,

do you have any idea how to approach that? I not really expert in ABAP but aiming to learn it in the near future. I really need it mostly for this user exist variables.

former_member182470
Active Contributor
0 Kudos

I can't help you in ABAP part. You may search for codes in SCN. There are lot of similar discussions happened in the past.

Former Member
0 Kudos

Hi,

It is not advisable to change your fiscal period to calendar month. Fiscal period is based on fiscal year variants and is inturn based on a business calendar.

For example, a business can have a fiscal period comprising 12+4(special periods) for every year and these special periods are named as 013.2013,014.2013 and so on.

If this is the case, how will you map the special periods to your calendar month? And if you try to create a variable for it based on calendar month, it'll throw an error stating invalid calendar month.

Br, H

sherif_elkoumy
Participant
0 Kudos

Hi Harish,

I think, it is not so complicated as you addressed previously. The user will not enter any special periods like 13 or 14. This would be excluded from selection, only from 1 to 12 can the user enter at the beginning. So, forget the special periods now, am not so expert in ABAP to say the system, look up the corresponding month form 0CALMONTH table to posting periods Table.

But your way of thinking concerning this mapping is plausible,  I have to check that.

Former Member
0 Kudos

Hi,

What I can see from your screenshot is that you'd like to see profit that falls in the posting period (based on fiscal period 10.2013) to an entirely new field that is based on calendar month. This will definitely mislead business whether the month is based on actual calendar month or fiscal month.

I'd strongly suggest you to introduce calendar month in your report. This will show profit based on posting period along with which calendar month it falls.

Addition to that, if you don't want users to enter fiscal periods in the variable screen, remove that variable and a create a new variable for selection screen based on calendar month.

Directly mapping calendar month to fiscal period is meaningless.

Br, H

anshu_lilhori
Active Contributor
0 Kudos

Hi,

So you mean to say you have data stored in the format the way you are describing.

Like for posting period 001. 2014 calmonth will be 10.2013.Please confirm.

Now you need to display the text for 10.2013 and not for 001.2014.Is this what you are trying to achieve.

If that is what your requirement then you may look at this option

Go to Tcode--RSRHIERARCHVIRT--Text Fiscal year/period-Select based on calendar year

Regards,

AL