How to calculate value based on two fields & set that 3rd on (KFFfields)

Hello Gurus,
I have a requirement customization in which, in an OAF page, tableLayout: (HrSitKeyFlex) having 3 fields 1)Days of Trainging 2)No of days Trainging hours 3)Total Duration when user enter the values for two fields say 'Days of Trainging' and "No of days Trainging hours "and immediately on tab out, the 3rd field should be popluated as rate*Toatal'.
tableLayout: (HrSitKeyFlex)
1)Days of Trainging ( 1DAY)
2)No of days Trainging hours (4Hours)
3)Total Duration (calculate 1*4=8)
Is there a way, we could capture the tab out event? Or any way we could achieve this?
This is really urgent.
If anyone can help.
Regards,
Srini

Hello,
1. Firstly set the fire partial event of 2nd column field.
2. Capture the event in PFR method.
3. After Capturing event, make a row reference object.
4 Now store the value of 1st column field and 2nd column field in variable.
eg. String str= row.getAttribute("Ist Column Name")+"" and String str1= row.getAttribute("2nd Column Name")+""
5.Convert these string value into integer
eg. int x=Integer.parseInt(str); and int y=Integer.parseInt(str1)
6. calculate the value in the integer variable on the basic of these two value
eg. int z = x*y
7 Assign the value to 3rd column after converting it into string
eg. row.setAttribute("3rd Column Name", string variable);
when u tab out from 2nd column, the calculating value will be assign to 3rd column.
Regards,
Manish Chawla
Edited by: ManishC on Dec 17, 2012 10:36 AM

