Efficemcy question: Add a field or use a function

I have a table with information about employees. Each empl receives a salary and I need to show the cumulated salaries over a period of time - for every employee.
so imagine this, every time you ignite the program you see a list of empls (100+) and their cumulated salaries.
Question: Should I add a column cumulatedSalary to the table (and every time an empl recieves a salary - add it to the comulted field) or simply to use the SQL aggregate function to sum up all empl's salary.
What is more efficient?

Keep a table of employee information including their id.
Keep a separate table with the minimum of the employee id, salary paid and the date of the check was issued.
When you want to show the employee�s salary sum the records over the date range applicable. Use a join and compute the sum at the database level.
Efficiency should only be one of your concerns.
rykk

Similar Messages

  • My wife and I have a family account at Verizon and are thinking of getting the IPhone 4S.  My question is can we both use the functions of Icloud on the same account at Verizon or do we have to have separate accounts to be able to use all the features

    My wife and I have a family account at Verizon and are thinking of both getting the IPhone 4S.  My question is can we both use all of the features of Icloud with one account at Verizon or do we need to have separate accounts?

    If Mail in Mavericks is the same as earlier versions you can select accounts in the sidebar, so that you can either display the inboxes for individual accounts, or the contents of all the account inboxes. (If the accounts don't show click the disclosure triangle next to 'INBOX'). The layout may have changed since the version I have - Snow Leopard - but you should be able to do the same thing.

  • How to add warning message while using 'print' function in Adobe LiveCycle Designer

    I am trying to make pdf document for my company which requires adding a warning message while anyone use 'print' function from the page...
    Does anyone know how to add warning message on LiveCycle Designer
    Also my supervisor mentioned something using 'nag' if that rings any bell

    No you shoudl never go into the XML source unless uinstricted to do so.
    You can open the script editor (under the window menu). It will appear above the drawing area but below the toolbars. You can resize it if there is not enough room. When you click on an object in the form you can choose an event to script against in the Show dropdown. In your case you will want to choose the prePrint event. A line will show up that indicates the object that is associated with the script as well as the event and other information. Add your script below this line. Once that is done you are finished and your form is ready for testing.
    Paul

  • Subtotal issue when subtotaling on a calc field built using CASE function

    Okay, I hpe I can explain this well. May be possible that this is something cannot handle in Discoverer. I am using Discoverer Plus to develop a new workbook - cross project expenditure inquiry. A requirement is to not allow a worksheet user to see labor cost (since possible to figure out someone's salary) amount unless they are allowed to view labor cost. I have a function that returns a Y/N value that tells me if they can view labor cost. That works out just fine. So what I am doing is taking my database cost column (which is defined as Number(22,5) in the Oracle table. I create a new calculated column, basically like this -
    CASE WHEN expenditure type <> LABOR THEN cost WHEN view labor cost = 'Y' THEN cost ELSE NULL END.
    That calculated column is working just fine. I am seeing my desired results in that column. Okay so far.
    Next, the users want subtotals by project organization and project. So I created a new total. When I did that, my subtotal row amount is blank.
    Okay, I have seen this happen with NULLS before. Like in the gl_je_lines tables, where the accounted_Dr and accounted_Cr may be null, and have to do a NVL function to convert the null to 0 and allow me to subtotal on the column in a Discoverer workbook.
    So I tried creating a second calculation -
    NVL(Cost,0)
    So I return the cost if not null, otherwise I return 0. Second calc column results look okay.
    Now I did a subtotal on the second calculation. Oops. Wrong result. Amount is shown as 0.
    For grins, I went back to my CASE statement on my first calculation and changed the ELSE condtion from NULL to 0. When I did that, the subtotal on that column changes from a blank (Null) value to a 0 value. Well, better, but still just like my second calculation subtotal.
    Obviously the users have the option to export to Excel and subtotal in Excel.
    Does anyone know of a way to get a good subtotal in this kind of situation, where I am attempting to subtotal on a calculated field that is built on a CASE function? Or am I out of luck when it comes to Discoverer?
    John Dickey

    Okay, I did find a workaround, though I do not understand why the workaround works, but why the way I first tried to get a subtotal did not work. What I did is that I had to go to Discoverer Administrator. I picked my folder and did an Insert/Item. I created my new item building the same CASE statement that I used in my worksheet to create a new calculation. I then closed Discoverer Plus and reopened Discoverer Plus. Opened my worksheet. Edited the worksheet and brought in my new (derived) item from my folder. Then I created my subtotals for this secured cost amount. Voila. I get a number now, and the subtotal amount appears to be correct (still testing/verifying, but looks okay so far). So I deleted my subtotals on my calculated column and then deleted the calculation, to get that stuff out of the report. Sure would be nice if there was documentation in the Discoverer manuals about this.
    John Dickey

  • Question regarding cursor variables, while using table functions

    Hi,
    I created a procedure and when i'm try'g to call it. now i'm getting this error.
    CREATE OR REPLACE TYPE TAB_EMP_REC IS OBJECT(
    EMP_ID NUMBER(9),
    EMP_NAME VARCHAR2(30));
    CREATE OR REPLACE TYPE T_EMP_TMP IS TABLE OF TAB_EMP_REC ;
    CREATE OR REPLACE PROCEDURE USP_CREATE_DATA(
    p_Input IN NUMBER,
    V_EMP_CUR OUT sys_refcursor) IS
    T_EMp T_EMP_TMP := T_EMP_TMP( );
    BEGIN
    t_emp.extend();
    t_emp(1) := TAB_EMP_REC(p_input, 'jack');
    OPEN V_EMP_CUR FOR SELECT * from TABLE(t_emp);
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR '||SQLERRM);
    END USP_CREATE_DATA;
    calling procedure::
    DECLARE
    type O_RESULT_CUR is ref cursor return TAB_EMP_REC;
    V_EMP_REC TAB_EMP_REC;
    BEGIN
    USP_CREATE_DATA(99, O_RESULT_CUR);
    LOOP
    FETCH O_RESULT_CUR INTO V_EMP_REC;
    EXIT WHEN O_RESULT_CUR%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(V_EMP_REC.EMP_ID);
    END LOOP;
    CLOSE O_RESULT_CUR;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR '||SQLERRM);
    END;
    Now i'm getting an error PLS-00362: invalid cursor return type; 'TAB_EMP_REC' must be a record type.
    My question is i already declared it as a database object. What do i need to do ?
    thank you

    but t_emp(1) := TAB_EMP_REC(p_input, 'jai');
    is correct, since.. i'm passing a record into t_emp(1)(this is the first column in this table)No it is not, since TAB_EMP_REC is just an object, when used as a collection, it can be a VARRAY, a PL/SQL table(associative array), nested table etc. As mentioned in my earlier post, if you want to use a collection of the same structure (with subscript n, as you have done here), then you need to declare a collection of type TAB_EMP_REC.In this case you have already declared a table of type TAB_EMP_REC - +CREATE OR REPLACE TYPE T_EMP_TMP IS TABLE Also, t_emp is of type T_EMP_TMP - T_EMp T_EMP_TMP := T_EMP_TMP( );*
    As for the error you are getting, try changing to -
    t_emp := T_EMP_TMP(TAB_EMP_REC(p_input, 'jai'));*
    Note : Not Tested.

  • Modify and add new field in standard Purchase Order script

    Hi All,
           I have some problem with Modify and add some new fields in Standard Purchase Order script. From ME22n transaction code it display PO detail. In <b>item detail</b> with <b>condition</b> tab all data will display in Currently PO script output.
           But I want to display ME22n->Item Detail->Invoice->Taxes Data. how to display this data in standard PO script. All data are fetch from <b>Structure</b> like ( KOMV,KOMVD..etc) then How it can be Display?
    Waiting for Replay.
    Himanshu Patel.

    Work with an Abaper.Tell your requirement [ addition of a field] and ask him to include this field by using the functionality " Field Exit".

  • Add field in customer partner function tab (XDnn)

    Dear all,
    I know that it is possible to add some specific fields in XDnn transaction, but I would like to add a field in the partner function tab in the customer master data.
    We can see : partner function, number, name, description and I would like to add the street in this screen.
    do you know if it is possible and how please ?
    thanks for your help
    Véronique

    Hi
    Until I know, it isn't possible. I think that you refer to table control TCTRL_PARTNERROLLEN in dynpro SAPMF02D 7324. I cannot see any BADI, enhancement or other tool.
    I'm sorry.
    Eduardo

  • Need to add extra fields in Custom tab  using EEWB.

    hi ,
    I extended business partner with 10 custom fields using EEWB by creating an custom tab. I would like to add 2 more fields in the same custom tab . I am unable to find the provision to add new field to the existing project. so i am deleting the existing project and creating new project and adding all the =and new fields.
    Now when I am creating new project  i am loosing the old field names. It creating the new fields with new field names.
    My requirement is I should create a new fields without changing the old field names.
    So Please can any one help me as how to approach these without deletion or changing the existing field names.
    Finally my custom tab should contain 12 fields.
    Thanks
    viswa

    Hi viswa,
    I have a requirement to add 2 new fields to the Standard Transaction (called <b>BP</b> ).
    I have gone through various concepts like <b>EEWB and BDT</b> tools. But, still I am not able to get the things well.
    So please provide me with the procedure to explore things and work on the requirement.
    Thanks in advance.
    Regards,
    Vishnu.

  • How to add new fields in sap copied standard form using itcsy structure

    hi guys,
      i want add some fields in sap script copied standard form using itcsy structure.
    let me know the procedure with any example.
    thanks,
    anitha.

    Hii anitha
    plz c code below
    Syntax goes like this
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    Example:
    In script form
    /: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    /: USING &EKKO-EKORG&
    /: USING &EKPO-WERKS&
    /: USING &EKKO-EKGRP&
    /: USING &EKKO-BSTYP&
    /: CHANGING &COMPNAME&
    /: CHANGING &SENDADR&
    /: CHANGING &INVCADR&
    /: CHANGING &COMPADR&
    /: CHANGING &COVERLTR&
    /: CHANGING &SHIPADR&
    /: CHANGING &REMINDER&
    /: CHANGING &REJECTION&
    /: CHANGING &POSTADR&
    /: CHANGING &LOGO&
    /: ENDPERFORM
    In program
    FORM Read_texts - To extract the standard texts from the table *
    FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA : L_EKORG TYPE EKORG,
    L_WERKS TYPE WERKS_D,
    L_BSTYP TYPE BSTYP,
    L_EKGRP TYPE BKGRP.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
    CHECK SY-SUBRC = 0.
    L_EKORG = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
    CHECK SY-SUBRC = 0.
    L_WERKS = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
    CHECK SY-SUBRC = 0.
    L_EKGRP = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
    CHECK SY-SUBRC = 0.
    L_BSTYP = IN_PAR-VALUE.
    CLEAR Z08M1_ORG_TEXTS.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = L_BSTYP.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = SPACE.
    ENDIF.
    READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SENDADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'INVCADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COMPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REMINDER'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REJECTION'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'POSTADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'LOGO'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    reward points if useful
    regards
    Jaipal

  • How to add new fields in sap scripts using itcsy structure

    hi guys,
               could u provide the screen-shots for adding field in scripts. copied standard forms .
    thanks& regards
    eswar.

    Hi,
    you cannot add new fields using ITCSY. It is the interface structure between a SAPscript an a value-changing form-routine.
    Need example anyway?
    Good luck!
    Jo

  • Requirment to add new field in kna1 and maintiane using XD02

    hi
    i have a requirment need suggestion on that
    1) the requirmen is to add a new field email id on kna1 standard table
    ( it can be done by append structure pls give me full steps to do it and complication involved in it)
    2) now is it possible that user able to maintiane this new field by using Tcode XD02
    will it be visible there if we use a new zappend structure and how the data will be populate in that field by Xd02 do any change required in Xd02
    3) we have to create another tcode for display of these threee fields kunnr name1 and email id that will be done by moudle pool again so is there any compication in thati method later is above steps are done
    main th ing is how data will be populated in kna1 using xd02
    regards
    ARora

    hi Seshu
    my main problem in this is that
    since we are using append structure how data wil be populated in the kna1 table in this new field email id?
    as we need to find some user exists to do so as it is a structre not a field so population of data is a problem in that?
    2) and wheter i should new ztable but customer is asking to add in the standard table and maintian by some xtransaction whetehr it is possible or not?
    #) also can us suggeest on the primary keys i should give for t his data types and records as pasted below if i create a new table and should i check init check box also?
    kunnr        email id                                       name1
    100400     [email protected]      TECHNOLOGY HONG KONG LTD
    100400     [email protected]      TECHNOLOGY HONG KONG LTD
    100400     [email protected]     TECHNOLOGY HONG KONG LTD
    100400     [email protected]               TECHNOLOGY HONG KONG LTD
    100550     [email protected]      INDUSTRIAL CO. LTD.
    100550     [email protected]      INDUSTRIAL CO. LTD.
    100550     [email protected]                      INDUSTRIAL CO. LTD.
    100550     [email protected]                      INDUSTRIAL CO. LTD.
    100550     [email protected]      INDUSTRIAL CO. LTD.
    100550     [email protected]                       INDUSTRIAL CO. LTD.
    regards
    Arora

  • How to add a Field to the Form using forms Personalisation

    Hi,
    I have a requiremnt where in I need to add a field(this field is not present in show fields) to the form.is it possible to add a field to form suing forms personalisation.
    Thanks in advance.
    Regards,
    Naveen.

    I don't think it's possible
    Mostly people use form personalization for Form "cosmetic changes", add additional validation rules,menu entries, etc but not adding additional field.

  • Add new fields using BADI DNO_EVENT_SAVE in Solution Manager

    Hi,
    I would like to add new fields using BADI DNO_EVENT_SAVE. How can I add new fields? Thanks.

    Hi,
    This is the blog which explains how to add custom fields for CRM_DNO_MONITOR.
    /people/bruyneel.guillaume/blog/2008/06/13/service-desk-implementation-guide-part-ii
    Instead of looking or changing the BAdI, you can copy the program of CRM_DNO_MONITOR and modify it.
    Please check this thread:
    Reg : CRM_DNO_MONITOR
    Regards,
    Sanjai

  • The recent upgrade for i-tunes prevents me from adding and using the Field, "Show". How can I add this field in i-tunes?

    The recent upgrade for i-tunes prevents me from adding and using the Field, "Show". How can I add this field in i-tunes?

    Hold down shift as you right-click > Get Info to get the old style dialog box.
    tt2

  • Add new Fields to Opportunity ( TCODE : CRMD_BUS2000111 ) using EEWB

    Hi...
    I am trying to add new field to Opportunity, TCODE : CRMD_BUS2000111 ) using EEWB.
    I am using ...
    Business object BUSINESS_TRANSACTION,
    Extension type ADD_NEW_FIELDS
    Business Transaction Type : CRM Opportunity
    Assigned to : Customer Header data.
    I am able to generate project and extension successfully. But don't see any new field or custom tab added to transaction for Opportunity ( TCODE : CRMD_BUS2000111 ).
    WHEN I CHECKED BACK IN EEWB, DON'T SEE ANY SCREEN OBJECT IN OBJECT LIST.
    I can see Tables, Function group, Function Module, Data Element in object list but Screen object is missing. I believe that's the reason why new screen field not has been added. But not able to find out the reason for that.
    Your help will be highly appreciated. my e-mail id : [email protected]
    Thanks in advance.
    Minal

    Hi Minal,
    I would suggest to create a new extension with the following:
    Create new extension, but use the Enhancement type: "Extend Opportunity"
    When you create just two new fields with "ADD_NEW_FIELDS" you have to manually add them into the existing screens.
    Hope this helps
    Martin

Maybe you are looking for

  • How to create a domain without using the root user in Sunone Server

    Hi, I am having one requirement to create a domain without using root user in sunone application server 8.1. Does any body know the solution? Message was edited by: SPBP

  • Delivery IDOC Split

    Issue: We could observe that the error coming in the Idoc XXX; are errors involving the financial postings that occur as a result of the inventory movement associated with a goods issue. Error Message: Maximum number of items in FI reached The above

  • Send a Report as attachment by Email

    Hello, I'm a rookie in Apex. I read a lot of thread based on how to send a email from an Application. it seems easy to create the body of the email with a SELECT query. I'm using APEX_MAIL.SEND(). I would like to now if it's possible to send a report

  • Remove or isolate part with JavaScript?

    Hi folks, as you know you can remove or isolate parts in the modelhierarchy with a few clicks. Now I want to do exacactly the same with JavaScript to add this function to a button or something similar. So I can have a button like "show part xy" and o

  • WebCenter Content | Batch Loader

    Hi All, We have to checkin 1 million (approx) scanned document in WebCenter Content 11g. We are planning to use WebCenter Content Batch Loader feature for this. Is there any limitation with Batch Loader in terms of volume, performance. Also is there