cancel
Showing results for 
Search instead for 
Did you mean: 

user exit for a varialble

former_member522740
Participant
0 Kudos

hi gurus

i have req in which a report should accept a month as an input, and than based on that it should show actual data until than followed by plan data for the rest of the year

in technical words if user enters march as month, columns until march should have the keyfigure restricted by a characteristic (VTYPE = 10 - Actual) and for the remaining months it should retrict the keyfigures by (Vtype = 20 - Paln).

i believe this will require a Abap code that assigns the variables for Vtype a value based on the month input., can some one provide me with a sample code that does this or something similar to this.

if there is any other way to do this please let me know.

i am working on BI7

thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

create two restricted KeyFigs:

1. RKF1 with VTYPE = 10 and you 0CALMONTH2 <= INPUT

2. RKF2 with VTYPE = 20 and you 0CALMONTH2 > INPUT

create a formula FORM RKF1 + RKF2 and use it in your report.

hope this helps...

Olivier.

former_member522740
Participant
0 Kudos

i am sorry i am not a hardcode Bex person, what do you mean by

"and you 0calmonth2<= input"

"and you 0calmonth2> input"

i understand the rest of it.

thanks

Former Member
0 Kudos

and you 0calmonth2<= input"

"and you 0calmonth2> input"

it means that when you restrict ur calmonth by the input variable, there is option where you can select single values or a range. select range - and in the right panel drop down box, select less than equal to in the first case and greater than in the second case

former_member522740
Participant
0 Kudos

i dont understand what will that give me, the sum of RKF1 AND RKF2 what is that?

i need 12mths of data user will input a month say may, the report should show actual until may followed by plan for the rest.

now do i need to create 12 selections under a year one for each month in a structure, and than use this sum of RKF1 AND RKF2 in all 12 selection.

Former Member
0 Kudos

Hi,

did you try what I described?? If you don't understand at first sight by reading the solution I suggest to try it.

Replay:

Obviously you need to filter your query to 0CALYEAR if you want 12 month. Either with a variable input or with a fixed value.

RKF1 is your KeyFigure restricted to 0VTYPE = 10, 0CALMONTH2 <= INPUTVAR from user (as Voodi explained, in the selection for calmonth screen, tab Variable, choose Selection = Value range and "less than equal to"; finally drag your variable in the selection pane.

RKF2 is the same but 0VTYPE = 20 and 0CALMONTH2 > INPUTVAR

Finally create a FORM = RKF1 + RKF2

Now in your report, put 0CALMONTH2 in the columns. Underneath, drag your three key figures RKF1, RKF2 and FORM and some other characteristic in the row

Verify your data.

Now hide RKF1 and RKF2 in order to just see the FORM key figure; isn't that what you required?

let us know

Olivier.