cancel
Showing results for 
Search instead for 
Did you mean: 

Breaking up of Budget into quarters

Former Member
0 Kudos

hi All,

I am trying to build reports.

I have a KF called 0AMOUNT, which has budget data and also carries information about the Fiscal Year/Period in the format like ( 001/2006, 002/2006.. so on till 012/2006)

So 001/2006-003/2006 accounts for Quarter 1 and so on for other quarters.

I am creating a RKF restricting 0AMOUNT to Fiscal Year/ Period and using my own user defined Varible, which prompts the user for the quarter he wants and has default value ( say 001/2007- 003/2007 for Quarter 1 of Year 2007)

So totaly 4 RKF's and 4 Variables.

problem is that, when i execute the report it prompts the user for all the quarters and suppose if he wants to get the breakup for 2008, he has to enter all the quarter's value in the variables again. and then execute.

Not looking good.

I m sure client wont like it.

is there any way out for me!!!

any help would be GREAT

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arun,

please try the following:

above the key-figure Structure, please crate a new structure with a selection on 0FISCYEAR and 0FISCPER3

0FISCYEAR should be restricted by a variable.

for 0FISCPER3 user either a preselected range 001 - 003

or else enter a variableas single value to this.

Whe you first assign the variable, enter an offset (-2).

Then assign the same variable with offset (-1).

ande the last ist the pure variable.

No key figure needs to be assigned.

copy this selection and paste it. now redo this for the other quartes with the relevant offsets.

For the last quarter, the additional periods 13+x should be assigned as well.

Restrict now your key-figure to the proper valuetype and currencytype.

If there is no data, let's say for quarter 3 2006, activate the zero-suppression in the query-properties and in the structure-properties of the selection

The result should be: only one variable for FISCYEAR and one for FISCPER3.

hth

cheers

sven

Former Member
0 Kudos

Hi Sven,

Thank you for the reply!!

Ihave got a general idea of what you said.

But since I am new to BW I am not able to try fully what you said.

can you pleease write the description with bit more details.

should i create Varible for 0fiscyear and 0fiscper? if yes, what shud be the properties of the variables?

and also I dint understand this..

<b><i>For the last quarter, the additional periods 13+x should be assigned as well.

Restrict now your key-figure to the proper valuetype and currencytype.</i></b>

Please help me out!

Thanks

AB

Former Member
0 Kudos

Hi Arun,

Variables: you can activate variables out of the BusinessContent (0P_<NAME>). Go to Objectlist, Query-Elements, Variables in the BusinessContent area of the AdminWB. Serch for Fiscal year and Posting Period and get it (if not already there).

For FISCYEAR the Variable should be:

Single entry, mandatory (initial values not allowed).

For Fiscper3 the Variable should be the same.

both ready for input.

If you are maintaining your first selection, restrict the fiscper3 with the variable. Go onto the variable to the context menu and select "offset". Here you can enter the offset. it's a setting within the query, not within the variable!

For the PostingPeriods you can also use fixed values.

Oh and make sure that you get all data you need in your keyfigures and that they are not filtered in the query-filter.

The issue about the extra perods:

Depending on the Fiscalyear variant, in controlling and Financial-applictions of SAP you have some extra-periods.

e.g. for 0FISCVARNT K1 -> Period 013

for K2 -> 013, 014

K3 and so on. You can also have self defined variants.

occasionally the fiscal year differs from the calendar year. (e.g. fiscal year starts in september). I had that fairly often with UK-comanies.

hth

cheers

sven

Former Member
0 Kudos

HI sven.

you said...

<i><b>For Fiscper3 the Variable should be the same.

both ready for input.</b></i>

I dont 0FISCPER3 as one of the time characteristic.

Even if i activate it from BC, if the Data in infocube doens t has this information. It wont be useful rite!!

I have only 0FISCYEAR, 0FISCVARNT (f9) and 0FISCPER

how do I proceed now?

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You will encounter such things when u go for RKF. Did u hardcode the periods in RKF's.

Secondly, givethe user a chance to enter both year and period seperately.

Now you should show the data only for the quarter entered by the user right? OR you should display all the quarters? If yes why don't you go for exit? I can give you exit code.

Message was edited by: AVR - IGA

Former Member
0 Kudos

Hi AVR-IGA,

I did hardcode the values of periods in RKF's when i tried to restrict the 0FISCPER with my own varible, this variable has property "ready for input" so user can input the vales in the format "001/200x" to "003/200x" and the default values were also given.So by default is shows the results for year 2007, if in case user wants to show for the year 2008, he has to change all the values, i.e For example, "001/2007 to 003/2007" should be changed to "001/2008 to 003/2008" while the Query is being executed.

We are getting Correct results, but its just that I want to make it more user friendly.

<i><b>Now you should show the data only for the quarter entered by the user right? </b></i>

No, The requirement is to show in the report, the Amount for each quarter. The report has Four columns one for each quarter and user gets to choose year.

so in this case, as you suggested the "exit" will work?

tell me how to do it.I dont know the procedure.

Thanks

AB

Former Member
0 Kudos

Hi Arun,

Well you should show all the 4 quarters right? In the variable selection screen will the user be entering only fiscal year period? Let me know what all are available for user entry?

Let me also know the type of exit I mean function module exit or the you want to include it in the include of SAP in RSR00001

From the above post of urs I find that the user will be entering only year, right?

Message was edited by: AVR - IGA

Message was edited by: AVR - IGA

Former Member
0 Kudos

Hi AVR - IGA,

The varibles created have the following properties

Type Of Variable : Characteristic Value

Var Name:

Processing By : User entry/ default value

variable represents:interval

variable entry : optional

Default value 001/2007

To Default Value : 003/2007 (Varies for other Quarter variable)

and all are "Ready for Input"

