Skip to Content
author's profile photo
Former Member

How to dynamically show columns in Bex query.

Dear experts,

I have a question regarding how to dynamically show columns in Bex query.

For example, I have one key figure A with 30 days of data, so in DSO there would be 30 rows for each primary keys:

Primary Keys | A(Day1)

Primary Keys | A(Day2)

Primary Keys | A(Day3)

Primary Keys | A(Day4)

Primary Keys | A(Day5)

Primary Keys | A(Day6)

Primary Keys | A(Day7)

........

Now our requirement is: our user need to see the trend change for key figure A. Based on the number of days user select, the query need to show the corresponding number of columns for that specific key figure.

For example:

If user select 7 Days, then the Bex query should have 7 columns for Key Figure A, as below:

Primary Keys | A(Day1) | A(Day2) | A(Day3) | A(Day4) | A(Day5) | A(Day6) | A(Day7)

Does anybody know how to do that?

Any post would be appreciated and thank you all in advance!

Best Regards

Tim

Add comment
10|10000 characters needed characters exceeded

4 Answers

  • author's profile photo
    Former Member
    Posted on Apr 01, 2011 at 03:36 AM

    Hi there,

    I would say you need to alter how the DSO is built. I would suggest you modify it so that day is a characteristic that your users can then select with an input ready variable.

    That would then make your query much easier to build.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 01, 2011 at 05:08 AM

    Hi Tim,

    I am not sure how exactly are you taking no. of days as input from user.

    But if input is in the form of date interval e.g. Order Date.

    Then you can simply put Order Date in columns along with your Key Figure A.

    Regards

    Shubh

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for your reply.

      My DSO is designed as below, we have one DATE characteristic to identify on which day the entry is loaded.

      Primary Keys | Snapshot Date (Day1) | A(Day1)

      Primary Keys | Snapshot Date (Day2) | A(Day2)

      Primary Keys | Snapshot Date (Day3) | A(Day3)

      Primary Keys | Snapshot Date (Day4) | A(Day4)

      Primary Keys | Snapshot Date (Day5) | A(Day5)

      Primary Keys | Snapshot Date (Day6) | A(Day6)

      Primary Keys | Snapshot Date (Day7) | A(Day7)

  • author's profile photo
    Former Member
    Posted on Apr 01, 2011 at 10:04 PM

    hi,

    1 KF with 30 days of data means defnitely you have 1 time charecterstic in the dso drag that charecter in row & create a variable with single value r range r multiple single value then user enter wt ever he wants.

    hope this helps

    Thanks,

    Sai.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 06, 2011 at 08:42 AM

    Simply drag the characteritic to the column and use abap routine to restrict data.

    Add comment
    10|10000 characters needed characters exceeded