Function for Performance

Hi,
Does a function increase performance instead of a nested decode/case while handling huge data?
example:
select decode('6','1','0',decode('6','2','3',decode('6','4','5','6'))) from dual
select get_code('6') from dual;
get_code(m_code)
is return varchar2
begin
if m_code = '1' then return '0'
elsif m_code = '2' then return '3'
elsif m_code ='4' then return '5'
else return '6'
end;

No. PL inside SQL is never fast. Check this out.
SQL> create or replace function my_fn(pInput1 integer, pInput2 integer) return integer
  2  as
  3  begin
  4     if pInput1>pInput2
  5     then
  6             return 1;
  7     else
  8             return 0;
  9     end if;
10  end;
11  /
Function created.
SQL> create table t
  2  as
  3  select dbms_random.value(1,9999) no1, dbms_random.value(1,9999) no2
  4    from dual
  5  connect by level <= 100000
  6  /
Table created.
SQL> exec dbms_stats.gather_table_stats(user,'T')
PL/SQL procedure successfully completed.
SQL> set autotrace traceonly
SQL> set timing on
SQL>
SQL> select no1,
  2         no2,
  3         case when no1>no2 then 1 else 0 end val
  4    from t
  5  /
100000 rows selected.
*Elapsed: 00:00:46.03*
Execution Plan
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=159 Card=100000 By
          tes=4300000)
   1    0   TABLE ACCESS (FULL) OF 'T' (TABLE) (Cost=159 Card=100000 B
          ytes=4300000)
Statistics
          *1  recursive calls*
          0  db block gets
       7355  consistent gets
          0  physical reads
          0  redo size
    5830943  bytes sent via SQL*Net to client
      73826  bytes received via SQL*Net from client
       6668  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
     100000  rows processed
SQL> select no1,
  2         no2,
  3         my_fn(no1,no2)
  4    from t
  5  /
100000 rows selected.
*Elapsed: 00:00:49.04*
Execution Plan
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=159 Card=100000 By
          tes=4300000)
   1    0   TABLE ACCESS (FULL) OF 'T' (TABLE) (Cost=159 Card=100000 B
          ytes=4300000)
Statistics
         *18  recursive calls*
          0  db block gets
       7374  consistent gets
          0  physical reads
          0  redo size
    5830954  bytes sent via SQL*Net to client
      73826  bytes received via SQL*Net from client
       6668  SQL*Net roundtrips to/from client
          5  sorts (memory)
          0  sorts (disk)
     100000  rows processedThanks,
Karthick.

