Creating customer formula to be used in the Query Designer

hi,
How can i code a specific formula to be used in the query designer. As an example, i need to calculate dynamically working days between two dates.
i tried to find the corresponding BAdl interface with no success..
Do you have any suggestion ?
Ludovic

Hi..
I have a scenario ...  it may help..
The group HR administrator wants a detailed line item report that lists all employee absences in a given period. The report is to show the employee number, the absence start date, together with the end date of the absence and show the number of calendar days the employee was absent.
The good thing about using this technique is that no redesign work is needed from your technical BW team, no ABAP is involved and best of all, it quick and easy.
Solution:
For this example I created an ODS object called Absence that holds basic employee information along with individual absence record data.
Follow the steps below:
     Open the BEx Query Designer and create a new report on your chosen InfoProvider.
              Drag the Employee, Valid from and Valid to characteristics into the Rows section of the screen.
If needed, apply data selection restrictions to the characteristics as pop up
     Right click on the Key Figures structure and select New Formula
     In the new formula window right click on Formula Variable and choose New Variable
     The Variables Wizard will launch and will require you to specify the variable details.
( Click the NEXT button if the Introduction screen appears )
     Enter the variable details on the General Information as shown in  pop up
Enter the Variable Name , Description and select Replacement Path in the Processing by field.
Click the Next Button.
     In the Characteristic screen (pop up) select the date characteristic that represents the first date to use in the calculation (From Date).
Click the Next Button.
     The Save Variable screen (pop up) displays a summary of the new variable.
Click on the Finish button to save the variable.
     Repeat steps first four  for to create a second variable for the second date to be used in the calculation.
In the example shown, the characteristic 0DATETO is used to create the variable ABSEND (Absence End Date)
Define the Calculation............
            The new calculated key figure will now show in the columns section of the BEx query designer
excute...
with regards,
hari