Similar Messages

  • How to calculate value based on two fields & set that on the 3rd (in table)

    Hi OAF Gururs
    I have a requirement in which, in an OAF page, the user can add a row in an advanced table and they enter
    the values for two fields say 'rate' and 'entered amt' and immediately on tab out, the 3rd field should be popluated as rate*entered amt.
    Is there a way, we could capture the tab out event? Or any way we could achieve this?
    This is really urgent.
    If anyone can help.
    Thanks!
    AJ

    OAF gurus hang out over in {forum:id=210}

  • CFM /TR - how system calculate amount based on rate FX 60A

    Hi all,
    i need to know how system calculates amount based on rate entered upon creating a contract (t-code TX01).
    steps input:-
    1. header - comp code, product type, trans type
    2. partner
    3. purchase curr & amount (eg. IDR 8,345,545,500)
    4. sale currency only (amount system will auto calculate) USD
    5. rate field = 11.553
    6. spot rate will auto pick up from rate
    7. value date
    8. contract date
    upon TBB1 no error. posting log as follows:-
    FX1000+ : 40 8,345,545,500 IDR bank GL acc
                    50 8,345,545,500 IDR clearing acc
    FX2000- : 40 722370.42 USD clearing acc
                   50 722370.42 USD bank GL acc
    but upon TPM18 error occurred as follows:
    DBT_C009 - GL not maintain in acc symbol 5.3.4
    DBT_E039 - no posting spec assigned to update type
    DBT_B018 : 40 0 USD, 431,977,511 IDR gain/loss
                       50 0 USD, 431,977,511 IDR clearing acc
    so, after maintained DBT_C009 as follows still error for DBT_E039:
    40  0 USD, 38 IDR clearing acc
    50  0 USD, 38 IDR P&L gl acc
    what i don't understand is how system calculate and get DBT_C009 & DBTE039.
    what is the function of TPM18?
    thanks.

    Hello Prarnod,
    I have done the first node only for actuals that come from the integration to the internal order.
    I have tried setting up 2 and 3 even though the 3rd one does not make any sense to me
    Thanks,
    Paul

  • How to populate values for a new field in target infoprovider

    Hi Experts,
    am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case,  i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
    Thank you,
    Chitra.
    Edited by: Chitra_BI on Jun 13, 2011 10:23 AM

    Debug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
    Regards,
    Lalit Mohan Gupta.

  • How to prepopulate value in webapps input fields or for any custom fields in for any other forms?

    How to prepopulate value in webapps input fields or for any custom fields in for any other forms?

    What do you want to populate the form with?

  • How to create value request for screen field text box tt1

    How to create value request for screen field text box tt1
    i have a text box name tt1,
    i want f4 help for that .
    remember i am asking for screen i.e done from screen layout not selectio-screen.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla,

    Hi,
    Create one Search Help in the SE11 for the particular Field that u want to display. In the Screen(Transaction SE51),For that Text Box in the Attributes,in Dict Tab ->Search Help Field give that Search Help Name.
    For Eg,
    If u want Purchase Order Numbers in that F4 Help.Create one <b>Search Help</b> by giving Table Name as <b>EKKO</b> & <b>Search Help Parameter</b> as <b>EBELN</b> with Lpos & Rpos as 0 & 1.Save & Activate it.
    Give this Search Help Name in Dict Tab ->Search Help Field of that Screen Attributes.
    Regards,
    Padmam.

  • HT4061 How do I consolidate purchases from two different ids that are on the same bank account, and eliminate the extra id without losing any purchases?

    How do I consolidate purchases from two different ids that are on the same bank account, and eliminate the extra id without losing any purchases? I want my music to match on both ipad and computer.

    Purchases are forever tied to the AppleID they were bought with. There is currently no way to consolidate AppleIDs. Sorry.

  • Calculate difference in value based on two date parameters

    Hi All,
    I have a table and need to calculate the difference in rent amount for a property based on two date parameters.
    I have uploaded sample data here:
    https://app.box.com/s/pu8oa4f3jhrhm0ylshdz2fuo7541vn4z
    Thanks
    Jag

    Hi jaggy99,
    Do you have the knowledge of
    Excel Add-In? If you don't have knowledge of C#/VB.NET language and Visual Studio, I don't think Excel Add-In is what you want. As I said previously, your problem is totally about the business logic, we don't provide solution for a complete requirement.
    Based on your sample data, I think VBA code is suitable.
    If you're not familiar with VBA, please take a look at the MSDN documents for scratch:
    Getting Started with VBA in Excel 2010
    The steps should be like this:
    1. Sort all the records by [Rent Change Date] field
    2. Loop throuth the records and find the FromDate and ToDate as well as the corresponding [Rent Charged] field
    3. Calculate the difference and save the data into a new range
    It's not so hard, please have a try, if you encounter any development problems, you can post in this forum.
    Thanks.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to default the KFF segment values based on other field's value

    Hi,
    I would need to reset the 5th segment value of "Liability Account" field on R12 Supplier Page under "Accounting" link.
    Condition: And it has to be based on some other value like "GLOBAL CONTEXT VALUE and TaxPayer ID Type" under "Organization" link.
    Right now; as per the seeded page it defaults the Liability Account to "BL-130-0000-2110-0000-0000" under accounting link; I need to change this default value to "BL-130-0000-2110-2641-0000" based on above condition.
    I have tried using the below code:
    OAKeyFlexBean oakeyflexbean = (OAKeyFlexBean)oawebbean.findIndexedChildRecursive("LiabilityFlex");
    oakeyflexbean.setText()
    But this one does not work.
    Can anyone suggest me some option to acheive this requirement.
    Thanks
    Edited by: 880860 on May 21, 2012 2:23 PM

    Hi everyone,
    Any thoughts? any help is appreciated...
    Thanks

  • Trying to calculate value based on rounding up and then calculate date range excluding weekends..

    Hi
    I am creating a simple design studion project request form where the user can enter how many photographs need to be ordered. I am calling this field 'NumImages'. Then once the data is entered, another field (I am calling this NumDaysImage) will be calculated based on the fact that no more than 5 photographs can be shot per day. So, 1-5  photos = 1 day. 6-10 photos = 2 days. 11-15 photos = 3 days etc. I do not need to calculate part days, so 6 photos is the same as 10 i.e. 2 days.
    Once I have calcuated 'NumDaysImage', I then need to calculate an end date called 'DateDue'. The start date is entered by the user in the field 'DateStart'.
    I know this is not going to be easy, but how can I calculate 'DateDue' based on a Mon-Fri working week, and ideally excluding UK public holidays?
    Also on the form is a value 'NumDays' that is the number of days for designing the brochure for the photos. This value I have calculated already, but it will need to be added to 'NumDaysImage' to get a total number of production days that is then used to calculate 'DateDue'.
    Any help will be greatly appreciated. Thanks.

    JavaScript has the Math.ceil method which rounds up a number to the next integer if it is not an integer.
    Dates are more complicated calculation as the starting date needs to be converted to a number and then one can calculate the ending date and test that date to see if is a Sunday or Saturday. Do intervening weekends add to the number of days for processing.

  • SSRS - How to calculate porcent on the same fields

    Hi,
    I have a problem with my Report 
    I have a table like this:
    Description | Mounth
    [Description] | Sum(Valeur
    Pourcent | WHAT I NEED
    When i execute this on my web portal, i have this result:
    Description | January | February | March ...
    Desc 1        | 400       |   500       |   700 ...
    Desc 2        | 325      |   452        | 658
    Porcent       |              |                |
    I don't now how to calculate %. 
    For January i want to do 474/413, for february 1534/1457.
    But i dont know what i need to do in my tablix, in the cell "[WHAT I NEED]" to do this...
    Can you help me.
    SOrry for my bad english.
    Thanks for your help.
    Flo

    Hi sbenett,
    According to your description, you have  two rows in your matrix. Now you want the value in the second row divide the value in the first row. Right?
    In this scenario, since you only have tow rows in your matrix, we just need use the last value divide the previous values in the column group. So we can insert a row outside of group (row group), try the following expression in the cell: =last(Fields!column.Value)/first(Fields!column.Value)
    We have test this scenario in our local environment. Here are screenshots for your reference:
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to calculate the difference of two totals which are of the same group?

    Post Author: mingli
    CA Forum: Formula
    Hello,
    I have an existing report which has a group defined. The group generates two set of data, at the footer of each set of data, the total is calcuated. Now I need to calculate the difference between the totals. For example:
                             value
    set 1
          item 1         100
          item 2         200
          item 3        300
    set 1 total         600
    set 2
         item 1         200
         item 2          20
         item 3        300
         item 4         40
    set 2 total       560
    difference       40
    My question is: how can I do this? I'm thinking about create a formula. But the problem is, these two totals have the same field name. Could someone help me out?
    Thanks.

    Post Author: deejayw
    CA Forum: Formula
    Hi,I have a similar type of query...my Sets only ever contain two entries but there is an unknown number of sets.                        value
    set 1
          item 1         100
          item 2         200
    difference (item2 - item1) =   100
    set 2
         item 1         200
         item 2          20difference (item2 - item1) =    -180
    Set 3, Set 4, etc, etc I need to figure out how to calculate the "difference (item2 - item1)" total above. I am really confused by this and need assistance. Many thanks. 

  • How to get values of selection screen fields in the POV event

    I have two radio buttons r1,r2 and a field file_name on  selection screen.
    I have written At selection screen on value-request for the field file_name. Based on the selection of radio buttons I have to display different screens when f4 for field_name is pressed.
    Unfortunately the values of r1 or r2 are not populated in the AT selection screen on value-request event.
    Can any one tell me if there is a way to obtain the values of r1 or r2 in the AT selection  screen on value-request event.

    Hi..
    Try out this.
    REPORT  ZH_TEST4                                .
    CONSTANTS : c_x                TYPE char01 VALUE 'X',
                c_rg1(4)        TYPE c      VALUE 'RG1',
                c_gr2(3)        TYPE c      VALUE 'GR2',
                c_gr3(3)        TYPE c      VALUE 'GR3',
                c_zero          TYPE n      VALUE '0',
                c_neg(2)        TYPE c      VALUE '-1'.
    data: w_sscrfields_ucomm1   TYPE sscrfields-ucomm.
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS       : p_back   RADIOBUTTON GROUP rg1
                                     USER-COMMAND pc,
                       p_fore   RADIOBUTTON GROUP rg1
                                          DEFAULT 'X'.
    SELECTION-SCREEN : END OF BLOCK blk1.
    SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS : p_phif LIKE rlgrap-filename  MODIF ID gr2,
                 p_ahif LIKE rlgrap-filename  MODIF ID gr3.
    SELECTION-SCREEN : END OF BLOCK blk2.
    AT SELECTION-SCREEN OUTPUT.
      IF p_fore EQ c_x.
        w_sscrfields_ucomm1 = c_rg1.
      ELSE.
        w_sscrfields_ucomm1 = space.
      ENDIF.
      LOOP AT SCREEN.
        IF w_sscrfields_ucomm1 EQ space.
          IF screen-group1 = c_gr2.
            screen-active = c_zero.
          ENDIF.
        ELSE.
          IF screen-group1 = c_gr3.
            screen-active = c_zero.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    also try out function module POPUP_WITH_TABLE_DISPLAY.
    Plz reward points if this helps by clicking on star!1
    Good Luck!!
    Cheers,
    Rajeev

  • Changing a boolean value based on two buttons

    I know that this is a ridiculously simple question, but I've been having trouble with it.
    How would you set a boolean value based on the input from two other boolean values? Essentially what I want, in pseudocode, is this:
    boolA = true
    if (boolB)
         boolA = false
    if (boolC)
         boolA = true
    It should be really simple to do, but I can't figure it out. The problem is getting it to stay false, for example, after boolB goes back to false, and not just to have it only momentarily go to false. I want it to stay false until boolC goes to true, regardless of what boolB does after that. Any advice?
    Thanks,
    Logan Williams

    I would say implies is close to what was asked for.  However, the only issue is that for the case where both B and C are false, the logic shows that there is no change to A.  It is initially True, but if it happens to be False because of further changes, there is nothing in the If statements to change the logic.  And that is what is asked for.  That the Result stays False even when B goes back to False.  But the Implies function says that  F and F must be True.
    As described
    B         C         Result A
    T          T          T (because C is evaluated 2nd)
    T          F          F
    F          T          T
    F          F          x (initially T, but the code shown and what is asked for is actually no change from previous state)
       Implies Truth Table
    B         C         Result A
    T          T          T
    T          F          F
    F          T          T
    F          F          T

  • How to display value based on LOV selection

    Hi,
    I have an editable table. On create operation one of the field is LOV, based on LOV selection the next field should be auto populated, please help me how to achive this.
    Thanks,

    Thanks for your reply........
    I did all these to get value based on LOV selection, but my problem is when i am trying to create a new record then everthing is working fine but normal search i am not getting the value of that attribute.
    below is my code
    Page:
    <af:column sortProperty="ProcessType" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    id="c36" width="340px;">
    <af:inputComboboxListOfValues id="processTypeId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    value="#{row.bindings.ProcessType.inputValue}"
    model="#{row.bindings.ProcessType.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.ProcessType.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.ProcessType.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.ProcessType.tooltip}" inlineStyle="width:800px;"
    valueChangeListener="#{backingBeanScope.backing_app_CalcSchedules.weeklyDescription}"
    autoSubmit="true" >
    <!-- <f:validator binding="#{row.bindings.ProcessType.validator}"/>-->
    </af:inputComboboxListOfValues>
    </af:column>
    <!--value="#{row.bindings.Description.inputValue}" backingBeanScope.backing_app_CalcSchedules.description-->//If i use this value in the below property line then i am not getting value while creating time but if i done blind search then i am not getting any value in this field.
    <af:column sortProperty="Description" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.Description.label}"
    id="c35" width="390px;">
    <af:inputComboboxListOfValues id="descriptionId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.Description.label}"
    value="#{row.bindings.Description.inputValue}"
    model="#{row.bindings.Description.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.Description.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.Description.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.Description.tooltip}" inlineStyle="width:1000px;"
    readOnly="true" partialTriggers="processTypeId">
    <f:validator binding="#{row.bindings.Description.validator}"/>
    </af:inputComboboxListOfValues>
    </af:column>