Similar Messages

  • SQL User Defined Functions for performing statistical calculations

    Hi!
       I hope you can help.  I just wasn’t sure where to go with this question, so I’m hoping you can at least point me in the right direction.
       I’m writing a SQL Server stored procedure that returns information for a facility-wide scorecard-type report.  The row and columns are going to be displayed in a SQL Server Reporting Services report. 
       Each row of information contains “Current Month” and “Previous Month” numbers and a variance column.  Some rows may compare percentages, others whole numbers, others ratios, depending on the metric they’re measuring.  For each row/metric the company has specified whether they want to see a t-test or a chi-squared statistical test to determine whether or not there was a statistically significant difference between the current month and the previous month. 
       My question is this:  Do you know where I can find a set of already-written user defined functions to perform statistical calculations beyond the basic ones provided in SQL Server 2005?  I’m not using Analysis Services, so what I’m looking for are real SQL User Defined Functions where I can just pass my data to the function and have it return the result within a stored procedure. 
       I’m aware that there may be some third-party statistical packages out there we could purchase, but that’s not what I’m looking for.   And I’m not able to do anything like call Excel’s analysis pack functions from within my stored procedure.   I’ve asked.   They won’t let me do that.   I just need to perform the calculation within the stored procedure and return the result.
       Any suggestions?  Is there a site where people are posting their SQL Server UDF’s to perform statistical functions?  Or are you perhaps aware of something like a free add-in for SQL that will add statistical functions to those available in SQL?   I just don’t want to have to write my own t-test function or my own chi-squared function if someone has already done it.
     Thanks for your help in advance!  Oh, and please let me know if this should have been posted in the TSQL forum instead.  I wasn't entirely sure.
    Karen Grube

    STATS_T_TEST_
    docs.oracle.com/cd/B19306_01/server.102/b14200/functions157.htm 
    STATS_T_TEST_ONE: A one-sample t-test
    STATS_T_TEST_PAIRED: A two-sample, paired t-test (also known as a crossed t-test)
    STATS_T_TEST_INDEP: A t-test of two independent groups with the same variance (pooled variances)
    STATS_T_TEST_INDEPU: A t-test of two independent groups with unequal variance (unpooled variances)

  • Best practice for performing spell check in ADF

    Hi,
    I would like to know if there is a way to perform spell check in ADF. What is the best way to do? Does ADF have some type functionality for that or do I need to have an external library for that?
    Any help will be appreciated.
    thank you in advanced,
    Abraham
    I'm using Jdevelper 11.1.1.4.0 - Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923

    couple of related threads
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=2167553
    spell check for the input text
    may be you can check if there is a ajax way of doing this through jsf

  • Oracle 9i function to perform data manipulation

    Hi everyone,
    I have two scenarios. I would like to write one Oracle 9i function that can accommodate both these scenarios, using PL/SQL developer. I intend passing a varchar2 parameter to this function. Within the function, I perform a select on a table and see if this value sent has a parent record.
    If it does not have a parent record (null or blank) then I take this value, join with another table, perform some processing and return one varchar2 value.
    If it has a parent record (not null or not blank) then I need to retrieve all the other children records associated with this same parent record, take this value, join with another table,perform some processing and return one varchar2 value.
    I have two simple queries that I wrote: one for record with null/blank parent, and the other for record with same parent and other children. These two queries work individually, when I combine them is where I run into problems. Sample table:
    TABLE XYZ data: (note: if there is a parent, parent shows up in both parent and child field in the table)
    child parent
    1234
    5107 3167
    6259 3652
    5678 9754
    3167 3167
    3652 3652
    1649
    2306 9754
    4657 3652
    9754 9754
    8753 3652
    passing record 1234 into the function.
    SELECT A.child, A.parent, C.field1
    FROM OTHERTABLE C,
    (SELECT TableA.child, TableA.parent
    FROM XYZ TableA
    WHERE TableA.child ='1234')A
    WHERE A.child = C.field2
    ----(output of this query is 1 record with 3 fields 1234 and null/blank and 987654321. I place this output into a cursor and then take 987654321 and place into a variable and return this value)
    passing record 4657 into the function
    SELECT c.CHILDfield, c.PARENTfield, TableOther.field1
    FROM OTHERTABLE TableOther,(
    (SELECT B.CHILDfield, B.PARENTfield FROM
    (SELECT A.PARENTfield, i.CHILDfield FROM TableB,
    (SELECT TableA.CHILDfield, TableA.PARENTfield
    FROM XYZ TableA
    WHERE TableA.CHILDfield ('4657' ))A
    -- pass 4657 and then get the parent
    WHERE A.PARENTfield = TableB.PARENTfield)B
    -- gets associated children with the parent from previous query.
    -- note: parent can exist in the parent and child fields
    WHERE B.CHILDfield <> B.PARENTfield))C
    --strips off the parent and gets child/children only as I don't need
    --the parent when it is also a child
    WHERE C.CHILDfield = TableOther.field1
    --(output of this query is 3 records
    4657 3652 912345671
    6259 3652 945362798
    8753 3652 934274857)
    I place this output into a cursor and then have a CASE statement that goes thru each record, and appends the third value into a variable, the ultimate return value of this will be as follows:
    912345671;945362798;934274857)
    The dilemma is writing a generic query to accommodate both these situations. My current function can handle each of these situations individually, but not both. For testing purposes, I change the select statement depending on whether I have a record that has a parent on not!
    Any help is greatly appreciated.

    You want one function to handle two cases? This is the best opportunity to use the IF STATEMENT.
    FUNCTION MyFunc (p_input IN VARCHAR2) RETURN VARCHAR2 IS
    ReturnValue VARCHAR2;
    BEGIN
    IF <blank or null test> THEN
    SELECT ... -- Blank or null select statement
    ... -- Blank or null data processing
    RETURN ReturnValue;
    ELSE
    SELECT ... -- Other select statement
    ... -- Other data processing
    RETURN ReturnValue;
    END IF;
    END MyFunc;

  • Function for getting status of a document(vbeln)

    Hello,
    i am creating a report showing the list of sales order. I also want to show the status of each document(vbeln). Is there any SAP function which returns the stauts of a document(vbeln).
    Thanks for yur time.
    Shehryar

    <b>RV_ORDER_FLOW_INFORMATION </b> Reads sales document flow of sales document after delivery and billing  ExampleO
    Don't forget also check direct reference documents for the both starting document # and preceding/following document types that you are searching for (For example, if you search delivery for the given SO, check also LIPS-VGBEL and LIPS-VGPOS, if it's possible with regard to performance). 
    V45A  SD Functions for Copying Documents  SD_SALES_DOCUMENT_READ   Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties) 
    SD_SALES_DOCUMENT_READ_POS   Reads sales document header and item material: tables VBAK, VBAP-MATNR 
    SD_DOCUMENT_PARTNER_READ   partner information including address. Calls SD_PARTNER_READ 
    SD_DETERMINE_CONTRACT_TYPE   In: at least VBAK-VBELN
    Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT 
    SD_SALES_DOCUMENT_COPY  copy Sales Doc into new one with the required Sales Doc Type (VBAK-AUART) for further creating. ExampleO - create subsequent document 
    SD_SALES_DOCUMENT_SAVE  create Sales Doc from the copied document 
    V45K  Sales Order Processing Functions  SD_SALES_DOCUMENT_ENQUEUE   to dequeue use DEQUEUE_EVVBAKE 
    V05I  SD Index Update  SD_PARTNER_READ   all the partners information and addresses 
    V05O  SD Data Collection for Dlv Note Printing  RV_DELIVERY_PRINT_VIEW  Data provision for delivery note printing  
    SD_PACKING_PRINT_VIEW   
    SD_DELIVERY_VIEW  Data collection for printing  called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW 
    V05N  SD Data Collection for Bill Doc Printing  RV_BILLING_PRINT_VIEW  Data Provision for Billing Document Print

  • Function to perform subsequent subtraction in BEx

    Hello Experts,
    I want to build following standard deviation formula in BEx.
    std = R-Bar/D2, R-Bar defined as the sum of the absolute values of the differences between the value and the value before it divided by the number of values (the number of values will be the count minus 1 since the first value does not have a value to take a difference from).  D2 is a contant 1.128.
    I don't get any function to perform subsequent subtraction.
    , in spreadsheet it is something like this.
    Column D : Actual Test Results of Lot 'L1' for each sample (A to G)
    Now I need to calculate its standard deviation using above formula.
    Column F : E3-E2, E4-E3 and so on. In E2, value will be Zero as it's the first record.
    Column G : Absolute of Values in Column F.
    Cell G10 : Sum of all absolute values (60 in this example)
    Cell G12 : Sum/ (Count-1) i.e. 60/(7-1) in this example. A to G are 7 samples, so count is 7.
    G14 : G12/1.128
    So, G14 holds the desired result of standard deviation.
    When I remove Sample column from my report I should get this result in standard deviation cell.
    Lot Number
    Standard Dev
    L1
    7.598784195
    Appreciate your help.
    Thanks.

    Hi There
    So you want to play with designer, then you have to create a lot key figure selections and formulas, you have to create as much as samples you may have. If the max number of samples can be seven then you have to create seven key figure selections and restrict each one of them with samples characteristic value. You will create also six formulas.
    An example:
    KYF 1: Test Result , restrict Samples : A
    KYF 2:  Test Result , restrict Samples : B
    KYF 3:  Test Result , restrict Samples : C
    KYF 4:  Test Result , restrict Samples : D
    and so on...
    Formula 1: KYF 2 - KYF 3
    Formula 2: KYF 3 - KYF 4
    Since samples will not be in the analysis then you won't have any issue with the results.
    Thank you
    Yiannis

  • Suggest book on SAP HR Functional for beginners

    Dear All,
    Request you to suggest me a book for SAP HR Functional
    for beginners.
    Thanks in advance for the help.
    Regards,
    Taranjit

    Benefit Administration:
    This section of the Implementation Guide (IMG) is where you set the SAP Benefits Administration component.
    Here you enter in the system all the details of the benefit plans offered by your company.
    Benefit Area:
    Benefit areas allow you to have separate administration of different benefit plan pools. This division is primarily for administrational purposes and would not normally be used for eligibility
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Benefit Area
    Assign Currency to Benefit Area:
    In this step, you specify the currency for the benefit area
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Assign Currency
    this step, you enter the providers of the benefit plans you offer.
    This could be the Insurance company, or Health Maintenance Organization that receives the benefit plan costs
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Benefit Providers
    In this step, you set relevant benefit area for your Customizing activities
    If you have more than one benefit area to set up, you must set up each independently. After you have set up all the plans in one area, you must return to this view, set the next current benefit area and work through the IMG again, setting up the new benefit area.
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Set Current Benefit Area
    Benefit Plan Types:
    In this step, you enter the benefit plan types that you require for the plan categories predefined in the system.
    The following plan categories are provided by MSD:
    • Health Plans
    o Medical
    o Dental
    o Vision
    • Insurance Plans
    o Basic Life
    o Supplemental Life
    o Accidental Death & Dismember
    • Savings Plans
    o 403B
    o 457
    o PERS (Public Employees retirement Scheme for CP Benefit Plan) & TRS
    (Teachers Retirement Scheme for TP Benefit Plan)
    • Flexible Spending Accounts
    o Health care
    o Dependent care
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Plan Attributes &#61664; Define Benefit Plan Types
    Define Benefit Plan Status:
    It is important that you assigning statuses in order to be able to control the availability of plans with a minimum of effort. For example, you can control whether or not employees can enroll in a plan simply by changing its status
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Plan Attributes &#61664; Define Benefit Plan Status
    Benefit Plan Status:
    In this step, you define parameter groups. You decide which groups you require in two stages:
    1. You consider which costs, credits, coverage and employee and employer contributions for your plans vary according to the age, salary and/or seniority of employees (or possibly the age of the employee's spouse).
    2. You determine the different ways in which you need to divide your employees according to different value ranges for these criteria.
    It is not possible to define overlaps of ranges for a criterion within a single parameter group. Therefore, if you require different employee groupings for different plans, you need to create a separate parameter group.
    For each unique combination of criteria and their values, you need to define a parameter group.
    In this step, you simply create the parameter groups to which you assign groups for the individual criteria in the following steps. You later refer to the parameter groups, where applicable, in the individual rule variants for plans. Since one parameter group can be referenced by multiple plans, Customizing effort is kept to a minimum. In the plan variant, you also have the flexibility of being able to specify that you only want to use certain criteria values belonging to a parameter group, for example, age ranges
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Employee Groupings &#61664; Define Employee Criteria Groups &#61664; Define Parameter Groups
    Age Groups:
    In this step, you define the age groups for the parameter groups that you defined in a previous step.
    Depending on your needs, you may find for some parameter groups, you can leave out this step, if for example there is no requirement to differentiate between employees based on age
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Employee Groupings &#61664; Define Employee Criteria Groups &#61664; Define Age Groups
    Age Groups under Parameter grouping “PAR1”
    Cost Groupings:
    In the parameter group you could differentiate between employees based upon age, salary and seniority. Here you can further differentiate between employees, based on other employee criteria, such as geographical location, job classification, marital status and so on. Only set up this feature, if you find that the parameter group does not adequately cover your needs, when specifying costs for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Employee Groupings &#61664; Define Cost Groupings
    Coverage Groupings:
    In the parameter group you could differentiate between employees based upon age, salary and seniority. Here you can further differentiate between employees, based on other employee criteria, such as geographical location, employment contract, residence status and so on. Only set up this feature, if you find that the parameter group does not adequately cover your needs, when specifying coverage for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Employee Groupings &#61664; Define Coverage Groupings
    Employee Contribution Groupings:
    In the parameter group you could differentiate between employees based upon age, salary and seniority. Here you can further differentiate between employees, based on other employee criteria, such as geographical location, weekly hours, residence status and so on. Only set up this feature, if you find that the parameter group does not adequately cover your needs, when specifying employee contribution for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Employee Groupings &#61664; Define Employee Contribution Groupings
    the parameter group you could differentiate between employees based upon age, salary and seniority. Here you can further differentiate between employees, based on other employee criteria, such as geographical location, weekly hours, residence status and so on. Only set up this feature, if you find that the parameter group does not adequately cover your needs, when specifying employee contribution for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Basic Settings &#61664; Define Employee Groupings &#61664; Define Employer Contribution Groupings
    the parameter group you could differentiate between employees based upon age, salary and seniority. Here you can further differentiate between employees, based on other employee criteria, such as geographical location, weekly hours, residence status and so on. Only set up this feature, if you find that the parameter group does not adequately cover your needs, when specifying employee contribution for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Health Plans &#61664; Define Employer Contribution Groupings
    the parameter group you could differentiate between employees based upon age, salary and seniority. Here you can further differentiate between employees, based on other employee criteria, such as geographical location, weekly hours, residence status and so on. Only set up this feature, if you find that the parameter group does not adequately cover your needs, when specifying employee contribution for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Health Plans &#61664; Define Options for Health Plans
    Dependent Coverage Options:
    In this step, you define the dependent coverage that are used in health plans.
    Define all possible variations that you need, because this view is not specific to any plan or plan option
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Health Plans &#61664; Define Dependent Coverage Options
    Number of Dependents:
    In this step, you can restrict participation in a health plan under a dependent coverage option to certain types of dependent, as determined by the subtypes of the Family/Related Persons infotype (0021). You can also define a minimum and maximum number of persons of a particular type that can be covered. During enrollment, the system only includes those dependent coverage options in the benefit offer for which the appropriate dependents are available
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Health Plans &#61664; Define Minimum and Maximum Number of Dependents
    Define Cost Variants:
    In this step you define cost variants to determine which factors influence the cost of a health plan for an employee. Variants are plan-specific; each plan has its own variant(s).
    You do not enter any actual costs in this step. You simply define how costs vary according to:
    • Plan
    • Option
    • Dependent coverage
    • Employee data
    Before you start to define cost variants, you need to do the following:
    1. Determine how often costs vary for all the combinations of option and dependent coverage that you have defined in each plan.
    This indicates how many cost variants you need. You can use the same cost variant more than once, for example, if costs are always identical for the dependent coverages 'employee only' and 'employee plus family' within a plan, regardless of the plan option
    2. Determine how costs vary according to employee data.
    This determines how you need to set up your variants using employee groupings.
    For each variant, you can specify a parameter group and cost grouping to determine cost. You can also indicate whether the gender of employees and whether or not they are smokers are cost criteria
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Health Plans &#61664; Define Cost Variants
    Cost Rules:
    You need to define costs for each possible combination of employee grouping in the criteria you have attributed to each variant. If you have not specified any criteria in a variant, you assign one rule only
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Health Plans &#61664; Define Cost Rule
    Health Plan Attributes:
    In this step, you bring together all the definitions relevant to the health plan that you have made in the previous steps.
    You assign to each health plan:
    • Its options
    • Relevant dependent coverages
    • The cost variants for the combination of options and dependent coverages
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Health Plans &#61664; Assign Health Plan Attributes
    Insurance Plans:
    In this step, you define general data for insurance plans
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Define Insurance Plan General Data
    Coverage Variants:
    In this step, you define coverage variants to determined which factors influence the coverage an employee is entitled to in a plan. Variants are plan-specific; each plan has its own variant(s).
    You do not enter any actual coverage in this step. You simply define how coverage varies according to:
    • Plan
    • Coverage option
    • Employee data
    Before you start to define coverage variants, you need to do the following:
    1. Determine how often coverage varies for different coverage options.
    This indicates how many coverage variants you need. Note the following:
    • If a plan has set coverages (including salary multiples), you need a
    coverage variant for each.
    • If a plan allows employees to choose any amount of coverage within a
    range, you need only one coverage variant.
    • If a plan has options, you will need a coverage variant for each option.
    2. Determine how coverage varies according to employee data.
    This determines how you need to set up your variants using employee groupings. For each variant, you can specify a parameter group and coverage grouping to determine coverage
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664;
    Coverage Rules:
    In this step, you define the actual coverages for a plan.
    You need to define coverage for each possible combination of employee grouping in the criteria you have attributed to each variant. If you have not specified any criteria in a variant, you assign one rule only.
    Coverage can be defined as a flat amount or as a factor of salary
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Define Coverage Rules
    Cost Variants:
    In this step you define cost variants to determine which factors influence the cost of an insurance plan for an employee. Variants are plan-specific; each plan has its own variant(s).
    You do not enter any actual costs in this step. You simply define how costs vary according to:
    • Plan
    • Coverage option
    • Employee data
    Before you start to define cost variants, you need to do the following:
    1. Determine how often cost varies for different coverage options:
    • If an insurance plan has set flat coverage options and flat costs, you need
    to define a cost variant for each flat cost.
    • If you have set flat coverage options and the flat costs are directly
    proportional to the coverage stated in the flat cost, you need only one
    cost variant.
    • If an employee can choose any amount of coverage within a range and the
    cost of the coverage is directly proportional to the coverage, you need
    only one cost variant.
    2. Determine how costs vary according to employee data.
    This determines how you need to set up your variants using employee groupings.
    For each variant, you can specify a parameter group and cost grouping to determine cost. You can also indicate whether the gender of employees and whether or not they are smokers are cost criteria
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Define Cost Variants
    Cost Rules:
    You need to define costs for each possible combination of employee grouping in the criteria you have attributed to each variant. If you have not specified any criteria in a variant, you assign one rule only
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Define Cost Rules
    Insurance Plan Attributes:
    In this step, you bring together all those parts of an insurance plan, that you have already defined in the previous few steps.
    You define the insurance plan options, then associate to each insurance plan:
    • Cost variant
    • Coverage variant
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Assign Insurance Plan Attributes
    Combined Coverage Limits:
    When you define coverages for plans such as insurance, you can set limits on the coverage amount. This is often used when the coverage is an amount dynamically calculated when the employee chooses her coverage.
    However these limits apply only to one plan and yet you might need to define limits which combine the coverages of more than one plan.
    In this chapter, you define these combined limits as follows:
    1. The limit that might span 2 or more plans is reduced to a mathematical equation, where there is an amount on one side and plan coverages on the other side. The two sides of this equation are then DIVIDED BETWEEN the two views in this chapter.
    2. The first view defines the limit in monetary terms which is one side of the equation. It also defines the operator (equals, is greater than, and so on).
    3. The second view defines the other side of the equation in terms of the plan coverages
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Combined Coverage &#61664; Combined Coverage
    Combined Coverage Limit Expressions:
    In this step, you enter the second half of the equation, as discussed in combined coverage
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Combined Coverage &#61664; Define Combined Coverage Limit Expressions
    Imputed Income for Selected Benefits:
    In this section of the IMG, you define the criteria needed to calculate Imputed Income.
    Imputed Income is based upon benefits paid for by the employer and calculated using rates set by the Internal Revenue Service (IRS). This value is then treated as taxable income for the employee
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Combined Coverage &#61664; Review Age Groups for Imputed Income
    Review Calculation Factors for Imputed Income:
    In this step, you check that the Imputed Income Rate Table entries are correct.
    The imputed income age groups are associated with the rates/factors set by the IRS
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Insurance Plans &#61664; Combined Coverage &#61664; Review Calculation Factors for Imputed Income
    Savings Plans:
    In this step, you define general data for savings plans.
    You have defined the relevant type, status, and provider for each plan in the Basic Settings section of the Benefits IMG
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Savings Plans &#61664; Define Savings Plan General Data
    Employee Contribution Variants:
    In this step you define employee contribution variants to determine which factors influence the permitted employee contribution to a plan. Variants are plan-specific; each plan has its own variant(s).
    You do not enter any actual contributions in this step. You simply define how contributions vary according to:
    • Plan
    • Option (only for plans in the plan category Miscellaneous)
    • Employee data
    Before you start to define variants, you need to do the following:
    1. Determine how often employee contributions vary for plans and any plan options.
    This indicates how many contribution variants you need.
    2. Determine how employee contributions vary according to employee data.
    This determines how you need to set up your variants using employee groupings.
    For each variant, you can specify a parameter group and employee contribution grouping to determine employee contribution
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Savings Plans &#61664; Define Employee Contribution Variants
    Employee Contribution Rules:
    In this step, you define the employee contribution limits for each plan.
    You need to define employee contributions limits for each possible combination of employee grouping in the criteria you have attributed to each variant. If you have not specified any criteria in a variant, you assign one rule only.
    You can define minimum and maximum employee contribution in the following ways:
    • As a fixed amount
    • As a percentage of salary
    • As a contribution unit
    In Payroll, the total employee contribution is the sum of these amounts
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Savings Plans &#61664; Define Employee Contribution Rules
    Employer Contribution Variants:
    In this step you define employer contribution variants to determine which factors influence the contribution the employer makes to a plan. Variants are plan-specific; each plan has its own variant(s).
    You do not enter any actual contribution in this step. You only define how contributions vary according to:
    • Plan
    • Option (only for plans in the plan category Miscellaneous)
    • Employee data
    Before you start to define variants, you need to do the following:
    1. Determine how often employee contributions vary for plans and any plan options.
    This indicates how many contribution variants you need.
    2. Determine how employee contributions vary according to employee data.
    This determines how you need to set up your variants using employee groupings.
    For each variant, you can specify a parameter group and employer contribution grouping to determine employer contribution
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Savings Plans &#61664; Define Employer Contribution Variants
    Employer Contribution Rules:
    In this step, you define limits for the contributions made by the employer to employee plans. You so this for each employer contribution variant for each plan.
    You need to define employer contributions limits for each possible combination of employee grouping in the criteria you have attributed to each variant. If you have not specified any criteria in a variant, you assign one rule only.
    You can define the employer contribution and the contribution limit in either of the following ways:
    • As a fixed amount / as an amount per unit contributed by the employee
    • As a percentage of employee base salary or employee contribution
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Savings Plans &#61664; Define Employer Contribution Rules
    Assign Savings Plan Attributes:
    In this step, you complete the definition of savings plans by bringing together the relevant elements that you have already defined:
    • EE contribution variant
    • ER contribution variant
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Savings Plans &#61664; Assign Savings Plan Attributes
    Flexible Spending Accounts (FSAs):
    In this step, you define general data for flexible spending accounts (FSAs).
    Requirements
    You have created the appropriate plan type , plan status, and benefit provider in the preceding steps
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Flexible Spending Accounts (FSAs) &#61664; Define Spending Account General Data
    Assign Spending Account Attributes:
    In this step, you enter the details of your flexible spending accounts including contribution limits, an employer contribution variant (if required), and rules for the reimbursement of claims
    IMG Path: Personnel Management &#61664; Benefits &#61664; Plans &#61664; Flexible Spending Accounts (FSAs) &#61664; Assign Spending Account Attributes
    Flexible Administration:
    In this chapter, you define the flexible aspects of your Benefits administration. You define the availability of plans to your employees, in terms of the plans themselves. You also define aspects of the enrollment process.
    you enter parameters that apply to processing within an entire benefits area, including:
    • Open enrollment period dates
    • Default validity dates for adjustment/standard plan records
    • Advance availability of future plans
    • Dependent age limits
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Define Administrative Parameters
    Benefit Adjustment Groupings:
    In this step, you define adjustment groupings. These groupings allow you to specify different adjustment permissions for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Benefits Adjustment Reasons &#61664; Define Benefit Adjustment Groupings
    Benefit Adjustment Reasons:
    In this step, you define adjustment reasons to control changes to employee enrollments according to company policy.
    The adjustment reason types that you define here are assigned as subtypes of Adjustment Reasons records (infotype 0378) in HR Master Data. Since a record can only have one subtype, a new record must be created for every adjustment reason an employee experiences.
    According to the adjustment concept, an employee can only make changes to her enrollments if she has an Adjustment Reasons record (infotype 0378) with the required adjustment reason as a subtype. The only exceptions to this are if changes are made during an open enrollment period or if an anytime adjustment reason is assigned to the plan type.
    In addition to defining adjustment reasons for certain events that can trigger changes, you may also want to define a special adjustment reason to allow changes to plans at any time
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Benefits Adjustment Reasons &#61664; Define Benefit Adjustment Reasons
    Adjustment Permissions:
    In this section, you assign adjustment permissions to each benefit plan type for an adjustment reason and any adjustment grouping that you have defined.
    Note that the elements for which you can define permissions are automatically determined by the system, dependent on the plan category
    Health Plans:
    In this step, you define the changes permitted for all plans of this type. You do this for each combination of adjustment reason, adjustment grouping, and plan type
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Benefits Adjustment Reasons &#61664; Define Adjustment Permissions &#61664; Health Plans
    this step, you define the changes permitted for all plans of this type. You do this for each combination of adjustment reason, adjustment grouping, and plan type
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Benefits Adjustment Reasons &#61664; Define Adjustment Permissions &#61664; Insurance Plans
    Savings Plans:
    In this step, you define the changes permitted for all plans of this type. You do this for each combination of adjustment reason, adjustment grouping, and plan type
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Benefits Adjustment Reasons &#61664; Define Adjustment Permissions &#61664; Savings Plans
    Spending Accounts:
    In this step, you define the changes permitted for all plans of this type. You do this for each combination of adjustment reason, adjustment grouping, and plan type
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Benefits Adjustment Reasons &#61664; Define Adjustment Permissions &#61664; Spending Account
    Programs:
    In this section of the IMG, you define benefit programs and the eligibility restrictions and termination conditions for the plans within these programs.
    Within a program, eligibility for plans can be determined on two levels:
    • Program groupings control eligibility on a high level (macro-eligibility) by allocating an employee a defined program, depending on his/her organizational and employment data.
    • Eligibility rules are optional and control eligibility on a low level (micro-eligibility) by determining whether an employee can participate in a plan within the relevant program. An employee must fulfill the conditions defined in the rule in order to be able to enroll. Eligibility rules are assigned to plans in programs by means of an eligibility variant.
    First Program Grouping:
    In this step, you define first program groupings. Later, you define programs for a combination of first and second program groupings.
    Identical attributes are available for the setup of both the first and second program groupings, and they are therefore interchangeable. The fact that you determine macro-eligibility for a program using two dimensions means that you are able to make finer distinctions between groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Define First Program Grouping
    Second Program Grouping:
    In this step, you define second program groupings. Later, you define programs for a combination of first and second program groupings.
    Identical attributes are available for the setup of both the first and second program groupings, and they are therefore interchangeable. The fact that you determine macro-eligibility for a program using two dimensions means that you are able to make finer distinctions between groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Define Second Program Grouping
    Employee Eligibility:
    In this section of the IMG, you define the criteria according to which you control eligibility for individual benefit plans within a benefits program (definition of micro-eligibility). You perform the following steps to set up eligiblity requirements:
    • You define eligibility grouping to identify groups of employees for whom
    certain eligibility criteria apply.
    • You create eligibility variants, which you later use to link eligibility
    rules to programs.
    • If necessary, you define dynamic eligibility conditions relating
    specifically to actual hours worked/length of service, or zip codes.
    • You bring your definitions together in the eligibility rule, where you
    can also specify further conditions for enrollment.
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Employee Eligibility &#61664; Define Eligibility Groupings
    Eligibility Variants:
    In this step, you define eligibility variants. These consist simply of an identifier and a description
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Employee Eligibility &#61664; Define Eligibility Variants
    Eligibility Rules:
    In this step, you define eligibility rules for the benefit plans offered by your organization. You define these rules for combinations of eligibility grouping and eligibility variant, thereby determining the eligibility conditions that will apply for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Employee Eligibility &#61664; Define Eligibility Rules
    Participation Termination:
    In this section of the implementation guide you define criteria for the termination of benefit plans
    Termination Groupings:
    In this section of the implementation guide you define criteria for the termination of benefit plans
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Participation Termination &#61664; Define Termination Groupings
    Termination Variants:
    In this step, you define termination variants. These consist simply of an identifier and a description
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Participation Termination &#61664; Define Termination Variants
    Termination Rules:
    In this step, you define termination rules. You define these rules for every combination of termination grouping and termination variant, thereby determining the coverage continuation periods and termination day that will apply for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Participation Termination &#61664; Define Termination Rules
    Define Benefit Programs:
    In this step, you define termination rules. You define these rules for every combination of termination grouping and termination variant, thereby determining the coverage continuation periods and termination day that will apply for different groups of employees
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Programs &#61664; Define Benefit Programs
    Dependent/Beneficiary Eligibility:
    In this step, you define family member groupings and determine how family members are allocated to these groupings
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Dependent/Beneficiary Eligibility &#61664; Define Family Member Groupings
    Dependent Eligibility Rule Variants:
    In this step, you define the dependent eligibility variants to which you want to assign dependent eligibility rules. You also specify whether you wish to use a family member grouping in the associated eligibility rule to restrict eligibility to types of family members with certain characteristics
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Dependent/Beneficiary Eligibility &#61664; Define Dependent Eligibility Rule Variants
    Dependent Eligibility Rules:
    In this step, you define dependent eligibility rules to determine which types of family member are eligible as dependents. You then assign your rules to the appropriate plans by means of a rule variant in the step Assign Eligibility Rule Variant to Plan
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Dependent/Beneficiary Eligibility &#61664; Define Dependent Eligibility Rules
    Beneficiary Eligibility Rule Variants:
    In this step, you define the beneficiary eligibility variants to which you assign beneficiary eligibility rules in the next step. You also specify the following:
    • Whether you want to use a family member grouping in the associated eligibility rule to restrict eligibility to types of family members with certain characteristics
    • Whether the following apply for plans to which the variant is assigned:
    &#61607; The employee can be a beneficiary
    &#61607; Contingency beneficiaries can be named
    &#61607; Spouse approval is required if beneficiaries other than the spouse are to be amed (the system only takes this setting into consideration for plans of the category avings)
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Dependent/Beneficiary Eligibility &#61664; Define Beneficiary Eligibility Rule Variants
    Beneficiary Eligibility Rules:
    In this step, you define beneficiary eligibility rules to determine which types of family member are eligible as beneficiaries. You then assign your rules to the appropriate plans by means of a rule variant in the step Assign Eligibility Rule Variant to Plan
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Dependent/Beneficiary Eligibility &#61664; Define Beneficiary Eligibility Rules
    Assign Eligibility Rule Variant to Plan:
    In this step, you assign dependent eligibility variants and beneficiary eligibility variants to plans, thereby assigning the eligibility rules associated with these variants
    IMG Path: Personnel Management &#61664; Benefits &#61664; Flexible Administration &#61664; Dependent/Beneficiary Eligibility &#61664; Assign Eligibility Rule Variant to Plan
    COBRA Plans:
    In this step, you specify which health plans that you have already defined in the system are COBRA-relevant.
    When a clerk collects COBRA-qualified beneficiaries, the system only considers employee enrollments in the plans you select here as legitimate cases where COBRA must be offered to the employee
    IMG Path: Personnel Management &#61664; Benefits &#61664; COBRA &#61664; Choose COBRA Plans
    this step, you determine for which flexible spending accounts (FSAs) you will offer continuation of coverage under COBRA. You need to do this for each benefit area separately
    IMG Path: Personnel Management &#61664; Benefits &#61664; COBRA &#61664; Choose COBRA Spending Accounts
    Qualifying Event Coverage Periods:
    In this step, you define the events that qualify individuals for COBRA coverage, and the periods of permitted coverage continuation for each qualifying event type. COBRA legislation states the following regarding coverage continuation periods:
    • In the case of Termination of employment and Reduction in working hours, only 18 months coverage must be provided. If qualified beneficiaries are determined to be disabled within 60 days of the COBRA event, they are entitled to a further 11 months of coverage, as are the other qualified beneficiaries who experienced the original event.
    • For all other qualifying events except Bankruptcy of employer, a qualified beneficiary is entitled to 36 months continuation coverage, and there is no extension provision for disability.
    • In the case of the event Bankruptcy of employer, the coverage continuation period is the life of the retired employee or retired employee's widow/widower. You therefore do not need to define a continuation period in this case.
    IMG Path: Personnel Management &#61664; Benefits &#61664; COBRA &#61664; Define Qualifying Event Coverage Periods
    Assign COBRA Events to Personnel Actions:
    In this step, you define how the system recognizes COBRA-qualifying events from employee personnel actions (infotype 0000) records. You do this by creating a link between the two.
    The only COBRA-qualifying event types that you assign to personnel actions are:
    • Termination
    • Death of employee
    • Reduction in hours
    You need to assign these COBRA-qualifying event types since they are based on customizable entries in your HR master data and therefore cannot be delivered as standard.
    When the system collects COBRA-qualified beneficiaries, it considers employee records within the date range you specify in two stages as follows:
    1. The system searches for employee personnel action (infotype 0000) records. The COBRA qualifying events assigned to any personnel actions found are collected.
    2. The system checks other employee infotype records for specific information which corresponds to COBRA-qualifying event types
    IMG Path: Personnel Management &#61664; Benefits &#61664; COBRA &#61664; Assign COBRA Events to Personnel Actions
    Notification and Payment Intervals:
    In this step, you define details of COBRA administration for those states where state law concerning COBRA differs from federal law.
    Federal regulations are reflected in the state settings for the District of Columbia, which is also the system default.
    If you must comply with state regulations that differ from the federal regulations, you should create a new state entry. Otherwise, you can use the DC version for all employees, regardless of which state they reside in
    IMG Path: Personnel Management &#61664; Benefits &#61664; COBRA &#61664; Define Notification and Payment Intervals
    heck this one and let me know if there is anything else even arun has also given nice response so if u have any query pls revert back
    6

  • ASM how many Gigs per disk group for performance.

    We are migrating from a file system based database 1Tbyte 10.2.0.3 on IBM AIX to a database on Solaris 9 10.2.0.3 with ASM.
    Our old system functioned well by breaking up the IO into 15 file system 72.5 GB each over three SAN arrays.
    We have no experience of ASM and are wondering if we should break up the IO in a similar way for performance or just have one large disk group? There must be advantages/disadvantages one way or another. Looking for advise.
    Thanks very much in advance for any help.

    ASM performs striping automatically so you don't need to care about creating multiple disk groups for performance. But if you have different disks in terms of speed and size, then create individual groups for each disk.
    http://youngcow.net/doc/oracle10g/server.102/b14231/storeman.htm#i1014729

  • Help in using listagg function for more than 8000 char.

    Hi Friends,
    Need you urgent help in using listagg function for more than 8000 char.
    I did the below sample SQL and in "e_orig" and "d_orig" for upto 4000 char it is working fine but I have to use it for more than 8000 char. and it is giving error,
    I checked the listagg function is having limitation of 4000 char.
    I tried but I am unable to achive this. Can someone provide me a sample example to achive this
    select d.dname,d.loc,e.hiredate
    ,listagg(e.ename,',' ) within group (order by e.deptno) over (partition by e.deptno) as e_orig
    ,listagg(e.ename, ',') within group (order by e.sal) over (partition by e.deptno) as d_orig
    from emp e, dept d
    where e.deptno=d.deptno;[ This is my first post, I gone through the guideline for posting a post , and try to go according to that ( I have not pasted here create table and insert as I have used basic table emp, dept for example), please let me know if still I should give this, I will take care from my next post ]
    Thanks in advance

    Interesting, I didn't know you could do that, but...
    BluShadow wrote:
    You could write some PL/SQL code that does it all for you, but that would involve loops and would be slow.Well, objects are written in PL/SQL aren't they? And presumably there'll be implicit looping too? So it's not at all obvious that this method will be faster than doing the joining in PL/SQL in memory. The only way to find out is to benchmark them - so I have done that.
    I noticed that OP's ref cursor actually only ever retrieves a single record for a bound department number, so I decided the best thing would be to test using a procedure that passes an output string back. I selected all (109) employees and put spaces in to ensure above 4000 characters. I also noticed that as he is using PL/SQL he probably can use a VARCHAR2 type, but just not ListAgg in the query, so I wrote short procedures as follows:
    SimpleAggChr     - bulk collect and array processing, VARCHAR2 output
    ClobAggPrc     - the custom aggregation method, CLOB output
    SimpleAggClob     - bulk collect and array processing, CLOB output
    I then wrote a driving script that calls them in the order above and times each call (I like benchmarking so I have my own timing object to make it easy). I then print the lengths for checking, and my object writes the timings to my output table. Running a few times I got varying results, but generally it looks like there isn't a lot to choose between them for performance.
    Here's the procedure code:
    CREATE OR REPLACE TYPE char100_list_type AS TABLE OF VARCHAR2(100)
    CREATE OR REPLACE PROCEDURE SimpleAggChr (x_out OUT VARCHAR2) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggChr;
    CREATE OR REPLACE PROCEDURE SimpleAggClob (x_out OUT CLOB) IS
      l_enames     char100_list_type;
    BEGIN
      SELECT first_name || '                                        ' || last_name
        BULK COLLECT INTO l_enames
        FROM employees
       ORDER BY salary;
      FOR i IN 1..l_enames.COUNT LOOP
        x_out := x_out || l_enames(i) || ',';
      END LOOP;
    END SimpleAggClob;
    SHO ERR
    PROMPT ClobAggPrc
    CREATE OR REPLACE PROCEDURE ClobAggPrc (x_out OUT CLOB) IS
    BEGIN
      SELECT clobagg(first_name || '                                        ' || last_name || ',')
        INTO x_out
        FROM employees
       ORDER BY salary;
    END ClobAggPrc;
    SHO ERRand the driving script:
    SET SERVEROUTPUT ON
    SET TIMING ON
    DECLARE
      l_enames_c1     CLOB;
      l_enames_c2     CLOB;
      l_enames_v     VARCHAR2(32767);
      l_timer     timer_set_type := timer_set_type ('Aggregation');
    BEGIN
      Utils.g_id := 'Aggregation';
      SimpleAggChr (l_enames_v);
      l_timer.Increment_Time ('SimpleAggChr');
      ClobAggPrc (l_enames_c1);
      l_timer.Increment_Time ('ClobAggPrc');
      SimpleAggClob (l_enames_c2);
      l_timer.Increment_Time ('SimpleAggClob');
      DBMS_Output.Put_Line ('SimpleAggChr returned string of length ' || Length (l_enames_v));
      DBMS_Output.Put_Line ('ClobAggPrc returned string of length ' || Length (l_enames_c1));
      DBMS_Output.Put_Line ('SimpleAggClob returned string of length ' || Length (l_enames_c2));
      l_timer.Write_Times;
    END;
    SET TIMING OFF
    SET LINES 150
    SET PAGES 1000
    COLUMN id FORMAT A30
    COLUMN line_text FORMAT A120
    SELECT line_text
      FROM output_log
    WHERE id = 'Aggregation'
    ORDER BY line_ind
    /and the results:
    SimpleAggChr returned string of length 5779
    ClobAggPrc returned string of length 5779
    SimpleAggClob returned string of length 5779
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:27.05
    LINE_TEXT
    Timer Set: Aggregation, constructed at 03 Nov 2011 16:27:07, written at 16:27:35
    ================================================================================
    [Timer timed: Elapsed (per call): 0.02 (0.000016), CPU (per call): 0.01 (0.000010), calls: 1000, '***' denotes corrected
    line below]
    Timer              Elapsed          CPU          Calls        Ela/Call        CPU/Call
    SimpleAggChr          9.84         0.36              1         9.84400         0.36000
    ClobAggPrc            9.37         0.32              1         9.37400         0.32000
    SimpleAggClob         8.25         0.22              1         8.25000         0.22000
    (Other)               0.00         0.00              1         0.00000         0.00000
    Total                27.47         0.90              4         6.86700         0.22500
    13 rows selected.

  • WdDoExit and Sync functionality for Mobile Offline Application

    Hey everyone,
    Hoping for some insight here.
    First of all, this is my requirement.  Reservation Items are downloaded to the client.  Any unposted items need to be uploaded as well as the posted items.  So really, one sync would download them all and another sync should upload them all back.  The modify bapi wrapper will unlock these unposted items for other people to pick.
    What I understand is that the nodes on the client have to have an attribute changed in order to be uploaded to the backend for validation.  Is there a setting that can be set to upload all items?  My guess is this wasn't how the offline stuff was designed.
    If not my solution is to update all Reservation items that have not been posted.  I'm doing this on the exit of the application in the wdDoExit function.  However, I was hoping to pop the user a message and have them decide if they actually wanted to exit.  In case they exited by mistake.  Is there a way to cancel an exit?
    I appreciate all ideas.
    Thanks,
    Alex

    Hi,
    I am sitll not clear about the issue you are facing but here are some facts about the mobile client 7.1
    a) As and when a CRUD happens on a node element for a data object node and a commit is called, sync messages are automatically created. These messages for create,update,delete operations are sent to DOE In the next sync cycle and any changes from DOE are also recieved and consumed in the same sync cycle.
    b) wdDoEXit methods on application controller & view controller are relevant for performing any final steps on exit which can be also used to commit also.
    c) Use OCARoot.getInstance().commit() for committing any unsaved changes done in the application. All unsaved changes across any data object will be saved.
    Regards,
    Nipun

  • Can anyone plz tell me the steps for performance tuning.

    hello friends
    what is performance tuning?
    can anyone plz tell me the steps for performance tuning.

    Hi Kishore, this will help u.
    Following are the different tools provided by SAP for performance analysis of an ABAP object
    Run time analysis transaction SE30
    This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    SQL Trace transaction ST05
    The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    Need for performance tuning
    In this world of SAP programming, ABAP is the universal language. In most of the projects, the focus is on getting a team of ABAP programmers as soon as possible, handing over the technical specifications to them and asking them to churn out the ABAP programs within the “given deadlines”.
    Often due to this pressure of schedules and deliveries, the main focus of making a efficient program takes a back seat. An efficient ABAP program is one which delivers the required output to the user in a finite time as per the complexity of the program, rather than hearing the comment “I put the program to run, have my lunch and come back to check the results”.
    Leaving aside the hyperbole, a performance optimized ABAP program saves the time of the end user, thus increasing the productivity of the user, and in turn keeping the user and the management happy.
    This tutorial focuses on presenting various performance tuning tips and tricks to make the ABAP programs efficient in doing their work. This tutorial also assumes that the reader is well versed in all the concepts and syntax of ABAP programming.
    Use of selection criteria
    Instead of selecting all the data and doing the processing during the selection, it is advisable to restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code.
    Not recommended
    Select * from zflight.
    Check : zflight-airln = ‘LF’ and zflight-fligh = ‘BW222’.
    Endselect.
    Recommended
    Select * from zflight where airln = ‘LF’ and fligh = ‘222’.
    Endselect.
    One more point to be noted here is of the select *. Often this is a lazy coding practice. When a programmer gives select * even if one or two fields are to be selected, this can significantly slow the program and put unnecessary load on the entire system. When the application server sends this request to the database server, and the database server has to pass on the entire structure for each row back to the application server. This consumes both CPU and networking resources, especially for large structures.
    Thus it is advisable to select only those fields that are needed, so that the database server passes only a small amount of data back.
    Also it is advisable to avoid selecting the data fields into local variables as this also puts unnecessary load on the server. Instead attempt must be made to select the fields into an internal table.
    Use of aggregate functions
    Use the already provided aggregate functions, instead of finding out the minimum/maximum values using ABAP code.
    Not recommended
    Maxnu = 0.
    Select * from zflight where airln = ‘LF’ and cntry = ‘IN’.
    Check zflight-fligh > maxnu.
    Maxnu = zflight-fligh.
    Endselect.
    Recommended
    Select max( fligh ) from zflight into maxnu where airln = ‘LF’ and cntry = ‘IN’.
    The other aggregate functions that can be used are min (to find the minimum value), avg (to find the average of a Data interval), sum (to add up a data interval) and count (counting the lines in a data selection).
    Use of Views instead of base tables
    Many times ABAP programmers deal with base tables and nested selects. Instead it is always advisable to see whether there is any view provided by SAP on those base tables, so that the data can be filtered out directly, rather than specially coding for it.
    Not recommended
    Select * from zcntry where cntry like ‘IN%’.
    Select single * from zflight where cntry = zcntry-cntry and airln = ‘LF’.
    Endselect.
    Recommended
    Select * from zcnfl where cntry like ‘IN%’ and airln = ‘LF’.
    Endselect.
    Check this links
    http://www.sapdevelopment.co.uk/perform/performhome.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/afbad390-0201-0010-daa4-9ef0168d41b6
    kindly reward if found helpful.
    cheers,
    Hema.

  • Comparing SELECTs for performance

    I have a long-running function module and through SAT, I've identified its SELECT from BSEG as a potential hotspot and way that I can improve the run time, etc.
    Through some research in SCN, I found I can/should use one of the component tables (BSID) to improve performance, but I don't know *how much* of an improvement it will be.
    Rather than change the code of the FM and transport it to QA just to analyze performance gains, I was hoping there was some sort of tool that I could use to analyze separate code comparatively.
    I thought of making 2 Quickviewer queries (one for BSEG and one for BSID) and then using ST05 to analyze each.  Is there a better way?
    Basically in PRD, I'd like to compare isolated SELECTs for performance to see what gains I could make.
    Thanks
    Jeremy H.

    You can find some interesting discussions linked here, some also talk about index access:
    FAQ's, intros and memorable discussions in the ABAP Testing and Troubleshooting Space
    Regarding your point 4), make sure your WHERE-condition contains as many fields of the index top down without gaps.
    Looking at BSID~4:
    MANDT
    Client
    BUKRS
    Company Code
    REBZG
    Number of the Invoice the Transaction Belongs to
    REBZJ
    Fiscal Year of the Relevant Invoice (for Credit Memo)
    REBZZ
    Line Item in the Relevant Invoice
    KUNNR
    Customer Number
    UMSKS
    Special G/L Transaction Type
    REBZT
    Follow-On Document Type
    MANDT will be included automatically. BUKRS is not very selective (not many distinct values), but you must include it since it is the leading field of the index. REBZG sounds like a selective field, so you can likely use the index effectively by having just BUKRS and REBZG in your WHERE-condition, but the more the better.
    Also have a look at transactions DB05 and TAANA which can give you a good idea about the actual data distribution.
    Thomas

  • Business Functions for EHP 4 and EHP 5

    Hi Friends,
    We are planning to implement LSO, ECM, Travel, PMS and E Recruitment.
    What are all the business functions available in EHP4 and EHP5 for these modules.
    Please help me with your inputs.
    Thanks,
    Charle

    Hello Charle,
    Following are the business functions available :
    HCM_ECM_CI_1     For ECM EHp4
    HCM_ECM_CI_2     For ECM EHp5
    HCM_ERC_CI_2      For EREC  EHp4
    HCM_ERC_CI_3     FOR EREC EHP4
    HCM_ERC_CI_4       For EREC EHP5
    HCM_ERC_SES_1   For Search in EREC
    HCM_OSA_CI_1     For Performance Managemt EHP4
    HCM_OSA_CI_2     For Performance Managemt EHP5
    HCM_LSO_CI_2   For LSO EHP4
    HCM_LSO_CI_3  For LSO EHP5
    These are BF, which you are looking for, you can get more information on help.sap.com
    Best Regards,
    Deepak.

  • Business Functions For Empty and DSD

    Hi
    We have installed ECC 6 at one of our client and the client's business is related to Beverage Industry and in order to use the functionalities of Empties and DSD we want to be sure about ECC Business Functions available for the Beverage Industry. Kindly reply with the related Business Functions available and need to be activated for Empties and DSD.
    Regards,

    Hello Charle,
    Following are the business functions available :
    HCM_ECM_CI_1     For ECM EHp4
    HCM_ECM_CI_2     For ECM EHp5
    HCM_ERC_CI_2      For EREC  EHp4
    HCM_ERC_CI_3     FOR EREC EHP4
    HCM_ERC_CI_4       For EREC EHP5
    HCM_ERC_SES_1   For Search in EREC
    HCM_OSA_CI_1     For Performance Managemt EHP4
    HCM_OSA_CI_2     For Performance Managemt EHP5
    HCM_LSO_CI_2   For LSO EHP4
    HCM_LSO_CI_3  For LSO EHP5
    These are BF, which you are looking for, you can get more information on help.sap.com
    Best Regards,
    Deepak.

  • Upload functionality for Posting level 30

    HI,
    I have a situation where I need to post around 800 entries at every period at posting level 30.
    Is there any options to upload the documnets, as it is very difficult and time consuming for posting manually.
    Can any one suggest how to develop an upload method for posting level 30?
    Thanks in Advance,
    Richard

    our basis team did it, once in each system, during a weekend/night when everyone else was locked out/inactive.
    As you would expect, they activated function FIN_ACC_GROUP_CLOSE in Dev, then we tested it
    Then when happy, we went to QA, user testing then Production
    We had a transport freeze during this period but it did not take us long (eg under 1 week)
    There is no requirement to perform any further activations, unless you want the next functionality (we did not need the next 2 functions yet)
    If you want to activate the later functions, you must first activate the earlier functions
    You can activate all of the functions at the same time (in the correct order) but you must perform testing and remember that you cannot undo the activation
    NB for BCS there are only 3 functions for BCS (NB I don't know about EHP5 yet):
    FIN_ACC_GROUP_CLOSE (available in EHP2)
    FIN_ACC_GROUPCLOSE_2 (available in EHP3)
    FIN_ACC_GC_TAXRATECHG (EHP4)
    - So you would have a maximum of 3 activations per system, or you could activate all at once.
    Once activated, all of the new configuration options in that function are available in the workbench

Maybe you are looking for