Query field calculation based on a characteristic field

Hi
I have a req wherein the query has a field "Balance". Now here the value of the Balance field is calculated based on another characteristic "0bal_flag". 0bal_flag has values "X" or blank. The 0bal_flag is actually a attr of 0gl_account and i have it as a nav attr in my cube.
The calculation goes like this....
If 0bal_flag = 'X' then "Balance" = balance (there is a balance field in underlying infoprovider)
else "Balance" = Debit -credit (these fields are also there in underlying infoprovider....)
So how do i achieve this...?
Since 0bal_flag is a char I cannot use it directly in a formula....
Thanks
Gaurav

Hi Gaurav,
Create a replacement path formula variable on the 0bal_flag with evaluate as boolean checked, you will get the values 1 when flag is X and 0 when the flag is initial, now you can use this 'formula variable' in the formula
((0bal_flag==1)balance)+((0bal_flag==0)(debit-credit))
hope this helps,
Rk.

Similar Messages

  • Tcode to find the fields ,tables based on description of fields

    hi folks,
    tcode to find the fields ,tables based on description of fields,POINTS  will be awarded for the answers ,plz give reply.

    Hello Kumar
    Table DD03T contains the field descriptions.
    Regards
      Uwe

  • Urgent!!Average calculation based on a characteristic!

    Hi guys
      I have an average calculation based on a characteritic ..
    Example:
       This is a SRM Mgmt.It has an Organisation purchasing org,source purchase,PR,etc..
    Report is a Survey rpt.
    Average Score across Customer responded for each question for the particular PR...
    Where weightage is applied for each question & based on which
                            total weightage of all Qns for a PR
      Avg.Score=     -
                                No of Questions.
    How do u calculate using the exception aggregation??????????Pls revert ASAP.
    thnx
    BI Learner

    Solving Myself

  • Refresh a query driven list based on a search field

    I have a text field in a control block that I am using as a search criteria.
    I have another list whose source query is based on the previously mentioned text field's value.
    As I am typing in the text field, I want the list to update based on what I have typed.
    For example, as I type ORACLE, the list would show all O records, then OR records, then ORA records, then ORAC records, and so on and so on.
    I have been unable to find when/where the trigger exists that will allow me to do this.
    Can anyone help?

    Hello nameless,
    first: do not use timers, because they have a negative influence on the performance.
    use a pre-query trigger in which you check the value of your text field. In this trigger you can set the block property WHERE of the block to be queried like: "column_name LIKE '%'||:block_name.item_name||'%'
    with this all records containing the text in your text item will be shown. You could also add a radio button with three values: Starts with, Contains, Ends with. When you implement the functionality like this, the USER controls what happens and not the programme.
    greetz,
    Hans

  • Set lookup field value based on another lookup field using Infopath 2010 rules

    Hello,
    I created 3 lists in SharePoint 2010: Lists A, B and C. The lists B and C where create to work as a drop-down fields in List A. My question: How to I set field C automatically based on what is selected on field B using Rules in Infopath 2010?
    I don't know what to put in the third field:
    Thanks,
    Elvis

    It looks like you edited the question since you first asked it. When I posted my first answer, there were no screenshots in your question and it was not easy to figure out what you want to achieve.
    I asked for clarification. You did not reply to my post.
    Instead it seems that you edited your question and added more detail. This is good, because it helps people to understand what you are asking.
    But when you change a post (YOUR QUESTION) that others have already replied to, you must acknowledge these replies and let people know that you are posting new information.
    In this forum, people get emails when there are new replies to a question. That's how I found back to this thread. I do not get an email if you edit your question to add more information. 
    So, don't be surprised if you edit your question and people still don't respond. The people why have already replied to your question will not be notified if you make changes to your original question. 
    If you want to make sure that everybody who is interested in your question gets notified about new information, please add the information in a new comment to the question, or edit the question and then post a new comment "I added more details".
    This way, everybody already subscribed to your question will be notified about the new content and can help you find a solution. 
    cheers, teylyn

  • How to show valid field items based on previous selected field

    I am trying to use BC Web Apps to help my customers find products for their specific motor vehicle.
    By selecting the vehicle make and then the model. e.g. Chevrolet and then Camaro.
    This will then bring up a table with all the cosponsoring equipment part numbers.
    At the moment the closest I can get is two dropdown lists one with all the vehicle makes and another with every vehicle model.
    If I select Chevrolet I only want to see Chevrolet models in the dropdown list.

    Hi 2932464,
    2932464 wrote:
    Hi,
    I have a set of text Field items in oracle apex:
    Order Number
    Revision Number
    When we open the report, revision should be hidden.
    Only when the user enters unique order number (non-duplicate order numbers), revision number should be visible.
    If he enters duplicate order number, revision number should be hidden.
    Please help.
    Giving you example how to achieve this.
    Step 1. Create three Page Items
        1) P1_ORDER_NO - Text Field
        2) P1_REVISION_NO - Text Field
        3) P1_ENABLE_DISABLE_REVNO  - Hidden,Value Protected - No
    2. Create 3 Dynamic Actions
    1) Disable revision number on page load
        Event - Page Load
        Action - Disable
        Fire When Event Result Is  - True
        Selection Type - Item
        Item - P1_REVISION_NO
      2) Check duplicate order number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ORDER_NO
        Condition - is not null
        Action - Execute PL/SQL Code
        Generate opposite false action - Unchecked
        Fire When Event Result Is  - True
        Fire on page load - Unchecked
        Stop Execution On Error - Checked
        Wait for Result - Checked
        PL/SQL Code -
    declare
    l_count number;
    begin
      select count(*) into l_count
        from emp
       where empno = :P1_ORDER_NO;
    if l_count > 0 then
      :P1_ENABLE_DISABLE_REVNO := 1;
    else
      :P1_ENABLE_DISABLE_REVNO := 0;
    end if;
    end;
    Page Items to Submit = P1_ORDER_NO
    Page Items to Return  = P1_ENABLE_DISABLE_REVNO
    3 ) Enable and Disable Revision Number
        Event - Change
        Selection Type - Item(s)
        Item(s) - P1_ENABLE_DISABLE_REVNO
       condition - greater than or equal to
       value  - 1
       Action - Disable
       Fire on Page Laod - Unchecked
       Generate opposite false action - checked
       Selection Type = Item(s)
       Item(s) - P1_REVISION_NO
    Hope this helps you,
    Regards,
    Jitendra
    DER_NO

  • Query! calculation based on previous row value

    Hi,
    ID     Code     Direction     From Amount  To Perct      To Amount
    98     POI     F          5457.00          0     
    77     LKJ     T          0          50      (5457*(50/100))
    56     MNB     T          0          25      (5457*(25/100))How to calculate 'To Amount' with in the select query? To Amount will be calculated on the basis of
    From Amount of the First row multiplied by 'To Perct'
    When I wrote a select statement it's taking 0 as 'From Amount'( Because it's in current row) and giving me 0 as 'To Amount'
    Thanks

    One possibility:
    with t as (
    select 98 id,     'POI' Code,     'F' Direction, 5457.00 FromAmount,          0 ToPerct from dual     union all
    select 77,     'LKJ',     'T',          0,          50 from dual     union all
    select 56,     'MNB',     'T',          0,          25 from dual)
    select id, code, direction, FromAmount, ToPerct,
           (tmax.MaxAmount)*(ToPerct/100) ToAmount 
    from t,
         (select max(FromAmount) MaxAmount from t) tmax ;Results:
            ID COD D FROMAMOUNT    TOPERCT   TOAMOUNT
            98 POI F       5457          0          0
            77 LKJ T          0         50     2728,5
            56 MNB T          0         25    1364,25Regards,
    Miguel

  • From line item text field in Fi not posted to COPA characteristic field?

    How do you create the link from the Line item Text field in FI to a characteristic field in COPA?
    I tried to create a characteristic field Text. from the domain VBELN in COPA.
    Although I can post from CRM the contract number to the Line itemText field in FI posting,
    I can't get this contract number to post to a characteristic field in COPA.
    Thanks,
    Sony

    program a bdc to tcode fb09
    A.

  • Query for Auto Calculation based on input of 2 Fields

    Hi,
    I would like to write a sql query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Order.
    For example. A query on Sales Order where I have Item 040634 (Code for a Flower) and Quantity 200.
    I have a UDF (Bunching) where the value is 10, 15 or 20.
    Based on the Bunching the result should be given in another UDF (Noofsleeves).
    (Quantity) 200 / (Bunching) 10 = 10 (Noofsleeves)
    The Order will be having multiple items where the Bunching can differ for each item.
    Is it also possible to remove the calculated noofSleeves from Inventory.
    I am using 2007A SP01 PL05

    Hi ,
    You may try this: Apply this fms on other udf and auto refresh on the udf mentioned in the query (in your case Bunching).
    SELECT $[RDR1.Quantity.number] / $[RDR1.U_UDF.number]
    You may check these too.
    cALCULATION OF udf ON UNIT PRICE
    FMS
    Thanks,
    joseph
    Edited by: Joseph Antony on Jul 8, 2010 12:31 PM

  • What is the field " Consumption based calculations " in EC 3.0

    Hi,
    In the consumptions tab page of a facility, what is the importance of the field " Consumption based calculations ". Please explain step by step procedure to make use of it instead of providing links
    Thanks in advance
    Srinivas

    Hello Srinivasa,
    Consumptions are time dependent consumption information for a facility object like coal consumption.
    Consumption based calculation is used to calculate Emissions quantities based on amount of materials consumed.
    Consumption based calculations are defined in calculation manater and are assigned in tab Consumption material.
    For simple example without any major parameters emissions if you want to calculate sulfur dioxide emissions =
    Sulfur dioxide) in defined unit =  Consumptions * EF
    If you want to enter detailed equations taking into consideration facility parameters like temperature, control efficiency then you consumption based quations includes all such parameters
    The field you are referrring here - "consumption based calculation" - is automatically populated, based on material - consumption based equation assignment in tab Consumption materials.
    Thanks
    Jayakumar

  • Total calculation based on unit price and UDF field values

    Hi All,
    This is for a construction related company. Please find attached screen shot for details.
    My scenario is when we are creating sales order my client wants to calculate the total amount based on unit price towards the UDF fields defined. For example user will give the unit price  per sqft in Unit price ie 2800 as per screen shot column and constructed area in Sqft in he will enter the area like cons area in sqft =1500. So this 1500 need to calculate with unit price and will display in total. So in Total field it should show like 2800*1500= result. Like wise other amount values in udf needs to be calculated and displayed in total field  .
    Is this possible in SAP B1. Please help me with your valuable suggestions.

    Hi,
    Try this:
    SELECT ($[$38.U_Price.number]* $[ORDR.U_CArea.number)+ $[ORDR.U_EBexp.number]+ $[ORDR.U_RO.number]+ $[ORDR.U_Maintenance.number]+ $[ORDR.U_CorpFund.number]
    Thanks & Regards,
    Nagarajan

  • Field calculation doesn't auto update

    Hello -
    I have a complicated PDF Form that has several pages of fields that are totaled and averaged on the last page. I'm using Acrobat X on the Mac.
    Basically, on the last page there are 2 subtotal fields that are calculated based on other (direct-entry) numeric fields in the document. Those 2 SUBTOTAL fields update automatically when I change the direct-entry fields. So far so good.
    But, then I have a FINAL AVERAGE field that is supposed to average the two subtotals. But when I update one of the direct-entry values, the subtotals update but the final average does not.
    Here's where it gets screwy:
    If I try to manually enter a valid number (validation is OK from 0-3) in one of the SUBTOTALs, the subtotal does not change but this forces the FINAL AVERAGE field to update correctly.
    If I try to manually enter an invalid # (such as 5) in either of the 2 SUBTOTAL fields Acrobat won't let me enter that number, but it WILL recalculate the final average using that number and give me the wrong answer.
    I have tried locking the fields, turning validation on and off, but neither has any effect.
    I'm using the AVERAGE calculation function. I wonder if the problem is that I'm averaging a field that is itself using the Average calculation.
    There are only 2 fields being averaged. I could just add them and divide by 2, but that is not an option in the field calculation, unless I write a javascript, which I haven't learned how to do yet. So, I can't tell whether that would fix the problem. Is there a way to write a custom calculation formula other than using javascript?
    Thanks for any help you can give!

    The field calculation order is most likely not correct. You just have to set the order to whatever makes sense for your form.
    To do this in Acrobat 10, go to form editing mode (Tools > Forms > Edit) , and then select: Tasks > Other Tasks > Edit Fields > Set Field Calculation Order

  • Question on populating a field based on 2 other fields

    Hi,
    I am looking for a solution wherein I need to populate a field (say no of days) based on the other two fields selected by the user (say date from and date to). As soon as user selects the value on "date to" field, "no of days" field should be auto-populated as the value from "date to - date from". I have tried using setter and getter methods on all three field, set valuechangelistener on date to field, set auto submit to true and in the valuechangelistener event code, I am doing the calculations as mentioned in the below snippet.
    public void onChangeDateTo(ValueChangeEvent evt){
    this.dtDateTo= (java.util.Date)evt.getNewValue();
    this.dtDateFrom = (java.util.Date)getDateFrom();//This is the getter method for date from field
    System.out.println("onChangeDateTo "+ this.dtDateFrom+":"+this.dtDateTo);
    if (evt.getNewValue() != null){
    int intCalcNoOfDays = DateHelper.getBusinessDaysCount(this.getDateFrom(),this.getDateTo()) + 1;// my custom class which does the calculation
    String strCalcNoOfDays = String.valueOf(intCalcNoOfDays);
    System.out.println("strCalcNoOfDays "+strCalcNoOfDays);
    this.setNoOfDays(strCalcNoOfDays);
    I am getting NullPointerException while getting the value for date from (this.dtDateFrom). I have tried other approaches like attaching a binding to date from field, passing attributes etc but no luck. Can someone assist me in achieving this? Basically I need to populate one field automatically based on values entered on two other fields whenever tab event/user selects value on second field AND it shouldn't fire any other validations on the form (basically partial trigger).
    Thanks very much for the help in advance.
    Thanks
    Shree

    Thanks Lilly.
    I don't have a backing bean associated with the page. I have managed bean instead. JSF source code snippet below
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:h="http://java.sun.com/jsf/html">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="LMS" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:panelStretchLayout id="psl1" startWidth="160px">
    <f:facet name="top">
    <af:panelGroupLayout id="pgl1" layout="vertical" halign="center">
    <af:panelFormLayout id="pfl1" rows="1" maxColumns="1">
    <af:outputText value="LMS" id="ot1"
    inlineStyle="color:Blue; font-family:'Times New Roman', 'Arial Black', times, Serif; font-size:175%; font-weight:bold; text-align:center;"/>
    </af:panelFormLayout>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="bottom">
    <af:panelGroupLayout id="pgl2"/>
    </f:facet>
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll" id="pgl4">
    <af:outputText value="Dashboard" id="ot6"
    inlineStyle="color:Green; font-size:150%; font-family:'Times New Roman', 'Arial Black', times, Serif; font-weight:bold; text-align:center;"
    visible='#{clickActionHandlerBean.clickLink== "HOME"}'/>
    <af:spacer width="10" height="10" id="s1"
    visible='#{clickActionHandlerBean.clickLink== "HOME"}'/>
    <af:spacer width="10" height="25" id="s5"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'/>
    <af:panelFormLayout id="pfl2" rows="1" maxColumns="1"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'>
    <af:selectOneChoice label="Type" id="soc1" showRequired="true"
    immediate="true" value="#{bean1.type}">
    <af:selectItem label="X1" value="X1" id="si1"/>
    <af:selectItem label="X2" value="X2 id="si2"/>
    <af:selectItem label="X3" value="X3" id="si3"/>
    <af:selectItem label="X4 value="X4" id="si4"/>
    </af:selectOneChoice>
    </af:panelFormLayout>
    <af:panelFormLayout id="pfl3" rows="1" maxColumns="3"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'>
    <af:inputDate label=" Date From" id="id1"
    rendered='true'
    showRequired="true" inlineStyle="vertical-align:baseline;"
    value="#{bean1.dateFrom}">
    <af:convertDateTime pattern="dd-MMM-yyyy" secondaryPattern="MM/dd/yyyy"/>
    </af:inputDate>
    <af:inputDate label="Date To" id="id2"
    rendered='true'
    showRequired="true" value="#{bean1.dateTo}" partialTriggers="it1"
    valueChangeListener="#{bean1.onChangeDateTo}"
    autoSubmit="true">
    <af:convertDateTime pattern="dd-MMM-yyyy" secondaryPattern="MM/dd/yyyy"/>
    </af:inputDate>
    <af:inputText label="No of Days" id="it1" columns="7" showRequired="true"
    rendered="true" value="#{bean1.noOfDays}" maximumLength="2">
    <af:validateRegExp pattern="[0-9]{1,10}"
    messageDetailNoMatch="No of days can have only numbers"/>
    </af:inputText>
    </af:panelFormLayout>
    <af:spacer width="10" height="50" id="s6"/>
    <af:group id="g1">
    <af:spacer width="250" height="10" id="s7"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'/>
    <af:commandButton text="Save" id="cb1" partialSubmit="true" blocking="false"
    immediate="false"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'
    actionListener="#{bean1.ApplyButtonClicked}">
    </af:commandButton>
    <af:spacer width="20" height="10" id="s8"/>
    <af:commandButton text="Cancel" id="cb2"
    visible='#{clickActionHandlerBean.clickLink=="APPLY"}'/>
    </af:group>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="start">
    <af:panelGroupLayout id="pgl3" halign="left">
    <p>
    <af:outputText value="#{userinfo.userInfo.firstName}" id="otWel"
    inlineStyle="color:Maroon;" rendered="false"/>
    </p>
    <af:spacer width="1" height="50" id="s2"/>
    <p>
    <af:commandLink text="Home" id="glHome" action="#{clickActionHandlerBean.showHomeRN}"/>
    </p>
    <p>
    <af:commandLink text="Apply" id="glApply"
    action="#{clickActionHandlerBean.showApplyRN}"/>
    </p>
    </af:panelGroupLayout>
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Thanks
    Shree

  • How to calcluate a filed based on two other fields after TABING out.

    Hi,
    I need my third field be calculated based on the previous two fields after tabing out from each field.
    Price Quantity Amount
    12 10 120
    Both price and Quantity is text box and amount is readonly.I want if I change Price from 12 to 15 and tab out then amount should automatically get changed to 150.
    Regards,
    Prakash

    I believe you can use Partial Page Rendering (PPR) to accomplish this. You'd place a 'firePartialAction' event on the input field. This event would fire when you tab out and then you can invoke controlelr logic to set the other two fields appropriately.
    Check out the OA Framework Developer's Guide for examples.

  • How to create dynamic ed flash charts based on user selected fields in Orac

    Hi all,
    Can any of the experts please tellme "how to create dynamic ed flash charts based on user selected fields in Oracle apex".
    Thanks
    Manish

    Hello,
    Lots of different ways to do this, I blogged about one way (using a Pipelined function) here -
    http://jes.blogs.shellprompt.net/2006/05/25/generic-charting-in-application-express/
    Other options include using a PL/SQL function returning the string to use as the dynamic query etc.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Maybe you are looking for