How to do the  Calculation of Employeeu0092s Total Compensation

Hi Im stuck coding with this codes hope you could help me. Please advice me a possible way to code this one. Thanx!!!
Step 4: Calculation of Employee’s Total Compensation
As mentioned in Step 3, wage types are scattered in different infotypes which needs to be summed up to come up with the final employee’s “Total Compensation”.  In order to accumulate the total compensation of an employee that will be referenced by the  Bill Code & Activity Type Assignments Table (Name: ZHBILLACTVTY), the following infotypes should be read:
-     Infotype 0008 (Basic Pay)
-     Infotype 0015 (Additional Payments)
-     Infotype 0014 (Recurring Payments and Deductions)
Infotype 0008 – Basic Pay
Retrieve “Annual salary” on table PA0008, field ANSAL. This amount should be added to the “Total Compensation” counter.  You can do this using the function module HR_READ_INFOTYPE or you can do a SELECT from table PA0008.
Infotype 0015 – Additional Payments
The wage type amount from infotype 0015 must be read in order to add any additional payments to the “Total Compensation” counter. The custom Compensation Components table (Name: ZHCOMPENSTN) defined in this extension indicates which wage types will be applicable for each country. Therefore, the following logic should be followed:
a)     Loop through all of the employee’s records for Infotype 0015.
b)     If the wage type (PA0015-LGART) is assigned to the employee's country (Based on the custom Compensation Component table ZHCOMPENSTN), then proceed to next step. Otherwise, skip the record since this will not be included or added in the “Total Compensation” counter.
c)     If the payment date (PA0015-BEGDA) is between the start date of the fiscal year (Sept 01) and the end date of the fiscal year (Aug 31), then add the additional payment amount (PA0015-BETRG) to the Total Compensation counter.
d)     Endloop. (Repeat process for the next record for Infotype 0015)     
Infotype 0014 – Recur. Payments/Deds.
The last among the scope of the calculation for an employee’s Total Compensation will be recurring payments. The wage type amount from Infotype 0014 must be read in order to add any recurring payments to the Total Compensation counter. The custom “Compensation Components” table (ZHCOMPENSTN) indicates which wage types will be applicable for each country thus will be added to the Total Compensation package.
The following logic below will detail how to capture all payments for the fiscal year. Again, in order to get all the Infotype 0014 records of an employee you can use the function module “HR_READ_INFOTYPE” or execute a SELECT statement from table PA0014.
Basic logic flow will be as follows:
LOOP through all of the employee’s records for Infotype 0014.
IF wage type (PA0014-LGART) is assigned to the employee’s country (check on table ZHCOMPENSTN).
     Proceed to detailed logic for Scenarios 1 – 4 below.
ELSE
            Exit. (Skip the wage type since it is not applicable to the country’s calculation)
ENDLOOP
Detailed Scenarios 1 – 4
Scenario 1 – When the payment started before the beginning of the fiscal year AND is still being paid out.
IF payment end date (PA0014-ENDDA) = ’12.31.9999’ (Delimited) AND 1st payment date (PA0014-ZDATE) < Sept. 01 of the current fiscal year
      Accumulate all payments occurring between Sept 01 and Aug 31 of the current fiscal year (Refer below for the logic determining and accumulating all payments for the fiscal year).
Scenario 2 – When the payment started within the fiscal year AND is still being paid out.
ELSEIF payment end date (PA0014-ENDDA) = ’12.31.9999’ (Delimited) AND 1st payment date (PA0014-ZDATE) > Aug 31 of the current fiscal year
      Accumulate all payments occurring between the 1st payment date and Aug 31 of the current fiscal year (Refer below for the logic determining and accumulating all payments for the fiscal year).
Scenario 3 – When the payment started within the fiscal year BUT also ended within the fiscal year.
ELSEIF payment end date (PA0014-ENDDA) <> ’12.31.9999’ (Delimited) AND 1st payment
date > Aug 31 of the fiscal year.
      Accumulate all payments occurring between the 1st payment date and the end date of the record (PA0014-ENDDA). (Refer below for the logic determining and accumulating all payments for the fiscal year).
