Formulae variable

Hi,
if anyone has step by step process for creating formulae variable repalcement path plz send me on this email id , and plz give real time example
Anjali
[email protected]

Hi,
The processing type Replacement Path enables you to specify the value that automatically replaces the variable when the query or Web application is executed.
For example, when you enter a variable as a characteristic value, you
do not need to determine the text for the characteristic value straight
away, but can let it be filled dynamically to match the characteristic
that is used when the query is executed for the variable.
Replacement path variable processing type used only for characteristics variable and formula variable and Text variable.
Text variables and formula variables with the replacement path
processing type are replaced by the corresponding characteristic
value. The variable wizard takes you through the Characteristic dialog
step automatically. This is where you select the reference for the
replacement value.
An application of Replacement path variable can be found here.
http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
Another application to get the Document Count: For example Number of Sales Orders.
Query formula-Counter???
Example for Replacement Path: Characteristic Variable.
http://help.sap.com/saphelp_nw04/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
Variable Replacement Example
http://help.sap.com/saphelp_nw04/helpdata/en/af/809528939d5b4fbff7e16a5bdc0d85/content.htm
Example for Replacement Path: Formula Variable.
http://help.sap.com/saphelp_nw04/helpdata/en/ca/5f9ac61a205a459d0e7ef313d10321/content.htm
Hope this helps....