Now once the Query is run, it prompts user for all the Quarters range, so user has to change the Year 8 times,

two for each quarter "from" and "TO" value. and for four quarters.

my thought is to make it in a such way that user gives the year and it displays the Data.

sorry..i dint quite understand this..

<i>Let me also know the type of exit I mean function module exit or the you want to include it in the include of SAP in RSR00001</i>

New to BW

Former Member
0 Kudos

Hi Arun,

Create a structure as mentioned below.

<b>Columns:</b>

In the frist column,

Amount

Fiscal Period - Restrict this with a variable for quarter.

The variable should not be ready for input and no default

values. (ZQUARTER1)

Similarly other three columns.

(let the variable in them be ZQUARTER2, ZQUARTER3, ZQUARTER4)

Now as a fifth column, in the new selection drag the Amount keyfigure

and Fiscal year. Create variable for Fiscal year which should be ready

for input, can give default value also.

<b>Now check the code for exit below.</b>

DATA: W_I_T_VAR_RANGE_IN LIKE RRRANGEEXIT.

DATA: YEAR(4) TYPE C.

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: L_YEAR LIKE T009B-BDATJ.

DATA: L_PER LIKE T009B-POPER.

CASE I_VNAM. " Variable name

WHEN 'ZQUARTER1'.

READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'ZYEAR'

INTO W_I_T_VAR_RANGE_IN.

YEAR = W_I_T_VAR_RANGE_IN-LOW.

CLEAR L_S_RANGE.

CONCATENATE YEAR '001' INTO L_S_RANGE-LOW.

CONCATENATE YEAR '003' INTO L_S_RANGE-HIGH.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.

WHEN 'ZQUARTER2'.

READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'ZYEAR'

INTO W_I_T_VAR_RANGE_IN.

YEAR = W_I_T_VAR_RANGE_IN-LOW.

CLEAR L_S_RANGE.

CONCATENATE YEAR '004' INTO L_S_RANGE-LOW.

CONCATENATE YEAR '006' INTO L_S_RANGE-HIGH.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.

WHEN 'ZQUARTER3'.

READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'ZYEAR'

INTO W_I_T_VAR_RANGE_IN.

YEAR = W_I_T_VAR_RANGE_IN-LOW.

CLEAR L_S_RANGE.

CONCATENATE YEAR '007' INTO L_S_RANGE-LOW.

CONCATENATE YEAR '009' INTO L_S_RANGE-HIGH.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.

WHEN 'ZQUARTER4'.

READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'ZYEAR'

INTO W_I_T_VAR_RANGE_IN.

YEAR = W_I_T_VAR_RANGE_IN-LOW.

CLEAR L_S_RANGE.

CONCATENATE YEAR '010' INTO L_S_RANGE-LOW.

CONCATENATE YEAR '012' INTO L_S_RANGE-HIGH.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.

ENDCASE.

you just need to make some changes depending upon where you are using it.

I hope this will work out.

Former Member
0 Kudos

Hi AVR - IGA,

I am trying to do what you said.

But I am not quite sure, where to write this code and what to do next.

I m sure this needs very basic inputs.Like what's FM, Exit code so on.

It would be great if you could direct me to some useful links and then i can read upon solve my problem.or if you can find some time, please give me steps of what to do.

thanks much

Arun

Former Member
0 Kudos

Hi Arun,

In the transaction code CMOD create a project for enhancement, and assign the prject in SMOD.

Assign RSR00001 (enhancement for reporting variables). In the components yu will find an SAP

On double clicking you can see an include which is a functionmodule and give the below

parameters and write the code in the source code section. Better take the help of any ABAP er

who can help you in this regard. You can even find how to enhance in the help.sap.com. Post back

in case of doubts. Just copy the below info and paste it in the notepad and format for better understanding because it also has descriptions in the second line.

http://help.sap.com/saphelp_sem40bw/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm

http://help.sap.com/saphelp_sem40bw/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm

Import : op pass

I_VNAM LIKE RSZGLOBV-VNAM X Name of Variable to be Replace

I_VARTYP LIKE RSZGLOBV-VARTYP X X Variable Type (Characteristic

I_IOBJNM LIKE RSZGLOBV-IOBJNM X X InfoObject that the Variable R

I_S_COB_PRO TYPE RSD_S_COB_PRO X X InfoObject Properties

I_S_RKB1D TYPE RSR_S_RKB1D X X Query Reporting Attribute

I_PERIV TYPE RRO01_S_RKB1F-P X X Query Definition Attribute

I_T_VAR_RANGE TYPE RRS0_T_VAR_RANG X X

I_STEP TYPE I 0 X X

Export :

pass val

E_T_RANGE TYPE RSR_T_RANGESID X Variables Value Table

E_MEEHT LIKE RSZGLOBV-MEEHT X Unit of Measure (Not Used)

E_MEFAC LIKE RSZGLOBV-MEFAC X Unit of Measure Favtor (Not Used)

E_WAERS LIKE RSZGLOBV-WAERS X Currency (Not Used)

E_WHFAC LIKE RSZGLOBV-WHFAC X Currency Factor (Not Used)

Changing : op pass

C_S_CUSTOMER TYPE RRO04_S_CUSTOMER X X

In the Source Code you can write the code.

Message was edited by: AVR - IGA

former_member188325
Active Contributor
0 Kudos

Hi Arun,

pl let me know the properties of 4 variables?you mentioned your Problem...But exactly how would you like to have the Report?

Do you have any other time chars ?

Thanks

Former Member
0 Kudos

4 variables are like these..

Characteristic: Fiscal Year/ Period

Ready for Input.

Default value as 001/2007 ro 003/2007 for Qtr 1

I have the following Time chars

1.Fiscal Year

2.Fiscal Year / Period

nothing else.