Scenario 4 – When the payment started before the beginning of the fiscal year BUT also ended within/during the fiscal year.
ELSEIF (payment end date (PA0014-ENDDA) <> ’12.31.9999’ (Delimited) AND payment end date within current fiscal year) AND 1st payment date < Sept 01 of the fiscal year
        Accumulate all payments occurring between the Sept 01 of the current fiscal year and the end date of the record (PA0014-ENDDA). (Refer below for the logic determining and accumulating all payments for the fiscal year).
ELSE
      Exit (Skip the wage type since the full payment has accrued in previous fiscal years)
ENDIF  
Logic for determining and accumulating all payments for the fiscal year
A variable (ex: [Payment date]) should be used to store each successive payment. The variable should be initialized as follows, depending on the scenario. 
For Scenario 1, set [Payment date] = 1st payment date occuring after Aug 31 (current fiscal year)
For Scenario 2, set [Payment date] = 1st payment date (Screen field: P0014-ZDATE)
For Scenario 3, set [Payment date] = 1st payment date (Screen field: P0014-ZDATE)
For Scenario 4, set [Payment date] = 1st payment date occuring after Aug 31 (current fiscal year)
IF  the [Payment date] is <= to the infotype 0014 record end date (PA0014-ENDDA), do
If the [Payment date] is in between the start and end date of the current Fiscal year
     If the unit (PA0014-ZEINH) is “Days”,
           [Payment date] = [Payment date] + (# of days)
           Add recurring payment (PA0014-BETRG) to total compensation counter
           Endif
     If the unit (PA0014-ZEINH) is “Weeks”, then {
              [Payment date] = [Payment date] + (# of weeks)
           Add recurring payment (PA0014-BETRG) to total compensationcounter
     Endif
     If the unit (PA0014-ZEINH) is “Months”, then {
              [Payment date] = [Payment date] + (# of months)
            Add recurring payment (PA0014-BETRG) to total compensation counter
     Endif
     If the unit (PA0014-ZEINH) is “Years”, then {
               [Payment date] = [Payment date] + (# of years)
            Add recurring payment (PA0014-BETRG) to total compensation counter
     Endif  
Endif
Endif
Repeat for next payment
Repeat for the next infotype 0014 record (if it exists)
Once the above processing is complete, the “Total Compensation” counter should contain the employee's total compensation that should be used when referencing the Bill Code & Activity Type Assignment table ZHBILLACTVTY.

Hello,
do you know where can I configure "Total Compensation Statement"? I'm working in ERP 2004.
I've created a new form in Smart Forms and now I want to change the default form used in the Portal.
Thanks a lot
Antonio

Similar Messages

  • How to make the calculation or formula in bottom of the coloum

    How to make the calculation or formula in bottom of the coloum in Discoverer report.
    Regadrs
    Manikandan

    Hi Ros
    You have a couple of issues, one that is simple to resolve and one that is not so simple.
    First, the simple one - the word TOTAL. To alter the word that Discoverer inserts next to a total, or to even remove the word altogether, use this workflow:
    1. Right-click on the total and from the pop-up menu select Edit Total
    2. At the bottom right-hand corner of the Edit Total dialog box is the area where the label is maintained. You will see a checkbox for the label
    3. If you uncheck the label you can change the label to anything you like, including nothing
    4. After you have set the label, click OK and close the Edit Total dialog box
    Note: In Desktop, this is done via a drop-down from the Total dialog box. If you click the drop-down, the last item in the list is called Generate Label Automatically. If you uncheck this you can create your own label.
    Your second issue concerning the non-totaling of the grand total on some items means that there is something preventing one or more of the totals from calculating. First of all, try to determine which item or items is causing the problem by adding individual totals to each of the desired columns. You will eventually find the column which has the culprit. If you use the above workflow to suppress the display of any labels your total line will look as though you have totaled all items.
    Next, having found the column that will not total, try to figure out why the values will not add up. Could the column be a calculated item? If so, it is possible that you have used SUM on the outside of the calculation, like this:
    SUM(some item - some other item) - this will not total if the original items themselves are in the query and are also being summed. This is because you are mixing aggregate and detail items within the total.
    Try changing the formula like this:
    SUM(some item) - SUM(some other item) and see if this helps.
    If this is not the cause then try changing the formula for that column's total to CELL SUM instead of SUM. This causes Discoverer to literally add the values in the column.
    If this is not the cause, could you possibly be trying to total repeated values? By default, this is disabled in the later versions of Discoverer. The repeated values will be caused if you have multiple joins in your query and the item that you are totaling is from the many end of a one to many relationship. Suppose you had items from a header table and line table in the same worksheet with there being multiple lines for the same header, and now let's say you have a column which is returning something from the header. That value will get repeated and if you try to total it would generate the wrong answer, hence out of the box Discoverer is trying to protect you from yourself.
    However, it could be that the column really should be totaled but because Discoverer has detected a one to many join it will not total that column. To prove that this is the reason, change the join from a one to many to a one to one. Don't worry, this won't stop the query from working. If this allows the total to work then you can either leave the join as it is with a one to one, which won't harm Discoverer or you can edit the pref.txt on the server and change one of the preferences.
    The preference I would change is called AllowAggregationOverRepeatedValues. By default this is disabled and will be set to 0. Changing this to a 1 will now tell Discoverer that repeated values can now be totaled. Don't forget to apply the preferences correctly by execiting applypreferences.bat, on Windows or applypreferences.sh, in Linux or Unix, and then stopping and restarting the Discoverer server.
    I hope this helps
    Best wishes
    Michael Armstrong-Smith
    URL: http://learndiscoverer.com
    Blog: http://learndiscoverer.blogspot.com

  • How to use the Calculated attibute in view object

    Hi,
    I have a view object query with the calculated attribute name as 'TRANCODE' in the below sql.This query works for the initial page loading.
    After the page gets loaded, there is a search section in the same page at the top.
    Here i will have to build the whereclause to the same query and retrieve the values.
    i am using jDeveloper 10.1.3.1, with adf and jHeadstart.
    Can some one tell as how to use the calculated attribute TRANCODE in whereclause?
    SELECT /*+ first_rows(10) */
    BatchCntl.FILE_CNTL_ID,
    CASE WHEN chk_bit(Entry.ENTRY_FLAGS, 2)='Y' OR Entry.ENTRY_SUBSTATUS = 'D' OR Entry.ENTRY_SUBSTATUS = 'J'
    THEN
    CASE eeh.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE eeh.TRAN_CODE
    END
    ELSE
    CASE Entry.TRAN_CODE
    WHEN '21' THEN 'C'
    WHEN '22' THEN 'C'
    WHEN '31' THEN 'C'
    WHEN '32' THEN 'C'
    WHEN '26' THEN 'D'
    WHEN '27' THEN 'D'
    WHEN '36' THEN 'D'
    WHEN '37' THEN 'D'
    ELSE Entry.TRAN_CODE
    END
    END AS TRANCODE,
    FROM Batch_Cntl BatchCntl, Entry, ENTRY_EDIT_HIST eeh
    WHERE (BatchCntl.BATCH_TYPE = 'E')
    AND (BatchCntl.BATCH_STATUS in ('A','D','R','P'))
    AND entry.in_batch_cntl_id = BatchCntl.BATCH_CNTL_ID
    and Entry.fi_rt = eeh.fi_rt (+)
    and Entry.entry_id = eeh.entry_id (+)
    AND (Entry.ENTRY_STATUS in ('A','D','R','P'))
    ORDER BY BatchCntl.BATCH_CNTL_ID, Entry.entry_id
    regards
    Raj.

    Let's say your application module is com.yourcompany.someapp.services.MyService, and let's say you authored a method like the following in the MyServiceImpl.java file:
      public void doSomething(int i, String s) {
      }and you exposed this AM custom method using the AM editor.
    BC4J design time will automatically create you the com.yourcompany.someapp.services.common.MyService interface that will look like this if you go look at the source code:
    package com.yourcompany.someapp.services.common;
    import oracle.jbo.ApplicationModule;
    public interface MyService extends ApplicationModule {
      public void doSomething(int i, String s);
    }To use your custom method from a client, just cast your ApplicationModule to your custom interface like this:
    import com.yourcompany.someapp.services.common.MyService;
      MyService mySvc = (MyService)yourAM;
      mySvc.doSomething(1,"foo");

  • How to do the calculations with currency fields in table control?

    Hi everybody,
    Can anyone tell me how to do the calculations (arithmetical) with the currency fields which have been assigned for a table control fields? Actually they should be fetched from the database table and need to do some calculations and after that the same should get updated at the database level.
    Here, i am getting the short dump after doing the calculations and trying to display at the table control field itself.....
    Can anyone help me in this issue........
    Thank you very much.....in advance,
    Somu.

    Hi,
    Thanks to your replies all,
    But, even though the sign check box is checked in the SAP domain WRTV7, in my program it is not showing the negative sign at all...
    I am keep trying for all the options...
    But still it is not working out...
    My requirement is after fetching the data from the database i need to do calculations and save back same to the customized table field, for which the domain i have checked the sign and have done it also...
    I'd be highly thankful to you, if you can help me out...
    Thank you,
    Somu.

  • How to populate the calculated value into screen field.

    I am doing one enhancement in QM.I have added one custom screen to notification transaction ( QM01/QM02/QM03) transaction tab strip control using the enhancement QQMA0001.The Details of the calling and called screens as shown bellow
    The Calling screen: SAPLIQS0
    Screen Number: 7790
    Screen Area :USER0001
    Called Screen: SAPLXQQM
    Screen Number: 0101
    I have developed the Custom Screen in screen 0101 and called in PBO of program SAPLIQS0 7790 screen.
    The Screen in calling perfectly .The Custom screen having different fields like Raw cost, Intermediate cost, Finished cost, SCAR Cost and Sales Order Cost Etc... These fields are out put filed types. No input for these screens.. I have few doubts regarding this
    How to populate the calculated values in Custom screen?
    Where we wrote the code to populate the calculated values in custom screen?
    You have any idea please guide me
    Thanks & Regards,
    Samantula

    As your screen fields should be global variables in SAPLXQQM, you may initialize them by implementing function module EXIT_SAPMIWO0_008 which also belongs to SAPLXQQM (Customer Exit: Transfer Notification Data to User Screen)

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

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

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

  • How to change the label of a total column in pivot view

    Hi
    Is there a way to change the label of the column created by analytics when calculated row based totals? Currently, it is same as the measure label to be summed.
    Thanks

    Hi
    Thanks for your help, actually that option works for the total displayed as the latest row, I mean the label for the total row. However, for the total column, the name stays as the same as the measure label.
    Can you further help me on the issue?
    Thanks

  • How to capture the calculated (using pricing engine ) quote line price

    Hi everyone,
    Need some help.
    Can anybody explain me:
    How to capture the quote line price on run time when the pricing engine is invoked and at the same time this calculated quote line price should not get updated in the base table(Quoting module in CRM).
    Please help me.
    Thanks,
    Srinivas
    Edited by: user0232 on Aug 26, 2011 8:21 AM

    Hi,
    Which cost to capture is depends on Costing and valuation varients
    Got to OKP6 or OKP8
    Select valuation varient >>> Maintain strategy sequence under MATERIAL VALUATION
    Which system can take first Variable or standard.
    Kapil

  • How to disable the Calculation mode in oracle form

    hi All,
    i have 2 text items in one block.say TEXT_A, TEXT_B
    TEXT_B is showing the SUM of TEXT_A where TEX_A is poulated by DB query and showing UOM(unit of measure for an item).
    But
    on some condition, i dont want to do SUM (like if the UOM are differents).
    how can we disable or off the calculation mode for TEXT_B.
    Nitn

    hi Craig
    thanks for your reply but its not working-
    please agn read the scenario , i have added more details -
    suppose in a single block we have 3 TEXT_ITEM
    I have one text item TEXT_A which is populated by EXECUTE_QUERY .TEXT_A having 3 lines and values may be-
    first case
    KG
    KG
    KG
    Second case
    KG
    KG
    METER
    TEXT_B also having 3 lines and USer can enter values in this field.
    TEXT_C is the sum of text_B and TEX_C is having one line as to show sum of B .
    i have set the TEXT_C property palette properties to show sum of TEXT_B and it is working fine.
    now if the values are same in TEXT_A, TEXT_C should show SUM of text_b.
    but if it is second case if the values are different then TEXT_C should not poulate .
    do we have any SET_ITEM_PROPERTY(':blk_name',???????????,prperty_false)
    ?????????= so it can disable the Summary function whihc i set from property pallettle
    hoping for reply.

  • How much is the single dreamweaver in total?

    If I buy the single App plan with prepaid $239.88/year for dreamweaver cc, do I need to pay the next year? How much is the total of it?

    You would need to continue paying annually, at whatever rate Adobe sets for the year, or switch to a month-to-month plan to continue using the program past the initial 12 months.
    As Nancy mentions, CS6 is the only version available from Adobe on a Perpetual License where you pay once and have the program "forever". Of course that's barring any software/hardware conflict as you upgrade your systems in the future that could potentially kill the program. As noted, there are no updates coming out for that version any longer.
    There hasn't been any word that I've seen on exactly how long CS6 will remain available from Adobe. Chances are relatively good it will go the way of the dinosaurs sooner rather than later though, leaving the subscription as the only way to get Adobe apps.

  • How to do the calculation in the plsql loop?

    Hi,
    I have table like below below
    MODEL_NAME     ITEM_NUMBER     DA_VALUE
         A     A-1          2.1
         A     A-2          3.1
         A     A-3          1.1
         A     A-4          4.5
         B     B-1          3.2
         B     B-2          5.3
         B     B-3          7.2
         C     C-1          3.9
         C     C-2          4.0
         C     C-3          9.9          I need to write a stored procedure with 2 input values. One is design_code and another one is model_name. I will pass the model name as comma
    separated values to the procedure. Model name is nothing but A,B,C in the above table. Procedure has to split those model names and display
    all the item_numbers and da_numbers for the model names.
    Here the logic is i have to take all the model's item da_value and multiply.
    For example for the above table, I have to multiply all A-1 da_values and B-1 da_value and C-1 da_value then stored in to one array that result.
    Again A-1 da_value and B-2 da_values and C-2 da_values then stored into the same array.
    Again A-1 da_value and B-3 da_values and C-3 da_values then stored into the same array.
    After that come to A-2 da_value and start B-1 da_value and C-1 da_value then store into the same array.
    Again A-2 da_value and B-2 da_values and C-2 da_values then stored into the same array.
    Again A-2 da_value and B-3 da_values and C-3 da_values then stored into the same array.
    So like this only the flow should go for all the models. Below is the sample example.
    v_variable := 2.1 * 3.2 * 3.9;
               A-1   B-1   C-1
    v_variable := 2.1 * 5.3 * 4.0;
               A-1   B-2   C-2          
    v_variable := 2.1 * 7.2 * 9.9;
               A-1   B-3   C-3
    v_variable := 3.1 * 3.2 * 3.9;
               A-2   B-1   C-1          
    v_variable := 3.1 * 5.3 * 4.0;
               A-2   B-2   C-2     The calculation should happen like above example. Can anyone share with your thoughts?
    Thanks

    Hi All,
    I have built the below package. It is something like below. But it is working 75%. can you rearrange this?
        PROCEDURE calc_cv_valve (
                i_design_cv     IN NUMBER,
                i_option_class  IN VARCHAR2
                --o_calculated_cv OUT FND_TABLE_OF_VARCHAR2_255,
                --o_item_number   OUT FND_TABLE_OF_VARCHAR2_255
        IS
            CALC_CV     FND_TABLE_OF_VARCHAR2_255 := FND_TABLE_OF_VARCHAR2_255();
            ITEM_NUMBER FND_TABLE_OF_VARCHAR2_255 := FND_TABLE_OF_VARCHAR2_255();
            TYPE calculate_oc1_cv_rec IS RECORD
                     ITEM_NUMBER          VARCHAR2(100) := NULL,
                     CV_NUMBER      NUMBER := NULL                
            TYPE calculate_oc1_cv_tbl_type IS TABLE OF calculate_oc1_cv_rec INDEX BY BINARY_INTEGER;
            v_calculate_oc1_cv_tbl_type   calculate_oc1_cv_tbl_type;
            v_calc_oc1_index  PLS_INTEGER;
            TYPE calculate_oc2_cv_rec IS RECORD
                     ITEM_NUMBER          VARCHAR2(100) := NULL,
                     CV_NUMBER      NUMBER := NULL                
            TYPE calculate_oc2_cv_tbl_type IS TABLE OF calculate_oc2_cv_rec INDEX BY BINARY_INTEGER;
            v_calculate_oc2_cv_tbl_type   calculate_oc2_cv_tbl_type;
            v_calc_oc2_index  PLS_INTEGER;
            TYPE calculate_oc3_cv_rec IS RECORD
                     ITEM_NUMBER          VARCHAR2(100) := NULL,
                     CV_NUMBER      NUMBER := NULL                
            TYPE calculate_oc3_cv_tbl_type IS TABLE OF calculate_oc3_cv_rec INDEX BY BINARY_INTEGER;
            v_calculate_oc3_cv_tbl_type   calculate_oc3_cv_tbl_type;
            v_calc_oc3_index  PLS_INTEGER;               
            TYPE option_class_rec IS RECORD
                     OPTION_CLASS      VARCHAR2(100) := NULL
            TYPE option_class_tbl_type IS TABLE OF option_class_rec INDEX BY BINARY_INTEGER;
            v_option_class_tbl_type   option_class_tbl_type;
            v_option_index  PLS_INTEGER;
            v_count_option_class    NUMBER;
            v_attribstart           NUMBER;
            v_attribpos             NUMBER;
            v_calc1_inc     NUMBER;
            v_calc2_inc     NUMBER;
            v_calc3_inc     NUMBER;
            v_end_loop2     NUMBER;
            v_end_loop3     NUMBER;
            v_end_loop4     NUMBER;
            v_end_loop5     NUMBER;
            v_prior_loop    NUMBER;
            v_valid_cv      NUMBER;
            v_calculation   NUMBER;
        BEGIN
            BEGIN
                SELECT  COUNT(COLUMN_VALUE)
                INTO    v_count_option_class
                FROM    TABLE(xxcz_va_sizing_util_pkg.get_string_comma(i_option_class,','));
                DBMS_OUTPUT.PUT_LINE('Count of Option Class----: '||v_count_option_class);
            EXCEPTION
            WHEN OTHERS
            THEN
                NULL;       
            END;
            IF v_count_option_class = 3
            THEN
                v_attribstart := 1;
                v_attribpos := 1;
                v_option_index := 1;
                WHILE (v_attribpos <> 0)
                LOOP
                    v_attribstart := v_attribpos;
                    xxcz_va_sizing_util_pkg.tokenize_string (v_attribstart,
                                                            ',' || i_option_class,
                                                            v_option_class_tbl_type(v_option_index).option_class,
                                                            v_attribpos
                    v_option_index := v_option_index + 1;
                END LOOP;
                SELECT  item_number, cv_number
                BULK COLLECT INTO v_calculate_oc1_cv_tbl_type
                FROM    SAMPLE_CONTROLS--xxcz_va_controls_info
                WHERE   control_name = v_option_class_tbl_type(1).option_class;
                SELECT  item_number, cv_number
                BULK COLLECT INTO v_calculate_oc2_cv_tbl_type
                FROM    SAMPLE_CONTROLS--xxcz_va_controls_info
                WHERE   control_name = v_option_class_tbl_type(2).option_class;           
                SELECT  item_number, cv_number
                BULK COLLECT INTO v_calculate_oc3_cv_tbl_type
                FROM    SAMPLE_CONTROLS--xxcz_va_controls_info
                WHERE   control_name = v_option_class_tbl_type(3).option_class;
                --v_calc1_inc := v_calculate_oc1_cv_tbl_type.count;
                DBMS_OUTPUT.PUT_LINE('v_calculate_oc1_cv_tbl_type----: '||v_calculate_oc1_cv_tbl_type.count);
                --v_calc2_inc := v_calculate_oc2_cv_tbl_type.count;
                DBMS_OUTPUT.PUT_LINE('v_calculate_oc2_cv_tbl_type----: '||v_calculate_oc2_cv_tbl_type.count);          
                --v_calc3_inc := v_calculate_oc3_cv_tbl_type.count;
                DBMS_OUTPUT.PUT_LINE('v_calculate_oc3_cv_tbl_type----: '||v_calculate_oc3_cv_tbl_type.count);
                v_calc1_inc := 0;
                v_calc2_inc := 0;
                v_calc3_inc := 0;
                v_end_loop2 := 0;
                v_end_loop3 := 0;
                v_end_loop4 := 0;
                v_end_loop5 := 0;
                v_prior_loop    := 0;
                v_valid_cv  := 0;
                WHILE (v_calculate_oc1_cv_tbl_type.next(v_calc1_inc) IS NOT NULL) AND v_valid_cv = 0
                LOOP
                    DBMS_OUTPUT.PUT_LINE('Pre index count of oc1----: '||v_calc1_inc);
                    v_calc1_inc := v_calculate_oc1_cv_tbl_type.next(v_calc1_inc);
                    DBMS_OUTPUT.PUT_LINE('Post index count of oc1----: '||v_calc1_inc);
                    v_prior_loop := v_calculate_oc1_cv_tbl_type.prior(v_calc1_inc);
                    --IF v_calc1_inc <> v_prior_loop--v_end_loop2 = 1 OR v_end_loop4 = 1
                    --THEN
                        v_calc2_inc := 0;
                        DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'Y');
                    --END IF;
                    DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'N');
                    WHILE (v_calculate_oc1_cv_tbl_type.next(v_calc2_inc) IS NOT NULL)
                    LOOP
                        DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'Pre index count of oc2----: '||v_calc2_inc);
                        v_calc2_inc := v_calculate_oc1_cv_tbl_type.next(v_calc2_inc);
                        DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'Pre index count of oc2----: '||v_calc2_inc);
                        --IF v_calc1_inc <> v_prior_loop AND v_calc2_inc = v_calculate_oc1_cv_tbl_type.prior(v_calc2_inc)--v_end_loop3 = 1 OR v_end_loop5 = 1
                        --THEN
                            v_calc3_inc := 0;
                            DBMS_OUTPUT.PUT_LINE('Y');                       
                        --END IF;
                        DBMS_OUTPUT.PUT_LINE('N');                                       
                        WHILE (v_calculate_oc1_cv_tbl_type.next(v_calc3_inc) IS NOT NULL)
                        LOOP
                            DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'Pre index count of oc3----: '||v_calc3_inc);
                            v_calc3_inc := v_calculate_oc1_cv_tbl_type.next(v_calc3_inc);
                            DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'Pre index count of oc3----: '||v_calc3_inc);
                            DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'Calc Value----: '||v_calculate_oc1_cv_tbl_type(v_calc1_inc).cv_number||','
                                                                    ||v_calculate_oc2_cv_tbl_type(v_calc2_inc).cv_number||','
                                                                    ||v_calculate_oc3_cv_tbl_type(v_calc3_inc).cv_number);
                            v_calculation := v_calculate_oc1_cv_tbl_type(v_calc1_inc).cv_number + v_calculate_oc2_cv_tbl_type(v_calc2_inc).cv_number +
                                                v_calculate_oc3_cv_tbl_type(v_calc3_inc).cv_number;
                            DBMS_OUTPUT.PUT_LINE(v_calc1_inc||'Calculated value----: '||v_calculation);                                           
                            IF i_design_cv <= v_calculation
                            THEN
                                v_valid_cv  := 1;
                                DBMS_OUTPUT.PUT_LINE('v_valid_cv----: '||v_valid_cv);                           
                                GOTO end_loop;                           
                            END IF;
                            IF v_calculate_oc2_cv_tbl_type.next(v_calc2_inc) IS NOT NULL
                            THEN
                                v_end_loop2 := 1;
                                DBMS_OUTPUT.PUT_LINE('v_end_loop2----: '||v_end_loop2);                           
                                GOTO calc2_loop;                           
                            END IF;
                            IF v_calculate_oc3_cv_tbl_type.next(v_calc3_inc) IS NOT NULL
                            THEN
                                v_end_loop3 := 1;
                                DBMS_OUTPUT.PUT_LINE('v_end_loop3----: '||v_end_loop3);
                                GOTO calc3_loop;
                            END IF;                       
                            IF v_calc2_inc = v_calculate_oc2_cv_tbl_type.count AND v_calc3_inc = v_calculate_oc3_cv_tbl_type.count
                            THEN
                                IF v_calc2_inc = v_calculate_oc2_cv_tbl_type.count
                                THEN
                                    v_end_loop4 := 1;
                                ELSE
                                    v_end_loop5 := 1;
                                END IF;
                                DBMS_OUTPUT.PUT_LINE('Count point reached for both oc2 and oc3----: '||v_calculate_oc2_cv_tbl_type.count
                                            ||','||v_calculate_oc3_cv_tbl_type.count);
                                GOTO next_record;
                            END IF;
                            <<calc3_loop>>
                            DBMS_OUTPUT.PUT_LINE('Third Loop Conditions finished-------: '||v_calculation);
                        END LOOP;
                        <<calc2_loop>>
                        DBMS_OUTPUT.PUT_LINE('Second Loop Conditions finished-------: '||v_calculation);
                    END LOOP;
                    <<end_loop>>
                    DBMS_OUTPUT.PUT_LINE('Loop Conditions Satisfied-------: '||v_calculation);
                    <<next_record>>
                    DBMS_OUTPUT.PUT_LINE('Loop Conditions Started with next record-------: '||v_calculation);
                END LOOP;
            END IF;
        END calc_cv_valve;

  • Add the Rental Item in (Total Compensation Form) HR_CMP_TCS

    Hi,
    I would like to use the total compensation form (HR_CMP_TCS) to display the rental element which is stored in the payroll cluster. The wage type of the rental is 1RRA. The existing form displays the salary only now.
    I have already copied a new one to modify it. Any suggestion to add this item to the form.
    Regards,
    Tony

    Hi,
    HOw did you manage to get the salary displayed in the statment, Me and my ABAPer are struggling witht he same, can you please guide us on how did you go about modifying the statement to include the salary details?

  • How to give the calculation in Finacial report templates asper indian local

    Dear experts
    help me, how to give calculation in Financail report Templates in SAP b1 for calculating  Gross profit and Netprofit seperately.  I am facing some error while giving formula in financial report templates.
    Thanks
    Regards

    Hi Mathiladath,
    Try this,
    ->> Financials. -> Financial Report Templates in that follow this steps.
    1.Report. -> Choose (Profit and Loss)
    2.Template.-> Define New -> Give the name for template.
    3.And click the Generate Chart of account button in bottom right.
    4.put the Tick mark in Subtotal Check box
    5.now u can see Formula button (Click and Open the Formula Definition window and put the Formula)
    using this button create appropriate formula for your requirement(ask help your A/C department)
    6.Chose this template in P/L.
    Regards,
    Madhan.

  • How to check the calculation of standard price in ECC.

    Hello All
    I have a datasource 0co_pc_act_05 material valuation prices which  has the standard price. Now I would like to check how this standard price is calculated in ECC ( I mean on what basis it is calculated).
    I have spoke to my Business folks they say it should be (Quantity/per) * Amt.... How can I check the formula of standard price in ECC.
    Thanks
    Yeachni

    This extractor is based on table MBEW and standard price (STPRS) exists in the table. I don't think there is any logic is extracting this.

  • How to get the Calculated Component Qty  of BOM in BI

    Hi Gurus,
    I am working on a requirement where I need to get the BOM Calculated Component Qty which we see in CS11.
    The way it is getting calculated in ECC is :- If a Component has an Assembly then We take the Base quantity of that material from STKO table and Take the Component qty of its component and multiply the Component qty of The component and the component qty of the Material for which the assembly exist and divide it by the base qty of the component  of the Assembly.
    We need to put the same logic in BI. can anyone please help me how i can accomplish this.
    Thanks!

    CLOSED

Maybe you are looking for