cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Query with dynamic columns to show results

Former Member
0 Kudos

Hi experts,

I need to know how to create a query with dynamic columns. Meaning, I don't want to create a query with fixed columns representing the 12 periods of the fiscal year to show me actuals as the fiscal year proceeds.

For example, if I am currently in the middle of period 3 (March) of a fiscal year, when I execute the query, I need it to automatically only show me the 'Actuals' for periods 1 and 2, without seeing the columns from periods 3 to 12 showing blank.

Then when I am in the middle period 5 (May) the query should ONLY show me the columns for periods 1 to 4 'Actuals', no results should be shown for periods 5 to 12 yet, and I don't want to even see blank columns for period 6 to 12.

How do I define my columns, to achieve this.

Maximum points will be awarded.

Thanks Everyone.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ehab

create your restricted key figure in the columns and include a range restriction on period from 1 to ( Current period vairable -1), then drag in a characterisic like 0fiscper3 into the columns under the restricted key figure you created this should give a you a period break down of the rkf and only the period within the range will be displayed.

Josh

Answers (3)

Answers (3)

Former Member
0 Kudos

I will try to explain it better in another message.

Former Member
0 Kudos

Hi Josh,

I'm having a little difficuluty understanding what should be included in my restricted key figures.

The time characteristics that I have available to use are:

0FISCPER3 (posting period)

0FISCYEAR (fiscal year), currently using SAP EXIT to default current fiscal year.

0FISCVARNT (fiscal year variant).

In addition, I have the following characteristics available to be used in the columns:

Value type (10)

version (currently I'm using variable for it)

Currency type (020)

Currency (USD).

Can you explain what my restricted key figure should be based on and how it should look.

I tried to create a restircted key figure using 0AMOUNT, and 0FISCPER3. For 0FISCPER3 I created a range from 1 to previous period (using SAP EXIT that supplied previous period).I also had value type, version, currency type, and currency included in that restricted key figure.Then when I tried to drag 0FISCPER3 under the restricted key figure once again, it wouldn't let me, probably because I've already used 0FISCPER3 in the restricted key figure.

Please let me know if my explanation is not clear.

Your step by step help would be great.

Thanks

Edited by: Ehab Mansour on Sep 23, 2008 2:40 PM

Former Member
0 Kudos

HI

For your scenario we have the standard variables at object level. ( Check the variables under 0FISCPER object ther eyou can find the related variable.)

actually this variable will display the data to will current fiscal period remaining periods will not come if you want to show remaining for that also we have the standard variables kindly look into that.

Regards,

chandra.

Former Member
0 Kudos

Hi,

I'm not using 0FISCPER.

I'm only using 0FISCPER3, and 0FISCYEAR for this query.

Josh: can you explain how I can do this restircted key figure using the 0FISCPER3 to get the desired results.

I will also be using the standard SAP exit to get the current Fiscal year.

Thanks

Former Member
0 Kudos

Hi,

Thanks, I think I got it now.

Former Member
0 Kudos

seee below.

Edited by: Ehab Mansour on Sep 23, 2008 2:40 PM