Similar Messages

  • Formulae variable confusion/ abap routine

    in ods i have data like
    Postingday................value1........value2
    1/26/10............70.................50
    1/27/10............60.................48
    12/30/10............120.................55
    12/31/10............10.................52
    now in the report for a cube i have to show data for 3 keyfigures
    1 is amount and 2nd is (Amount x Value1) 3rd is (Amount/Value2)
    now the value1 and value2 changes everyday depending on what the Date is...
    so today on 1/26/11 the value1 is 70 and value2 is 50
    so i have to write formulae variable which fetches the value1 and 2 for Todays date...
    what should be the code for customer exit for formulae variable..
    something like pseudocode below
    when "zvar1"
    FOR 0calday = today = PostingDay in ods table /bic/azpostingdte
    Seleect Value1 ..
    endfunction

    ok, you would like to do sth in the customer exits with formular variable.
    formular variable : zvar. (with customer exits)  for value1.
    case i_vnam.
        WHEN 'zvar'.
    data: l_s_table type your tablename /bic/......
          IF i_step EQ '1'.
            CLEAR: l_s_range,
            select single *  from DB table into l_s_table
            with date = sy-datum.
            CLEAR l_s_range.
            l_s_range-low = l_s_table-value1.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
      endif.
    endcase.
    for value2 you do same with value1.
    PS:  for amount you must treat it as a restricted kf (with a variable of customer exits, which is gefiiled with sy-datum.)
    hope it helps you.
    Edited by: gang qin on Jan 27, 2011 9:43 PM

  • Formula variable used in exception and condition - gives a check error

    The same formula variable is used in a condition and exception within a query. When I click on "check", I get the message "Variable <myvar> Is Used By More Than One Infoobject". The variable is a formula variable, processed by User Entry/Default Value, with optional entry, ready for input, Dimension "number", default value -0.01.  However, the query still saves, generates and executes without problem.
    This is with BW 7.0, SP 14.  And with query designer 3.5, version 3500.7.572
    I'd be grateful if a few people could try to reproduce this, letting me know their version.  To reproduce it:
    Create a query. Create formula variable processed by User Entry/Default Value, with optional entry, ready for input, Dimension "number", default value -0.01. Create a condition using the  variable. Create an exception using the variable. Click on Check. Save and execute the query.
    Thanks
    Matt

    It is a warning and you can ignore it , if in query execution you get correct result / output...(then it implies u r on safe side)
    But if you are so much concerned about warning then as a workaround just create another Formulae variable and use it in Condition and use the previous formulae variable for Exception.
    This way you will have 2 variables for 2 different purposes
    and you will get rid of the warning message.
    So far if you get the correct output of query then there is no need to worry.
    Edited by: kartikey on Dec 20, 2007 1:45 PM

  • Calculation of no. of working days (per Factory Cal) between 2 date chars

    This question could be considered to be in continuation of a previous post called "Working days of month with factory calendar"
    I have two date Characteristics: say Date1 and Date2. I need to find the number of working days between them based on the factory calendar.
    (And yes we have already defined the default factory calendar in IMG under 'General Reporting settings' ).
    The previous post proposed the following:
    1) Convert date1 into factorydate (standard functionmodule)
    2) Convert date2 into factorydate (standard functionmodule)
    Perform date1 - date2 to get number of working days.
    I agree that there is a std function module to convert cal date to factory date called: 'DATE_CONVERT_TO_FACTORYDATE'
    But what are the steps for calling the conversion? Should I create a new Formula variable of 'Customer Exit type' give it a name and define the Function module in CMOD? But then how do I attach the formula variable to the date characteristic. Note that my infoobjects are Chars so I cannot do date1- date2 in the query as is possible with keyfigures!
    Please help! (my version is BW 3.0)
    Thanks
    Naresh

    Hi,
    For the above scenario when you need to calculate date 1 - date 2. we can't build a new formulae or calculated KF directly because those are the chars.
    So we need make chars to act as KF through Formulae with replacement path.
    create a formulae variable on those 2 Date chars with Processing type as replaccement then those 2 Dates can be avilable to build a formulae as ur requirement.
    Let me know if you need any more information.
    Thanks,
    Raju

  • Difference of Dates to calculate No. of Days

    Hi,
    I'm trying to do a date subtraction between a "Date-1"  and a Date-2 . I did this a couple of times in the past in bw-3.5 but now when i try to do that in BI 7.0 it doesnot work.
    I tried creating a formula variable using replacement path for the Date-1 and Date-2 .Then i created Formulae and Subtracted Date-1 & Date-2! I found this procedure online: http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html which i used in past and worked sucessfully in bw-3.5
    Now when i track the Report execution, in RSRT it seems that it is processing Dates as YYYYMMDD instead of DDMMYYYY.
    So that formulae brings weird result.
    What do i need to do?
    for e.g. 8/29/2005 - 9/13/2005 = 84 days
    which should be  only 15 days.
    Please advise.
    Can i do that without SAP Exit.
    i checked previous posts and there somewhere it was mentioned that i need to use function
    "Datediff" and i cannot find that anywhere.

    Does it work in 7.0?
    8/29/2005 - 9/13/2005 = 84 days,
    in my case it is doing like this -->
    9/13/2005 = 20050913 & 8/29/2005=20050829
    Hence 20050913 - 20050829 = 84
    it is processing Date as YYYYMMDD and then using it for subtraction.
    how to solve that in 7.0
    I used replacement path variable to solve that.
    replace ment path variable- replace variable with Infoobject.
    then created formulae variable, replace value with Key
    Created formulae and used "Date" Processing value as Date.
    Thanking u

  • Long text problem in BW query and Key figure name

    Hello
    We're using SAP BO 4.0 (IDT) and SAP BW as a datasource. Maybe someone knows:
    1. How to change the name of keyfigure, which now appears as Formula 1, Formula 2 etc. In BW every single key figure has it's own name Sales, Purchases etc. What I'm missing here?
    2.As you well might know every single char infoobject has it's own Long\Short\medium which now appears as an attribute. When I choose multiple Long definitions then the execution of a BEx query fails with 'Inconsistent answers'. In Universe Designer we can change the objects name, but how to proceed here. Do I need to change something on a Bex query level?
    I'm well familiar with SAP BO, but due to lack of experience in SAP I'' ve hit astumbling block with these 2 things> Any assistance would be more than welcome
    Thanks in advace

    Hi,
    for (1)  - that doesn't sound right...   i think your KF are calculated KF (CKF)  possibly with a formulae variable .. or something, which is supposed to populate the name, based on a user response ? 
    Or maybe you've got non-unique KF descriptions, and this is some system imposed nomenclature?
    for (2)  i'm not so sure, but you may have to change the infoobject text setting, globally, in RSA1.   webi won't like non-unique labels if the keys are different.. How does it look with the default 'key and text' (medium) setting?
    yes you can change the characteristic display properties in Bex query designer, but i have a funny feeling that it doesn't get consumed by webi over that API.  (it's native OLAP stuff for BEx really...)
    Good luck
    H

  • Subsequent use of cumulated value in query

    Hi All,
    We are using BEx Query Designer to create a query having one formula variable “Stock on Hand” as a cumulated value (along the columns).Now we need to use this cumulated value in another formula variable. Is this possible to do? If not could you please suggest an alternate for the same?
    Stock on hand (for any given week) = (Total Receipts – Total Demand) + Stock on Hand (for previous week).
    Inv. Carrying Cost (for any given week) = Stock on hand (cumulated values as above) * Per unit inv. cost
    Data for Total Receipts, Total Demand and Per unit Inv. Cost is present in the infocube at daily level. A sample report template has been given below:
    Product    Location       Week                      W1   W2    W3
       P1                L1        Total Demand           10     10     10
                                      Total Receipts           20      0       5
                                      Stock on Hand          10      0      -10
                                      Per unit Inv. Cost        2       2       2
                                      Inv. Carrying cost       20      0      -20
    Points assigned in advance for your replies
    Regards,
    Bansi.

    Hi PV,
    Thanks for the prompt reply. But we have already created two different formulae variables for the above requirement.
    The formula variable for Stock on hand is displaying the desired cumulative values. But the formula for Inv. Carrying cost is not able to use the display-value (cumulative value) of Stock on hand and it just uses the value corresponding to that particular week. For eg.
    for w2 if stock on hand =20 (cumulative value displayed on screen)
    and the original value of stock on hand for w2 = 0
    then the formula for Inv. carrying cost is using the original value(i.e. 0) but not the display value(i.e.20), whereas we want the cumulative value (i.e. 20) for our calculation.
    Any help in this regard would be highly appreciated.
    Regards,
    Bansi.

  • SAP BEX keyfigure dispalying 'X'

    Hi All,
    Character replacementpath with formulae variable of key figure displaying 'X' for alpha numeric characters.
    please suggest how to conver 'X' to value 1 of keyfigure.
    Thanks and Regards,
    Uma

    HI Uma,
    Sorry to ask this. just trying to understand your requirement. on checking your previous thread,
    this KF is created just for conditions apply ie. if KF = 0, then hide the records.
    if so, it can still show as "X" right.  if i understand, if the KF value is "X" or "any numeric", you wanted to show those records in report.
    we can simply hide this KF from the report layout right? why we need to show other value here,instead of "X"?
    Regards,
    Sakthi.

  • Updating structure on universe based on BW

    Hi,
      We have an issue that, whenever we want to add a new field in the BW query for example
    My query returns the following structure
    1 Company
        a. Name
        b.Short Name
    and so on.
    If i want to add a new field to the Company, it works great in the universe, the field appears as it should, but in all the reports that are based in the universe gets messed up.
    For example, on the reports where i use the property "a.Name" it get's switched up with "b. Short Name".
    It changes the object that i'm using the report for others, so whenever i need to add a new field, i have to go on all my reports to check if nothing is switched up.
    Is there a way to avoid this??
    Thanks
    Leandro Brasil

    warning  this answer is not going to be helpful !!
    Hi,
    the most effective way of mitigating this risk is to sign-off (finalize) BEx query development prior to developing your webi reports. The inclusion of new fields in the datasource is extremely disruptive to the universe layer.
    Sure, sometimes minor iterative changes have to be fast-tracked,  but there's no clever way of proliferating change down to the lowest level in webi without dilligent manual intervention  (think of possible regressions which could potentially happen in formulae, variables, conditional formatting etc )
    Regards,
    H

  • Conditional Data show / change values to be shown for months

    Dear All,
    I am trying to make a report for Employee Compensation History with the following query
    SELECT T1.DocEntry, T2.Period, T2.u_payperiod,T0.dept, T3.Name, T0.empID, T0.firstName,
    T4.U_note,T0.lastName, T1.U_ebasic, T1.U_ehra, T1.U_etrspt, T1.U_ecola,
    (T1.U_ebasic + T1.U_ehra + T1.U_etrspt + T1.U_ecola) 'Sub-Total 1', 
    T1.U_education,T1.U_grosssal, (T1.U_grosssal + T1.U_education) 'Sub-Total 2',
    T1.U_oadd, T1.U_enothour, T1.U_ebonus, (T1.U_oadd + T1.U_enothour + T1.U_ebonus) 'Additions Sub-Total-3',
    T1.U_dedhra, T1.U_dedtrans, T1.U_dedsa,
    T1.U_oded,T1.U_ducloan,(T1.U_dedhra + T1.U_dedtrans + T1.U_dedsa + T1.U_oded +T1.U_ducloan) 'Deductions Sub-Total-4',
    T1.U_netsal, T1.U_bank, T1.U_accno, T1.U_Remarks
    FROM dbo.OHEM T0
    INNER JOIN [dbo].[OUDP] T3 ON T3.Code = T0.dept
    INNER JOIN [dbo].[@PAYROLL_PR_DETAIL] T1 ON t1.U_ecode=t0.empid
    INNER JOIN [dbo].[@PAYROLL_PROLL_HEAD] T2 ON t2.docentry=t1.docentry
    INNER JOIN [dbo].[@PAYROLE_PP_HEAD] T4 ON T4.u_srlno=t2.u_payperiod
    In crystal Report I have made a Group of T0.firstName which is the Employee Name, Second I have made a group of T4.U_Note wherein Each Month is displayed ( E.g Jan, Feb, March, April, May...till December ).
    I have bought u_ebasic ( which is the basic salary ) in the second group row. Next T1.u_ehra and so on side by.
    Hence the reports looks like
    Employee A      u_eBasic      u_ehra
    Jan 09               5000             2000
    Feb 09               5000             2000
    March 09           6000             3000
    April 09              6000            3000
    May 09               6000            3000
    June 09              6000            3000
    July 09               6000            3000
    August 09          7000            3500
    September 09    7000            3500
    October 09        7000            3500
    November 09     7000           3500
    December 09     7000           3500
    Now I want to display in the above only the changes row in the report. Means Jan09 should show as its the starting then March 09 with the value of 6000 for Basic and Hra should show as its revised, then August 09 should show with the corresponding vales and supress or skip all data where there is no change.
    How to achieve such conditions through Crystal Report. Please advise.
    Best Regards,
    Depika

    Hi deepika
    Actually, my input is quite simillar to what Graham has suggested. only difference is  the object should be suppressed and the display of data should be handled.
    because your core requirement is to conditionally display the data based on some logic.
    Let me rephrase the statement
    Instaad of putting the database fields directly into the designer, please use formulae variables.
    that means, the new formulae which you have created each will hold each database field.
    Design the blank report with formuale and use suppress option of the object to conditionally display the data you want.
    Int his way, you will have less maintenance in future. My idea is similar to adhoc reporting.

  • Test dimension in formula

    Hello gurus,
    In a formula i want to test if two dimensions are equal or not.
    I use a replacement path variable for this and it works fine.
    But i don't want to have this dimensions in my query because report will be split up depending on the values those dimensions.
    So i don't need that my report will be splited, is it possible to do so? If not is there an other way to test dimensions in formula ?
    Regards,
    Thierry Chiret

    HI,
    If you are using Formulae variable with replacement path, it is mandatory to have characteristics in Rows column.
    My concern:
    Is it Date dimension (characteristic) that you are replacing in Formula variable?
    If yes:
    Then try to do modeling changes and make 2 KFs of type Date and map this with source fields and use these KF directly in Formulae for calculations instead of Formulae variable.
    Regards,
    Vijay

  • Documenting Providers/Characteristics/CKFs etc...

    Hello All,
    I have the unenviable task of doing some documentation on an existing system.
    The objective is to look at all objects related to certain InfoProviders and check the consistency of Texts/Descriptions for those objects.
    e.g.
    Cube->InfoObjects
    Cube->CKF->Formulae
    Cube->RKF->Restrictions
    Cube->Variables
    Cube->Queries->IOBJs/CKF/RKF
    etc. etc.
    SAPQuery is not an option and I do not relish the idea of doing this manually.
    I have extracted some tables via SE11, but am having difficulty with the more complex CKF/RKF/Formulae/Variables relationships and tracking bakc on the "where used" to capture all relationships.
    I have heard rumours that the BADI/BAPI for BW may help, - and it looks promising - but can find no examples of calling this from VBA (Excel) code
    So-
    1. Any ideas / Tools available
    2. Some BAPI/BADI/RFC examples used with VBA would be appreciated.
    Regards
    Ian

    Ian,
    Don't know of BADIs/BAPIs (check in BAPI browser) but you can export the objects as XML and process the XML file.
    Export as XML is an option in transport connection.
    Aneesh

  • Correct order for transporting BEx objects

    Hello-
    I have to transport following objects. They are all in separate transports. Can you tell me the correct order?
    Variables.
    User exit variables
    Restricted key figures
    Calculate key figures
    Structures
    Queries
    Query views
    Workbooks
    Web templates
    Thanks in advance.

    can i start with cross questioning..
    hw did u collect all these objects seperately in different requests.
    as far as i know if u know u r transporting workbook and webtemplate, in same request collect all the objects
    so all variables used within, all CKF,RKF formulaes, variables, user exits etc within the workbook or webtemplate
    u can transport within same request
    so u dnt hv to worry about elements used within and u jst hv to transport all together within same request
    if tht doesnt solve
    try to remove objects from request
    login to se10
    go to ur request
    delet it and unlock it
    and try to create new reqest and cllect all elements within 1 request and transport it.
    let us know

  • Placing multiple records on a single line (variables)

    Post Author: AeroProg
    CA Forum: Formula
    Hi, I am new to Crystal Reports, but I know Basic and other programming. I have Crystal Reports XI and am pulling data from our ERP/MRP system, Epicor Vista (Progress DB).I've been asked to figure out a Crystal Reports for our company (I get thrown into these projects). I know what the report should look like and I know how I would go about some VB code in a macro in Excel if all the data was in worksheets(i.e. like tables).Below is the data. Any help would be SO appreciated. So far I'm loving Crystal Reports and I can't wait to get some reports our company can start using but I'm stuck on understanding the timing and connection of formulas with the records.Table1 "JobMtl"Field "JobComplete":StringField "JobNum":StringTable2 "JobOper"Field "OpComplete":BooleanField "OprSeq":Number{JobMtl.JobComplete}FalseTrue{JobMtl.JobNum}20102011{JobOper.Complete}FalseTrue{JobOper.OprSeq}10203040Let's say I dragged all 4 fields into a report. It would look like this.JobNum JobComplete OprSeq OpComplete2010       False          10          True2010       False          20          True2010       False          30          False2010       False          40          False2011       False          10          True2011       False          20          False2011       False          30          FalseI would it to read like thisJobNum JobComplete PrevOp CurrOp NextOp2010       False          20          30        402011       False          10          20        30**Note: {JobMtl.JobComplete} will be used so I am only reporting jobs that are "not complete". I guess it means nothing to you guys, but I put it here because I was not sure if this will be involved in a formula.Thanks,AnthonyMy email is ls1z282002_at_yahoo.com (replace "_at_" => "@") if you would a *.RPT with the data I've shown.

    Post Author: GraemeG
    CA Forum: Formula
    I don't know if you can attach files... if you can I'll attach the sample. In the mean time, here's the rub...
    (By the way, I use basic syntax in my formulae... old habits and all that!)
    I created two tables (actually they were two sheets in a spreadsheet) called JobMtl and JobOper and put some records in in the format AeroProg described above.
    Create a formula called aResetVariables:
    'Define shared variables
    shared CurrOpNo as number
    shared PrevOpNo as number
    shared NextOpNo as number
    'Set Variables to zero
    CurrOpNo = 0
    PrevOpNo = 0
    NextOpNo = 0
    'This next line is just to keep Crystal happy
    formula = 0
    Create one called bCurrentOp:
    'Define shared variables
    shared CurrOpNo as number
    shared PrevOpNo as number
    shared NextOpNo as number
    if CurrOpNo = 0 and {JobOper_.JobComplete} = "false" then
        CurrOpNo = {JobOper_.OprSeq}
    end if
    formula = CurrOpNo
    Create one called cPreviousOp
    'Define shared variables
    shared CurrOpNo as number
    shared PrevOpNo as number
    shared NextOpNo as number
    if {JobOper_.OprSeq} < CurrOpNo or CurrOpNo = 0 then
        PrevOpNo = {JobOper_.OprSeq}
    end if
    formula = PrevOpNo
    Create one called cNextOp
    'Define shared variables
    shared CurrOpNo as number
    shared PrevOpNo as number
    shared NextOpNo as number
    if {JobOper_.OprSeq} > CurrOpNo and CurrOpNo <> 0 and NextOpNo = 0 then
        NextOpNo = {JobOper_.OprSeq}
    end if
    formula = NextOpNo
    In your Crystal report, group by the JobNum and put the aResetVariables formula into the group header. This will make sure that the variable are set back to zero every time the Job No changes. Suppress the group header.
    Plonk what ever you want into the detail line but suppress that too.
    Put the JobNum, JobComplete, cPreviousOp, bCurrentOp and dNextOp formulae into the footer. (Donu2019t suppress this section!)
    Run the report and you should get a line for each job showing the previous, current and next operation. If you tinker with the status' it seems to work everything out okay.

  • Creating Variables in BI Publisher

    Hi All,
    We have created columns in BI Answers using "case when" statements, is the same possible in BI Publisher. ie, Can we use "Case when" in BI Publisher, If yes, Please let me know on how to create columns using formulae in BI Publisher?
    Thanks in Advance,

    Hi,
    try the follow this syntax: valueof("variable")
    refer can we use repository variables in bi publisher like in anwers
    Thanks
    Deva

Maybe you are looking for

  • Why can't I connect to the iTunes store 9/24/2011?

    Why can't I connect to the iTunes store 9/24/2011?

  • On Demand Request

    Just purchased HBO to be able to watch Season 3 of Game of Thrones but the season is now over and it is not yet available on On Demand (although it is available as On Demand on the HBO app/website). Please add to the On Demand library. Thanks!

  • How to create hyperlink within HTML using PPTX for import .

    Hi , I am using PPTX to publish HTML5 - using Captivate 8.0 Hyper-linking is working in PPTX but not working in HTML . Please help. Regards, Amit

  • DNS addresses in WiFi

    iPhone accepts multiple DNS addresses from the DHCP server but it appears that if the first DNS on the list does not respond, the connection fails and the second DNS is not contacted. Anyone else seen this?

  • ITunes deletes artwork

    When I play an album from iTunes on my computer, some times, but not always,  iTunes dletes the artwork and won't let me add it back.  I then need to dlete that album and reload it into iTunes along with the artwork which is either downloaded or adde