Skip to Content
author's profile photo Former Member
Former Member

Customer Exit in Query Designer

Hi,

I have to build a query in QD 7.0 which schould cotain the Countries (Hierarchy) in the Rowes and Revenue % in the Columns.

I have to show the revenue% in three catagory: >30%, 10-30% and <10% with sum for each catagory, somehow like this:

Greater than 30%

usa 40%

can 31%

.

.

sum

Between 10-30%

IT 20%

CA 21%

.

.

sum

Less than 10%

DE 9%

FR 8%

.

.

sum

Total sum

I know that can be done with Customer Exit, but can any one tell me how to do it und how should the Customer Exit look like. I have not too much experience ABAP, or may be some one has another idea.

Thanks for any help in advance

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2008 at 08:08 AM

    Hi Martin,

    Why you want to go for customer exit ??

    I hope that revenue %ge is a calculated key figure. And you have to place Revenue depending on its value under proper column. Is this what u are luking for ?

    If so then u can create busckets for the 3 categories and place the revenuce of particular country under proper category without using customer exit.

    Create 3 different calculated key figure namely >30%, 10-30% and <10%.

    write below formula; for e.g in <10 %

    (revenue < 10) * revenue

    (Im taking into consideration that revenue is a calulated key figyure)

    Will help u in more better way once u clear your requriement.

    Thanks

    Dipika

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hallo Dipika,

      thanks for your answer.

      what I want exactly is to show the Countries (Which is an Hierarchy) in three categories seperatly accourding thier revenue.

      your suggestion by create Formula e.g.

      (Revenue% > 10)*Revenue% ....?

      in this case it show me the Countries with Revenue% > 10, and it show the rest of the countries also but with 0 value.

      therefor I have to say in my Formula as well not to show the countries which do not belong to this category. But How??

      I hope I could explain what I want and I hope you can help.

      Thanks

  • author's profile photo Former Member
    Former Member
    Posted on Jun 11, 2008 at 01:18 PM

    Hi Martin,

    a. I think you can create 3 customer exit variable for example ZREV1, ZREV2 and ZREV3.

    b. Then you go to the transaction cmod and fill out the project name.

    or you can go to the SM37 tcode and open the function module : EXIT_SAPLRRS0_001.

    c. Double click on : INCLUDE ZXRSRU01 code there.

    d. Then you can start to code.

    ---> for revenue less than 30%

    WHEN 'ZREV1'

    IF I_STEP EQ 2.

    l_s_range-low = 30.

    l_s_range-sign = 'I'.

    l_s_range-opt = 'LT'.

    append l_s_range to e_t_range.

    ENDIF.

    --> you can repeat for the rest with the different parameter.

    Hope this help.

    -Martin-

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Martin,

      Thank you for your valuable answer.

      could you please check my Customer_Exit Code if it is Correct:

      ---> for revenue Greater than 30%

      WHEN 'ZREV1'

      IF I_STEP EQ 2.

      l_s_range-High = 30.

      l_s_range-sign = 'I'.

      l_s_range-opt = 'GT'.

      append l_s_range to e_t_range.

      ENDIF.

      ---> for revenue Between 0-30%

      WHEN 'ZREV2'

      IF I_STEP EQ 2.

      l_s_range-High = 30.

      l_s_range-low = 0.

      l_s_range-sign = 'I'.

      l_s_range-opt = 'BT'.

      append l_s_range to e_t_range.

      ENDIF.

      ---> for revenue less than 0%

      WHEN 'ZREV3'

      IF I_STEP EQ 2.

      l_s_range-low = 0.

      l_s_range-sign = 'I'.

      l_s_range-opt = 'LT'.

      append l_s_range to e_t_range.

      ENDIF.

      Thanks alot in Advance

      martin

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.