Maybe you are looking for

  • Memory upgrade on Equium L20

    I recieved an Equium L20 as a gift last year. Pretty much a month after getting it going, it has been very, very sluggish. It turns out it was sold to me with only 256Meg RAM - not even enough for XP to perform!! I'm based out in the states now, and

  • Looking for some kind of Docking Bar...

    I am not exactly sure what to call the item I am looking for, I can only describe it. I need some kind of small bar to just keep all my coords and wires plugged in at home at my desk so that when i come home I can just slap the bar on the side of my

  • How To Center Fluid Grid Layout Div Tag

    Hello I am remaking my webiste and am new to fluid grid layouts. I am trying to center the images you will see in my website into the middle. I can use pixels to center it but it will not be centered for all screen resolutions. What do I have to chan

  • Transfer data from a Pop up to the main view

    Dear expert, i want to transfer data from a popup to the main view, i created a TEXT_EDIT UI-Element on my main View and on a popup, and when writing a text on the TEXT_EDIT UI-element on the popup, i want get it (or display it) on the TEXT_EDIT UI-E

  • I need a link to update Firefox 8 please!

    A reminder came on screen that Firefox 8 was available and I was too slow to click on this. Now when I start up laptop, the request to do this doesn't come on until I have already opened up Firefox....then it says it can't do it as I already have Fir