How can i achieve tis in Bex Query Designer

Hi Experts,
Please advise on how can i achieve this in Query.
I got Location,Material_ID,Price and Change_Date.
(Change_Date is defined as both CHAR & KF in cube)
(Change date is on monthly basis they execute a programe in non sap source system to update the prices of material)
The Price of material tends to change or may not change ...
Every month we get a record from source system on material price
My requirment is to bulid a report that show
LocationMaterial_IDCurrent Price  and Previous Price
Please advise how can i develop this report

While loading into cube, normally you map  price field coming from datasaource to
infobject  ZPRICE_CURRENT   in your infocube.
So in transformation you map like this
price  -
> ZPRICE_CURRENT
Now, Maintain another keyfigure in cube  ZPRICE_PREVIOUS.
That is not mapped with anything.But is assigned a value in the Start routine
which just runs before, the transformation.
In the start routine write code something like this :
Read current value of price from cube for that Material.
(Select  ZPRICE_CURRENT into price_curr  from cube where material = DATA-PACKAGE- Material   )
if  DATA_PACKAGE-price <> price_curr   ( if new_price <> old_price)
ZPRICE_PREVIOUS = price_curr. (storign present value of price in the cube )
endif.
Now save the Start routine. When mapping the fields in the transformation
dont map anythign to  ZPRICE_PREVIOUS as it is already filled in teh start routine from the above  code.Leave it unmapped.
The below mapping is normally maintained without change..
price  -
> ZPRICE_CURRENT
If you find this to be useful ..please do the needful (points)