Similar Messages

  • I want to create a formula for telephone numbers in the formula editor

    Is there a way to create a formula for telephone numbers in the "custom" editor in the inspector
    IE if I enter 2123456789 into a cell it automatically formats it to look like this (212) 345-6789

    You can create a new format by opening the Cells Inspector, then selecting "Custom" from the format menu:
    You can add the ### fields and click the menu on the left of the field:

  • Creating formula in the Query Designer

    Hi,
    I have a KF which I have to convert in to different unit in the query ( x/data)
    The problem is some of my data in the cube is zero (0) and when I use division, it shows me error (red X) in the query output.( Divide by zero)
    Is there any way to skip this division if the data is zero? How can I set my formula in the Query designer?
    Thanks
    M Kumar.

    Hi,
    Please use the NDIV() or NOERR() function outside of your expression and it will take care of the division by zero.
    See here for details:
    http://help.sap.com/saphelp_nw04/helpdata/en/03/17f13a2f160f28e10000000a114084/content.htm
    Hope this helps...

  • How do I display decimal hour as time? Example, I created a formula (originally in Exel) where the result is 2.25. I need this to be displayed as 2:15, (2h, 15m). Here is the formula in cell b8   =SUM((A6/18)*B3 (B6/8)*B3 (A6 B6)/70*B3 B2)/60

    How do I display decimal hour as time in Numbers for iPhone5 ? Example, I created a formula (originally in Exel) where the result is 2.25. I need this to be displayed as 2:15, (2h, 15m). Here is the formula in cell b8   =SUM((A6/18)*B3 (B6/8)*B3 (A6 B6)/70*B3 B2)/60. The result can be in either b8 or a different cell.
      Thanks for helping this novice

    B1=DURATION(0,0,A1,0,0,0)
    The DURATION function combines separate values for weeks, days, hours, minutes, seconds, and milliseconds and returns a duration value.
    DURATION(weeks, days, hours, minutes, seconds, milliseconds)

  • Curerency conversion for a Formula in the query designer

    Hi
    I have a ' Financial Loss Formula' in the report. I want to convert this 'Financial Loss' into USD Currency at query designer level.
    Source Currency = SAR
    Target Currency = USD
    So how can i do the curerency conversion for a Formula in the query designer.
    pls let me kow
    kumar

    Hi,
    If you define your query conversion in BW then it is easy to do currency conversion through Bex.What you need to do is use calculated key figure instead formula and do a right click select properties there at the currency translation area you ca select defined currency conversion in BW and your target currency.
    /people/rasim.manavoglu/blog/2007/04/30/currency-currency-currency
    Regards.

  • Custom master page is showing inside the dashboard designer

    I have some issues with Dashboard designer, when i am creating a new report ,my custom master page is showing inside the designer. How i can remove this?
    the same issues of this post ->
    http://sharepoint.stackexchange.com/questions/109218/custom-master-page-is-showing-inside-the-dashboard-designer-pps
    Thanks

    But here's a few more things:
    When I click on the page 1, the Master Page view is shown.  When I click on Master Pages, the Master Page view is shown, also when I click on
    untitled Content Area, the Master Page view is shown.  All these made me think that extra page is the Master Page.
    When I look at pagination for page1, here's what there:
    When I click on the (untitledSubform) (page1) pagination, here's what's there
    I can't get this page to go away. Thanks.

  • 'Display as hierarchy' in the Query Designer

    Hi,
          Can anyone highlight some points or importance of 'display as hierarchy' in either rows or columns in the query designer. Also could someone put some thoughts on the 'new structure' in the query designer, is it just that we can create some new selection and new formula from the structure or is there any other explanation for its existence. Any kind of explanation would be greatly appreciated.
    Thanks,
    Anjali.

    Hi Anjali,
    display as Hierarchies:
    simply enables you to select and use hierarchies for that InfoObject if available.
    Structures:
    you can create structures with or without keyfigures. Structures give you a great deal of flexibility and consistancy in your reports. Eg. you can create a structure that gives you a drilldown on char selections that are different for each line or column. We use that to "simulate" divisions in a drilldown that we don't have backed up by masterdata.
    Also structures enable you to keep reports consistant by using the same global structure eg. for all Contribution margin reports
    Hope that helped,
    regards,
    michael

  • Currency conversion in the query designer level

    Hi
    Iam calculating the 'Financial Loss' in the Formula in the query designer.And it comes in SAR(Saudi Riyals).
    But i want the 'Financial Loss' in USD in the Query Designer. Because i want the USD Financial Loss to be use in some other calculation.
    Please let me know how can we do this one in the query designer. I really appreciate for it .
    Regards
    Kumar

    Dear Ravi,
    Basically there are 2 ways to do it: routine & query level.
    If query level, you need to maintain it first using tcode RRC1, then you use it in your KF in your query. .
    Routine level,
    You can create new KF in info-provider, then in the update rules routine, you can use this function to convert the currency :
    CONVERT_TO_LOCAL_CURRENCY
    Hopefully it can help you a lot.
    Regards,
    Niel
    thanks for any points you choose to assign.

  • Keyfigure value by comparing 2 date fields, in the query designer.

    Hi all,
    Could any one please intimate, how to display the key figure result with the comparison of 2 date fields.
    We are having "Completed Date" say(CDATE) and "Deadline Date"(DDATE) values in the report as time characteristics, dervied from the CRM system.
    Now we need to compare the values as:
    CDATE <= DDATE, then only consider this under "Meeting Planned Date"(Key Figure).
    Could you please intimate, how to display the key figure value, by using the code at  the query designer level.
    Thanks & Regards,
    A.V.N.Rao

    Hi Rao,
    Simple create two formula variables with replacement path from these two date fileds,then create a formula then do the comparison
    Eg:
    ZVAR_CDATE  WITH REPLACEMENT PATH PROCESSING TYPE REPLACED WITH OBJ CDATE
    ZVAR_DDATE  WITH REPLACEMENT PATH PROCESSING TYPE REPLACED WITH OBJ DDATE
    CREATE A FORMULA FORMULA1: IN THE FORMULA BUILDER AREA DO THE COMPARISON.
    Thanks & Regards
    Ramsthota

  • How can i reuse a structure in the query designer in 3.5

    Hi all,
    we are using the version BW 3.5,  now how can i reuse a structure made int he query designer, because i need it in another query, i did the structure and put it a technical name and save, help guys

    HI Richard,
    Create a Structure in Rows/columns and save As it, then in the left Panel of the Query Designer you can see three Folders
    1) Structures
    2) Keyfigures
    3) Dimensions
    then Expand the structures Folder, there you can find your saved structure, Structures are 2 types
    1) With Key figures
    2) Without Key Figures
    If you have the key figures in your saved structure, then you can find it in the subfolder of with Keyfigures, else in the other folder.
    Now you can use this structure by draging in all the queries which are on the same InfoProvider (CUbe. MultiProvider)
    Regards
    ReddY A

  • Some question about the query designer

    hello, dear all,
    I am a new comer of here, and I am intersting in BI, but I have no basic knowledge about it.
    so I just want someone could give me some advice about it.
    our boss need I do the developer about the query designer,  I just have searched in this forum. but nothing founded for I am a new comer here,
    I heard there are some training document of the query designer, could someone give me the URL, thanks.

    Hi,
    Query desinger is used to develop a Query, Query can be created on following data targets
    -Info Cube
    -DSO
    Virtual data target
    -MultiCube
    -Infoset
    -Multiprovider
    We have 5 section in query designer
    - Infoprovider : where we select the data target , on which report to be created
    -Filter : to restrict value at infoprovider level ( if you want data for year 2008, for example)
    -Free Characterstic : this allow you to drill down
    -Columns : char/keyfigs to be display in columns can be added here
    Row: key/char to be display in Rows can be added here
    gv me ur mailid i will let u have Bex manual,
    I would suggest , if you have any IDES ( training ) system , where you can log in and then go to RRMX,
    and try to create new query and add any data target ( which is already created ) and then drag and drop the char/key fig to the required section ,
    save it and execute it .....
    if you play arround and see the output , that would help u to understand how to work with query designer.
    Hope this helps
    Sukhi
    Edited by: Sukhvidner Singh on Nov 4, 2009 5:36 PM

  • How to hide a single value node hierarchy in the query designer

    Hi,
    I would like to perform a calculation  in the infocube. It concern  a count "Nb of different customers" with the following hierarchy : Country / region / City.
    This KF would be read at the same time by city, region and country, and  certain customers exist in 2 different region, and I have to count them only once by country.
    To do this, I added a new record (at the country level when loading infocube) to deduct a number of customers in doubloons.
    This line added contain only a country code and the number of cutomers in doubloons (- 23 when I have 23 cutomers in doublons) with revrese sign.
    Now, I would like to use this value (-23) to have a right Nb of different customers by country, without showing the not assigned line in the report hierarchy.
    How can I hide, in the query designer or the WAD, a single value node from hierarchy (NOT assigned) but take in account the value (-23) at the country level ?
    Is there another solution (more simple) to perform this in the infocube ?
    For information,
    1) The infocube is loaded once per month, and the KF (Nb of different customers" is also performed by month.
    2) I can't perform this in the report (performance problem with calculated KF).
    thx.

    Hi,
    the short answer is "you can't", the longer is: The ADF Faces tree component is stamped for better performance. This stamping means that nodes are not rendered as JSF objects but copies of an existing component (just with a changed value). For this reason the nodes don't issue their own query for data and thus cannot be refreshed individually
    Frank

  • Error in while Executing Query in the Query Designer

    Hi,
    I  created info Set based two  info object and  three Data Store Objects. and join condition is Left Outer Join.
    there are Business Partner info object, CRM  BP Sales View Info Object and Data Store Objects are  BP: Roles (0BP_ROLE),Partner: Industries(0BP_IS),CRM Marketing Attributes for Business Partner(0ATR_DS01)
    I given some Selection Parameters while executing query in the Query Designer. in That i given city is selection parameters
    and i creted variable for this info object.
    it gives the Error Messages
    Beim Lesen der Daten sind Fehler aufgetreten. Navigation ist möglich
    Der Wert "New Delhi " von Merkmal 0CITY40 enthält an der 10.ten Stelle einen Fehler
    it is very urgent , can any one help me regarding this.

    Hi Reddy,
    The Error message in english is this
    While reading the data mistakes have appeared. Navigation is possible
    The value " New of Delhi " from sign 0CITY40 contains a mistake at the 10.ten place
    and i think you need to run the change run and run the report with out selecting the variable option.and navigate in the report by filtering the report for your requirement.
    Try this and let me know.
    Thanks,
    RK

  • G/L Account Numbers missing in the Query Designer

    Hi Experts
                   New G/L Account numbers are been added to some items like Rebates & Discounts. These G/L Account Numbers are been seen in the RSA1 and are not present in the Query Designer. So i want to know the procedure to update these G/L Account numbers in the Query Designer, Can you please help me.
    G/L Account Numbers in RSA1 = 718 and in Query Designer it is 661 so please guide me to update the rest of the G/L Account nos in the query designer.
    Thanking you
    Regards
    Mrudul.
    Edited by: Mrudul Naidu Cherukupalli on Feb 1, 2008 5:23 PM

    Yes, the problem is with the extractor
    It is not been enhanced because i am working on SAP BW 3.1C and its been implemented in 2004 and since then it is not been used properly.
    The Datasource is 0EC_PCA_3 (Enterprice Controlling line items).
    Yes i maximized to 1000 records per call and searched for the G/L Account E16411 which i cannot find in the cube.
    When i checked the results with R/3 i found the totals are doubled and when divided the Key figure Net of Credit and Debit by 2 i got the some results correctly(Sales Revenue, Sales Revenue of Exports and Sales Revenue of Domestic)
    I Checked the Service Marketplace and found the note which should be implemented to rectify the error of duplicating the records,
    Can you please help me to update the  G/L Accounts in the datasource.
    My Development System contains more then 2000 G/L accounts in the cube (query designer).
    Thanking you,
    Regards
    Mrudul.

  • Providing access to Variables in the Query Designer

    Greetings experts and fellow consultants,
    I have a simple question, did a search and did not come up with much of an answer.  Currently, we have a system with a role for BI Power Users in order for them to create ad-hoc queries.  An issue we found was that these power users were not able to view variables within the query designer:
    Under the "Characteristic Restrictions" pane, the variables show up as (Display Not Allowed) under their associated InfoObjects.  This is presenting an issue (understandably) and I would like to provide access for these power users to see the variables.
    My question is, are there any circumstances where I would want to restrict which variables are shown to the power user?  Right now, I plan to allow display access to all variables (via S_RS_COMP+S_RS_COMP1 for those informed on Security).  Just trying to brainstorm on whether there might be scenerios where I would want to hide certain variables.
    Many thanks to all opinions, as always!

    Suresh, in my above post I knew how to enable this.  I just wanted to know in regards to security whether there were any exposures.  Apparently, I could not find any and the changes went through without issue.  The way you enable display of variables in the Query Designer is the following:
    S_RS_COMP:
    RSINFOAREA '*'
    RSINFOCUBE '*'
    RSZCOMPTP 'VAR'
    ACTVT '03'
    S_RS_COMP1:
    RSZCOMPTP 'VAR'
    RSZCOMPID '*'
    RSZOWNER '*'
    ACTVT '03'
    Hope this helps.  Of course, adjust the field values are you see fit but the minimum requirement is that RSZCOMOPTP 'VAR' (Variables) and ACTVT '03' (Display).

Maybe you are looking for

  • Itunes 7.7 wont run

    I bought a new iPod and had to download 7.7 for the new iPod. after doing that following instructions etc I can't get iTunes to open from the desktop short cut/all programs short cut. I've tried to repair I've removed and re-installed I got iTunes to

  • How do i install the movies game w/starmaker?

    Hello, i installed the movies game but could not find starmaker. I undid the installation. How do i install the movies game with starmaker?

  • Port mapping with source ip filtering?

    did quite a bit of searching, and could find anything on the topic. is there any way to restrict a port map to amspecific ip or subnet? basically getting access to basic firewall rules? thanks in advance.

  • Embedded SQL related precompiler

    how to add the precompiler C/C++ tools in Oracle 10g std one edition server as well as client to implement embedded sql queries for creation,deletion , upation and selection of tables?

  • Checking the Server Name

    I am a new user with oracle. What I want to know is how to check the oracle server name. Is there any script I have to write or is there any command. Thanks for your help in advance. Rahul