Similar Messages

  • How to write a condition in BEX Query Designer

    Hi
    How can i write a condition in Query Designer
    Scenario
    An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date.
    My requirment
    Count all the policies(valid) by employee on a ranges basis exception reporting
    (0-10;10-20;20-30;30-40) and then able to drill down by policy start date and expiry date.
    As per the requirment is to show policies which are not yet expired (active) i need to write a condition that will count only policies whose Expiry date is > Current calender day
    As Policy Expiry Date is a char i am converting it to KF using fourmala variable so that i can write a condition on it using current cal day formula variable sap exit
    But i char assigment of a condition i find 4 option
    How can i achieve this
    Thanks

    Hi Aurun,
    Thanks for the help,Really appreciated
    As this is my first enhancement using ABAP & CMOD
    What type of key (either Access or developer ) do i require to perform the following  enhancement......so that i can raise request with basis team
    I shall be great ful if u can asnwer below question
    First, you need to create a variable for expiry date with processing type as customer exit, and then give the necessary info.
    In details tab, unchk ready for input as we wont be taking the value from the prompt.
    Now go to CMOD transaction.
    Open the correcsponding project which has the exit code
    (How can i identify the project which has exit code)
    and go to ZXRSRU001 module inside taht.
    Go to the module where u write the exit.
    (How to locate the required module)
    Then, under i step 1, write the code:
    IF I_STEP = 1.
    CASE V_NAME  (What is 'V_NAME',Is it my variable technical name)
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.

  • How to create a variable in Bex Query Designer

    Hi guys,
    I am writing a query for a travel management report using the SAP Standard cube. I would like to restrict the query so it only shows me the last two months excluding the current month. I have checked BI content in RSA1, but I canu2019t find a relevant SAP standard variable that I can use.
    Can anyone please tell me if I can create my own? And if so, how I can do this.
    Many Thanks
    Forhad.

    lets say u want to display following picture:
    sept$-----august$
    City
    -chicago123$--
    44$
    so in Query designer go to Default values section.
    Bring in Calendar month
    right click calendar month
    and hit Restrict
    now select variable
    use standard sap variable Current Month.
    hit okey
    now select Variable and hit Red button
    Result u restricted current month.
    in columns bring in keyfigure $
    right click and hit edit
    bring in time field calendar month
    right click and hit restrict
    bring in Current month
    right click and select - SET OFFSET FOR VARIABLE
    select -1
    hit okey
    repeat the above process
    and this time select offset = -2
    this way u restricted current month
    but displayed last 2 months for keyfigure values.

  • How to create Text Variables in BEx Query Designer

    How  can i create Text Variables in Bex Q.D.
    I am able to create characteristic variables
    but i can't find option to create text variables.
    What's the requirement to create Text variables in Bex Q.D.
    When i try to create Text variable for 0calDay.. the variable type is characteristic by Default and disabled.
    How can i create text variables related to 0CalDay with which i need to work in Customer Exit.

    Hi,
    You have to create characteristic variable processing by Customer Exit by considering 0CalDay as a Reference Characteristic
    After creation of the above variable, you restrict your KF with the above created variable.
    Now you can create a Text variable for the description of your KF. This way it works...........
    Regards,
    Suman

  • How to display 0 Percentage in BEx Query Designer

    The BEx queries which I'm doing are ported to EP & client views all charts & data in portal only.
    I have a small requirement. My client requires to display 0% in the data output.
    Sample data is like
    Mon/Grade     A | B | C | D | E | F             " These are headings
    April                |     |    | 3  | 5 | 4 |  |           " These are data I got in BEx
    Required O/p
    Mon/Grade     A | B | C | D | E | F                  " These are headings
    April                |   0  | 0   | 3  | 5 | 4 | 0 |           " These are data I got in BEx
    My current formula is like
    > NODIV0( ( TEST1 * 12) %A TEST2 )
    What changes must I make so that 0% is displayed in the O/p? Please let me know earliest.
    P.S . The values TEST1 and TEST2 are 'Selections', which holds no data for those displaying values.

    Hi Kavitha,
    The problem  is I'm viewing the data in Web based BEX & not in BEX Analyser. So only.
    >            GROUP E GROUP D2 GROUP D1 GROUP C2
    >APR              6.0      46.0
    >MAY %           14.3      48.0      11.4      16.9
    >JUN %             11.6      16.2
    As you can see there's no data for the months-grade (Apr-GroupD1 etc).. Now, how to view it in portal with 0s for all the ones with no data?

  • How to filter hierarchy node in BEX query designer

    Dear experts
    We are working on FI balance sheet with hierarchy infoobject 0GLACCEXT. Example of our balance sheet is as follow:
    Parent Node A = 20
         Sub-parent Node A1 = 10
             Leaf A11 = 5
                 Leaf A12 = 5
    Parent Node B = 20
         Sub-parent Node B1 = 10
                   Leaf B11 = 5
                   Leaf B12 = 5
    We require only:
        Sub-parent Node A1 = 10
        Leaf B12 = 5
    So I filter those out in BEX restriction;  however, after we examine the report in tcode RSRT, "Sub-parent Node A1" is not shown in BEX Report, and the result is as follow:
    Parent Node B = 5
         Sub-parent Node B1 = 5
                 Leaf B12 = 5
    Are there solutions for us to show merely A1 and B12 ?

    Hi Chu
    Try the following steps.
    Initial Output
    In this example I will restrict the query for only displaying Node 8603 and leaf 9000
    Proceed to restrict the Characteristic. Please be aware of the difference between hierarchy nodes and leaf characteristic values. Also set the Hierarchy display properties to expand up to level 1.
    Execute the query again:
    Please be aware that users will still be able to expand node 8603 and see the lower level nodes/leaf. In order to restrict users from doing this set up users authorizations.
    Regards,
    Carlos

  • How to work with sap bw bex query structure

    Dear Friends,
    How can we use SAP BW bex query structure in crystal reports.
    Thanks with regards.
    Malik

    i have two structure in my query.
    and structure is comming in my Crystal report.
    i have 10 memebers in that structure and i make display off for some of members .
    but in crystal all of members are comming either its property is hidden or not.
    any help higly appricated.
    Regards
    Malik

  • Results based on From and To value in Bex query designer.

    Dear all,
    We are using BI7.00. In one of our report which pertains to PM user wants to get the details of number of breakdowns which falls in the value range 0 to 1 hours.
    I created a condition which has 2 variables, one is From value and the other is for the To value (since user wants to enter both the limits). I have written a condition that if the breakdown hour is greater than or equal to variable1 and less than or equal to variable2.
    Using the above condition if the query is run, i am not getting the desired output. The values avaialble in the report are 0.65,0.78,1.30,7.38,0 etc., when i give 0 to 1 i should get the values 0.65,0.78 and 0 but instead report displays "No valid results".
    I changed the condition and selected "Between" variable 1 and variable 2 - yet no change in the query.
    To my knowledge i foresee that system is not able to recognize the decimal and hence provides details only based on the whole numbers.
    How to get my requirement achieved in the Bex query designer.
    Experts suggestion with steps will be very useful to solve my problem.
    Regards,
    M.M
    Edited by: Magesh Magesh on Dec 26, 2008 11:28 AM

    Hi Magesh,
    I think you could try one more way.
    Create a formula inserting your two formula variables for limits .(FV -  are ready for input ) .
    The formula would return the result as 1 or 0 because it would have boolean condition in it.
    You could then place a condition in the query designer to only show all records where the value of the formula key fig is 1.
    You formula A would look like
    ( KF > FV1) AND (KF < FV2) * 1.
    And in the condition put A EQ 1.
    You could scale the key figures as well and multiply the limits mentioned by the users in FV1 and FV2 if decimals are still not recognized by SAP.(scaling)
    Regards,
    Sunmit.

  • How can i achieve Outerjoin type of results using Reports Datalink option

    Hi,
    i am developing a Oracle Report. i am using Datalink to maintain parent-child relationship between 2 queries. If no matching value found then i want to return 0 Records. how to achieve this.
    Ex: I have 2 tables like Dept & EMP
    DEPT has 2 rows HR and FINANCE
    I have only one employee in HR and no employee in FINANCE.
    I am using the below datalink properties:
    SQL clause : WHERE
    CONDITION ; =
    PARENT GROUP: DEPT
    PARENT Column : DEPTID
    CHILD QUERY : EMP
    CHILD Column : DEPTID.
    In the report it is showing matching columns without any issues> i want non matching columns also with Zero employess like
    HR     1
    FINANCE 0
    I need OUTER JOIN kind of thing. How can i achieve this. Just i have written one example. I have very complex query to implement this and datalink is absolutely necessry for me. Any help please.

    Following can be checked in order to return column value from child Group to Parent Group at data modal.
    a. create a PlaceHolder column ( say CP_1 and CP_2) at parent Group.
    b. create one Formula column at each Child group ( say cf_1 and cf_2 )
    c. write code at formula to return reg_emp as ( say for cf_1)
    srw.reference(:cp_1);
    :cp_1 := :rep_emp;
    for unreg_emp as
    srw.reference(:cp_2);
    :cp_2 := :unreg_emp;
    .. this way now reg_emp and unreg_emp counts can be made available to parent Group.
    To get a difference and return "Yes" or "No" write formula column at Parent Group ..
    Create a Formula column ( say cf_3) at parent group
    write following
    begin
    if :cp_1 = :cp_2 >0 then
    return 'Yes';
    else
    return 'No';
    end if;
    end;
    Now use this formula as source to show value at layout under Parent Repeating Frame.
    Hope this helps..

  • How can I create variant of control query?

    Dear Expert,
    I am using BEx Broadcaster to bradcast query as a report.
    In tab Filter Navigation, I enter the control query, but the variant always gives me "(No Selection Possible)".
    How can I create variant of control query?
    I try to create variant via variable entry page when I excute my query.
    The variable show in table "RSRPARAMETRIZA" but not show in BEx Braodcaster.
    Thank you,
    Zilla

    Hello,
    Please run this control query on the portal and then save variant you require. If you want this variant to be available
    to all users make sure that the user specific flag is unchecked while saving the variant.
    Regards,
    Michael

  • Can we add logo to BEx query ???

    Hi All,
    I would like to know can we add logo to Bex query. I know that we can add to Bex workbook.
    Thanks

    Is this for BEx Analyzer or BEx Web Analyzer?
    For BEx Web Analyzer, you can take the standard template 0ANALYSIS_PATTERN, save it as a custom template and customize it to include a corporate logo. See the following for a How To... on this:
    [How to Enhance SAP BEx Web Analyzer (0ANALYSIS_PATTERN)|http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3414900)ID0574286750DB11281326545475972586End?rid=/library/uuid/200d6cb6-080e-2b10-84a5-b96723ad8f18&overridelayout=true]

  • Why can't I find Bex Query Designer ?

    Hi,
    I installed successfully SAP Netweaver ABAP Trial Version. But I can't find the Bex Query Designer. I thought it was part of SAP Netweaver ?
    How can I get it ?
    Thanks.

    Hi,
    Bex and the other tools such as analyzer and web app.designer come with SAP gui installation (while installing SAP gui you should select BW-addon ) and you can find  the query designer under the following path on your computer .C:Program FilesSAPFrontEndBwwdbrlog.exe
    Regards,
    ®

  • I want to delete my current exchange account. How can I achieve this and not lose stored information such as contacts, photos etc. please help. Thank you.

    I want to delete my current exchange account and replace it with my new one. How can I achieve this and not lose my contacts, photos, etc associated with this account? Please help..
    Thank you,

    Bad idea.
    What information do you want to share, exactly?  You can share contacts, reminders, and calendars with other iCloud users without the need for both of you to use the same iCloud account.  You can authorize both phones to use apps purchased under the same Apple ID without sharing an iCloud account.
    Sharing an iCloud account is a bad idea in general. There is too much opportunity for someone to damage or delete data that will affect both.

  • I was login a website ,and i have opened cookies , i want to open another window to login the same website use another account , and in the same windows can use the same account , how can i achieve it ? thinks

    i want to use firefox to login a website ,in the same window and different tags can user the same session
    but when i open other window and login the same website use different account .
    how can i achieve it ? thinks

    Your problem has nothing to do with the faults or limitations of a web browser.
    ''There can be only ONE active user logged in on a specific website during a whole Browsing Session. Even if you try to log-in using a new window it will sign-out the earlier User ID from that website. It will keep the most recent logged-in User ID active.''
    This is the general policy on which all websites are built. Even if you try to login the same website from another web browser, you won't be able to login from the second platform either. I just check it. Tried on Mozilla and Internet Explorer.

  • How can i imrove peroformance of complex Query

    How can i improve performance of complex Query
    which used CASE WHEN , GROUP By Rollup
    for example
    SELECT CASE WHEN null then a
    ELSE b END
    FROM (
    SELECT a,b,c,..........
    FROM table1
    UNION ALL
    SELECT a,b,c,..........
    FROM table2
    GROUP BY ROLLUP a,b,c ,............
    this query take 18 min to return 180000 record
    is there is any way to improve the performance of this query

    Hello
    Have you considered using
    ALTER SYSTEM SET _fast=TRUE;-)
    Alternatively you could provide some more information such as an execution plan for your query:
    Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    SQL> set linesize 200
    SQL> set pages 50000
    SQL> EXPLAIN PLAN FOR
      2  select * from dual;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |             |       |       |       |
    |   1 |  TABLE ACCESS FULL   | DUAL        |       |       |       |
    Note: rule based optimization
    9 rows selected.If you want general info on tuning, I suggest you read the Perfomance tuning guide and the Data Warehousing guide. These are the best place to find information about concepts and techniques. The forums are better suited to specific questions.
    HTH
    David

Maybe you are looking for

  • Computer lags when playing games.

    Hi folks. I have a problem with my computer, several in fact. 1. Computer lags when playing games(Battlefield/Desert Combat) even on lowest video settings, especially when there is a lot of action.   2. When I open "My Computer" it searches for 3-5 m

  • Mail opens some PDF as a picture on my ipad in ios 7?

    my ipad opens some PDF files as a picture in my mail. after opening i cannot use is anymore, can't copy it to an App or print it. what can i do to slove this problem?

  • DLT writes perfect, but won`t read!

    Hi, because of one stupid replicator, who as a problem to take a burned DVD-9 master, we had to pack out our old DLT-Tape (which was dead), bought a new one, which writes faster than anything else which I have previously seen (Quantum DLT V 4) - but

  • Publish completed, but no new folio in viewer

    I've published a new folio to our branded viewer, but it still hasnt shown up in the viewer. Usually, I can count on the folio showing up within minutes after the 'completed' message. I know there were server issues yesterday, so maybe there are stil

  • Billing plan and pricing proc

    Dear frnds,                     I would like to know the link between Billing plan and pricing procedure...............I have prepared a milestone billing plan with a pricing procedure  which has price,  gym chrgs, maintenance chrgs etc..............