PCR Social security: want to use wage type amount in decision operation

PCR Social Security: Want to use wage type amount for comparison  
Posted: Oct 21, 2010 11:00 AM                                  Reply
Dear Guru's,
hope u'll b fine and enjoying good health. Below is PCR for social security that I hav currently configured. Its working fine. However I have another scenario to add in this PCR.
Existing PCR works on the following logic
6% of Gross pay if employee's pay less than or equal to 10,000/-.
KZPESI=10000 from T511K
KZMESI=6 from T511K
IZPESI=600 from T511P
Now i want to add another comparison. also calculate Social security for employee those hire on pay less than or equal to 10,000 but currently have salary greater than 10K. for this I'll enter Social security amount in IT0014 subtype 6004. I
ZSSM Personnal Calculation Rule ZSSM
3
6004 Social security Contrib
AMT= 0001 Set
AMT+ 0002 Addition
AMT+ 0003 Addition
AMT+ 0004 Addition
AMT+ 1001 Addition
ROUNDGK100 Round AMT to next
AMT?KZPESI Comparison
<
AMT*KZMESI Multiplication
AMT/100 Division
RTE=TKSOLL Set
RTE-TKAU** Subtraction
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
=
AMT/TKDIVI Division
RTE=TKSOLL Set
RTE=TKAU** Set
MULTI ARA Multipl.amt/no/rate
AMT=IZPESI Set
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
>
if there is a value in 0014 subtype 6004 then
AMT/TKDIVI Division
RTE=TKSOLL Set
RTE=TKAU** Set
MULTI ARA Multipl.amt/no/rate
AMT=IZPESI Set
ROUNDGK100 Round AMT to next
ADDWT * OT Output table
Want to know how I can use wage type amount in comparison. look at the above lines in bold where i want to apply
kindly help
Edited by: Imran on Oct 21, 2010 11:40 AM

You say "if there is a value in 0014 subtype 6004 then...", so I will assume that you are talking of WT 6004 in Infotype 0014.
So, in a PCR immediately after IT0014 is processed (with function P0014 in your schema), look for WT 6004.  If it exists with a number (or an amount), create a temporary variable to act as a "flag"  (as in ADDWT&6004 or ADDWT&HIRE).
Then, in PCR ZSSM, you can query that temporary variable with the sequence of operations NUM=& HIRE NUM?0 (or NUM=& 6004 NUM?0 ). If the return value is =, it means that there was no IT0014 with WT 6004, and if the return value is * it means that there was.

Similar Messages

  • PCR Social Security: Want to use wage type amount for comparison

    Dear Guru's,
    hope u'll b fine and enjoying good health.  Below is PCR for social security that I hav currently configured. Its working fine. However I have another scenario to add in this PCR. 
    Existing PCR works on the following logic
    6% of Gross pay if employee's pay less than or equal to 10,000/-.
    KZPESI=10000 from T511K
    KZMESI=6        from T511K
    IZPESI=600      from T511P
    Now i want to add another comparison. also calculate Social security for employee those hire on pay less than or equal to 10,000 but currently have salary greater than 10K. for this I'll enter Social security amount in IT0014 subtype 6004.  I
    ZSSM Personnal Calculation Rule ZSSM
        3
          6004 Social security Contrib
            AMT=  0001 Set
            AMT+  0002 Addition
            AMT+  0003 Addition
            AMT+  0004 Addition
            AMT+  1001 Addition
            ROUNDGK100 Round AMT to next
            AMT?KZPESI Comparison
              <
                AMT*KZMESI Multiplication
                AMT/100    Division
                RTE=TKSOLL Set
                RTE-TKAU** Subtraction
                ROUNDGK100 Round AMT to next
                ADDWT *    OT   Output table
              =
                AMT/TKDIVI Division
                RTE=TKSOLL Set
                RTE=TKAU** Set
                MULTI ARA  Multipl.amt/no/rate
                AMT=IZPESI Set
                ROUNDGK100 Round AMT to next
                ADDWT *    OT   Output table
            >
              if there is a value in 0014 subtype 6004 then
                      AMT/TKDIVI Division
                       RTE=TKSOLL Set
                       RTE=TKAU** Set
                       MULTI ARA  Multipl.amt/no/rate
                      AMT=IZPESI Set
                      ROUNDGK100 Round AMT to next
                      ADDWT *    OT   Output table
      Want to know how I can use wage type amount in comparison. look at the above lines in bold where i want to apply
    kindly help
    Edited by: Imran on Oct 21, 2010 11:40 AM

    KZPESI=10000 from T511K
    KZMESI=6 from T511K
    IZPESI=600 from T511P
    Social security wage type is 6004 and it is subtype of 0014.
    ZSSM Personnal Calculation Rule ZSSM
    3
    6004 Social security Contrib
    AMT= 0001 Set
    AMT+ 0002 Addition
    AMT+ 0003 Addition
    AMT+ 0004 Addition
    AMT+ 1001 Addition
    ROUNDGK100 Round AMT to next
    AMT?KZPESI Comparison
    >
    At this point I want to set another comparison based on amount in 6004.
    if Amount in 6004 is > 0 then
       do calculation.
    hope it'll b more clear now

  • Want to use transaction type

    Hi,
      Enter another transaction type (Transaction type . does not exist)
    Message no. AA816
    Diagnosis
    According to your entry or specification, you want to use transaction type .. However, this transaction type has not been defined.
    Procedure
    Check the if transaction type . is defined in FI-AA Customizing.

    wat are u trying to do? nature of transaction?
    which transaction code are u using? and
    which transaction type u used?

  • How to get the split period wage type amount in payslip?

    How to get the split period wage type amount in payslip?
    Payroll period for 01.01.09 to 31.01.09.
    1.     Employee is active from 1.1.09 to 10.01.09
    2.     Employee is inactive from 11.01.09 to 20.01.09
    3.     Employee is again active from 21.01.09 to 31.01.09
    In Result Table three split periods are created.
    From 01.01.09 to 10.01.09 u2018Basic Salaryu2019 Wtype  1101 amt is 20.00
    From 11.01.09 to 20.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 00.00
    From 21.01.09 to 31.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 10.00
    My requirement is to print only the last split period in payslip from 21.01.09 to 31.01.09. May you please help me in this regard.
    Thanks in advance
    Regards,
    Rajesh.

    Hi
    Try to read the below:
    WPBPC : Distribute Lump Sum Wage Elements to WPBP Periods
      Object
        Operation
      Use
        Operation WPBPC distributes the amount of the current wage type to the
        active WPBP periods in the payroll period.
      Input
        The current wage type in the header entry of table OT is used as input
        for this operation.
      Procedure
        Within payroll, wage types are assigned to a fixed WPBP period by
        infotype 0014 Recurring Payments/Deductions, for example. However, you
        may want to distribute this payment to all active WPBP periods, which is
        what would happen if the wage type were entered in basic pay. Therefore,
        various specifications exist for parameter S:
        o   If the specification is 'A', and if several active WPBP periods
            exist, the amount is simultaneously reduced on a calendar-day basis.
        o   If the specification is 'D', the wage type is distributed to all
            existing WPBP periods without the amount being reduced.
        o   If the specification is 'S', and if the validity period starts or
            ends during the period, the entry in table WPBP is split using this
            date. The wage type is stored in table OT for the corresponding WPBP
            period.
            This parameter is only allowed if processing was accessed using
           function P0014.
           In this case, infotype 0014 must be processed before absence
           valuation and function PARTT. Otherwise, rejections occur during
           payroll processing.
       o   Specification 'X' is the combination of 'A' and 'S'.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is 'W', and if the validity period starts or
           ends during the period, the entry in table WPBP is split using this
           date (as with option 'S'). Unlike 'S', the wage type is not stored
           in table OT.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is ' ', the wage type is stored in table OT for
           each WPBP period in which the validity interval fits.
           This parameter is only allowed if processing was accessed using
           functions P0014 or P0015.
       If the WPBP split is set for a wage type, the wage type is stored
       without changes in table OT. If you specify a different wage type name
       in the second parameter, the wage type is stored with this name in table
       OT. Before you execute operation WPBPC, you may therefore need to delete
       the split using operation ELIMI.
       If a country-specific split (C1, C2, or C3 split) is set, the operation
       interprets it as an error. The employee in question is rejected by
       payroll. All other splits are transferred as they are.
      Output
        The processed wage type, or the wage type specified in the operation
        call, is written to table OT (output table) with the appropriate split
        indicator and reduced amount as operation output for each WPBP period.
        Parameter specification 'W' is the only exception.
      Syntax
        OOOOOSVVVV
        OOOOO       WPBPC       Operation name
        S
                    blank       distribute to all WPBP periods
                    S           split and distribute WPBP
                    W           split but do not distribute WPBP
                    A           distribute to active WPBP periods
                                with calendar-day reductions
                    D           distribute to all existing
                                WPBP periods
                    X           combination of 'S' and 'A'
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        Wage type before operation:
        WType       WPBP        Amount
        M100        00          3000.-
        M200        02          2000.-
        Operation:   WPBPCA
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          2000.-
        M100        02          1000.-
        M200        02          2000.-
        Operation:   WPBPC
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          3000.-
        M100        02          3000.-
        M200        02          2000.-
    Regards
    Team Member.

  • Wage type amounts in cluster PCL4

    Hi all,
    I am trying to capture the wage type amount changes in infotype logging. enables infotype logging. Used function module 'HR_INFOTYPE_LOG_GET_LIST' and HR_INFOTYPE_LOG_GET_DETAIL to retrieve the change data.
    So far so fine. But the structuer returned by these function module contains the amount in some non readable format(this is the value for 4500 --  #E&#20480;&#3072;#&#3104; ) . Can any one guide me as to how toretrieve the wage amount changes from cluster PCL4
    regards
    sam

    Ahmed,
    thanks for ur reply. I a passing the correct structure. Infact i have retrieved about 20 other fields. I am having problem only with the amount field. As u said my lasyt option woululd be to write maacros as done by the standard program. but was checking whether i can do away without writing a different peice of code altogether.
    I any one has retrieved amount fields from cluster using this FMs, please let me know how.
    Appreictae any suggestions.
    sam

  • Infotype 0008 and Wage Type Amount

    Hi ,
    I can see the Wage type in infotype 0008 , but when I input an amount in "Annual salary" , the Wage type Amount is not calulated ( stay blank ) .
    The Wage type Amount should be = Annual salary / PFREQ .
    What did I miss ? Feature PFREQ and LGMST are setup . Can see the Wage Type , but no calculation is done ?
    Help will be rewarded
    Thank you.

    Hello there!
    There are 3 important things to note in ANSAL.
    1. Period Parameters - Table T549R
    2. Annual Salary Wage Type - When you are defining the characteristics you will have to use ANSAL as Indirect evaluation module
    3. Monthly/Period Wage types - the wages which will make the sum for Annual Salary.
    Try to complete all the steps present in PA-> Payroll Data -> Basic Pay -> Define annual salary.
    Thanks
    Yash

  • HR-PY: How To Deduct Time Wage Type Amount From Salary?

    Dear All,
    How to deduct a time wage type amount from the total gross?
    Now I have a time wage type, "Unpaid Leave".
    If an employee have an unpaid leave in a month, payroll will calculate the unpaid amount and put it into Wage Type "Unpaid Leave", and the amount will be deducted from his salary.
    What is the approach to deduct the unpaid leave amount from his salary?
    Thanks.

    I've done the part of Absence Valuation.
    During payroll simulation, I can get the correct number of absence day and the correct amount of unpaid absence in the wage type.
    However, I do not know any following steps on how to deduct that amount from the salary.
    Do you mean I should use factoring to do the deduction?
    Thanks.

  • Get the wage type, amount and cost center

    Dear Expert,
    Is there any FM to get the payroll result for each wage type, amount, and cost center allocation?
    Example,
    Employee Tom was in cost center A with wage type 1001 ($1000) in Jan.
    But in Feb payroll, we need to retro the cost center for employee Tom to cost center B from 1-jan onwards.
    So after the Feb payroll run, I would like to have the result like below:
    Cost Center A Jan  $1000
    Cost Center A Feb -$1000
    Cost Center B Jan $0
    Cost Center B Feb $2000
    But if I use the FM HR99L00_GET_RETRO_MONTH_DIFF, I cannot get the value like below because the cost center is already replace in infotype 0001
    Cost Center B Jan $1000
    Cost Center B Feb $1000
    Please help.
    Thanks,
    WF

    Hello
    First you can use the FM HR_PT_READ_PAYROLL_RESULT to retrieve the payroll results of an employee. For your purpose you need just the international cluster, so you can use the table type pay99_result.
    Say if you have run the payroll run for the Feb with the new cost center assignment, you can get all these details from the WPBP cluster of the returned result. You'll will have one record in WPBP for each pay period. Using the index of the result you need i.e. for the month of Feb, get the amount value form cluster RT in the same payroll result. Now you should have the amount you are looking for.
    Regards
    Ranganath

  • Hi i want to use boolean type in a procedure as out parameter !!

    Hi
    I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
    please HELP !!

    I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
    Sounds like basic PL/SQL stuff.
    What problem are you experiencing?
    Are you looking for something like this?
    create or replace procedure check_emp (p_empno in number, p_result out boolean) is
      dummy  pls_integer;
    begin
      select 1
      into dummy
      from scott.emp
      where empno = p_empno;
      p_result := true;
    exception
      when no_data_found then
        p_result := false;
    end;
    SQL> declare
      2    emp_exists  boolean;
      3  begin
      4    check_emp(7839, emp_exists);
      5    if emp_exists then
      6      dbms_output.put_line('Employee exists');
      7    else
      8      dbms_output.put_line('Employee does not exist');
      9    end if;
    10  end;
    11  /
    Employee exists
    PL/SQL procedure successfully completed

  • Query leaving action to make wage type amount zero

    000010            D OUTWPMASSN
    000020 H6
    000030 N            ADDWT *
    000040 Y            AMT=1085  RTE=0      MULTI ARAADDWT *
    I am querying my action type H6 and H7 leaving action in PCR ZCC.  PIT ZCCC    NOAB.  When i am running payroll it is giving error no rule in PCR ZCCC for ****1085 where 1085 is my wage type for which i am writing this rule so that in leavaing action amount should become zero.   Can u please guide where to correc tule.  Also i want to add one more action type H7 in this rule.

    Hi all
    System is splitting the last period into two wpbp splits.  One split is for period employee was with company and second split is for unemployment period during the leaving month.  So whenever we write a rule or query it, then the rule is applied with ** once and leving action second time.  So two different splits are there and both conditions are taken by system.  so for the part of month in which leaving action has taken place like 15 to 30th then the amount is becoming zero but for the first part the system is taking ** value which is addwt *, so that amount is not beingmade zero.  how can i make the period for first half as zero.

  • I have two iTunescards and it shows that I have over $40 left, however when I try to use the card, my iPad prompts me for a code, I enter it And it says it's already been entered. Duh. I just want to use the remaining amount to buy more from the itues app

    Would like to use the remaining amount on my two gift cards. This application will not allow it. It says that 'the redemption code has already been entered.". Duh! I know that. 8 want to actually use all of the credit on both of them as they were paid for in full.
    How do I do that?

    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
    How to Get a Refund from the App Store
    http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
    Canceling a Digital Subscription
    http://gadgetwise.blogs.nytimes.com/2011/10/14/qa-canceling-a-digital-subscripti on/
     Cheers, Tom

  • PE51 - Deduction  Wage Type amount showing with a negative "-" sign

    Dear All,
    We have pay slip configured for the client in PE51 - HR Foms Editor.
    Here, we have added the deduction wage types in Window tab and Cumulations tab.
    However, when we generate the pay slip, the custom wage types which are defined in deductions show up the amount with a negative " - " sign.
    Please advise how this negative sign can be removed.
    Please note that in Cumulations tab, under deductions, the MS value against all the deductions wage type is " +"
    Regards,
    Reema

    Hi,
    Write a rule to remove the prefix '-' for the WT's for the STD payslip
    Regards,
    Hemant V.Mahale

  • Unable to read the wage type amount in payroll report output...

    Hi all,
    In the program below I am not able to see the car amount incurred by the office in the output, please find the error....
    Regards
    john
    *& Report  ZHR_PY_REPORT1                                              *
    REPORT  ZHR_PY_REPORT1                          .
             TABLES
    TABLES : PERNR.
          INFOTYPES
    INFOTYPES : 0000,
                0001,
                0002,
                0006,
                0105.
         STRUCTURES
    TYPES : BEGIN OF T_FINAL,
            PERNR  TYPE PERNR_D,
            STAT2  TYPE STAT2,
            BUKRS  TYPE BUKRS,
            PLANS  TYPE PLANS,
            ORGEH  TYPE ORGEH,
            ABKRS  TYPE ABKRS,
            VORNA  TYPE VORNA,
            NACHN  TYPE NACHN,
            GBDAT  TYPE GBDAT,
            STRAS  TYPE STRAS,
            ORT01  TYPE ORT01,
            PSTLZ  TYPE PSTLZ,
            MAILID TYPE CHAR255,
            CARAT  TYPE CHAR15,
            END OF T_FINAL.
          INTERNAL TABLES
    DATA : IT_FINAL TYPE STANDARD TABLE OF T_FINAL.
          WORK AREAS
    DATA : WA_FINAL  TYPE T_FINAL.
    PARAMETER : P_DOWN AS CHECKBOX.
    START-OF-SELECTION.
    GET PERNR.
    *SUBROUTINE TO FETCH DATA FROM INFOTYPES
      PERFORM F_FETCH_DATA_FROM_INFTY.
    END-OF-SELECTION.
    *SUBROUTINE TO DISPLAY DATA
      PERFORM F_DISPLAY_DATA.
    *&      Form  F_FETCH_DATA_FROM_INFTY
          text
    FORM F_FETCH_DATA_FROM_INFTY .
      RP_PROVIDE_FROM_LAST P0000 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-PERNR = P0000-PERNR.
        WA_FINAL-STAT2 = P0000-STAT2.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-BUKRS = P0001-BUKRS.
        WA_FINAL-PLANS = P0001-PLANS.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0002 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-VORNA = P0002-VORNA.
        WA_FINAL-NACHN = P0002-NACHN.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0006 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-STRAS = P0006-STRAS.
        WA_FINAL-ORT01 = P0006-ORT01.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0105 '0010' PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-MAILID = P0105-USRID_LONG.
      ENDIF.
    *SUBROUTINE TO FETCH EMPLOYEE PAYROLL RESULTS
      PERFORM F_FETCH_PAYROLL_DATA.
      APPEND WA_FINAL TO IT_FINAL.
      CLEAR WA_FINAL.
    ENDFORM.                    " F_FETCH_DATA_FROM_INFTY
    *&      Form  F_DISPLAY_DATA
          text
    FORM F_DISPLAY_DATA .
      LOOP AT IT_FINAL INTO WA_FINAL.
       AT FIRST.
         WRITE : / 'EMP.NO',
                 10 'FIRST NAME',
                 20 'COMPANY CODE'.
       ENDAT.
        WRITE : / WA_FINAL-PERNR,
                10 WA_FINAL-VORNA,
                20 WA_FINAL-BUKRS,
                30 WA_FINAL-CARAT.
      ENDLOOP.
    ENDFORM.                    " F_DISPLAY_DATA
    *&      Form  F_FETCH_PAYROLL_DATA
          text
    FORM F_FETCH_PAYROLL_DATA .
      DATA : W_MOLGA TYPE MOLGA,
             W_SEQNR TYPE CDSEQ,
             W_RELID TYPE RELID_PCL2.
      DATA : IT_RGDIR TYPE STANDARD TABLE OF PC261,
             IT_RESULT  TYPE PAY99_RESULT.
      DATA : WA_RT TYPE PC207.
      CALL FUNCTION 'CU_READ_RGDIR'
        EXPORTING
          PERSNR          = P0000-PERNR
        IMPORTING
          MOLGA           = W_MOLGA
        TABLES
          IN_RGDIR        = IT_RGDIR
        EXCEPTIONS
          NO_RECORD_FOUND = 1
          OTHERS          = 2.
      IF SY-SUBRC EQ 0.
        CALL FUNCTION 'CD_READ_LAST'
          EXPORTING
            BEGIN_DATE      = PN-BEGDA
            END_DATE        = PN-ENDDA
          IMPORTING
            OUT_SEQNR       = W_SEQNR
          TABLES
            RGDIR           = IT_RGDIR
          EXCEPTIONS
            NO_RECORD_FOUND = 1
            OTHERS          = 2.
        IF SY-SUBRC EQ 0.
          SELECT SINGLE RELID FROM T500L INTO W_RELID WHERE MOLGA = W_MOLGA
          IF SY-SUBRC EQ 0.
            CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
              EXPORTING
                CLUSTERID                    = w_relid
                EMPLOYEENUMBER               = P0000-PERNR
                SEQUENCENUMBER               = W_SEQNR
                READ_ONLY_INTERNATIONAL      = 'X'
              CHANGING
                PAYROLL_RESULT               = IT_RESULT
              EXCEPTIONS
                ILLEGAL_ISOCODE_OR_CLUSTERID = 1
                ERROR_GENERATING_IMPORT      = 2
                IMPORT_MISMATCH_ERROR        = 3
                SUBPOOL_DIR_FULL             = 4
                NO_READ_AUTHORITY            = 5
                NO_RECORD_FOUND              = 6
                VERSIONS_DO_NOT_MATCH        = 7
                OTHERS                       = 8.
            IF SY-SUBRC EQ 0.
              LOOP AT IT_RESULT-INTER-RT INTO WA_RT.
                IF WA_RT-LGART EQ 'M810'.
                  WA_FINAL-CARAT = WA_RT-BETRG.
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " F_FETCH_PAYROLL_DATA

    Hi all,
    In the program below I am not able to see the car amount incurred by the office in the output, please find the error....
    Regards
    john
    *& Report  ZHR_PY_REPORT1                                              *
    REPORT  ZHR_PY_REPORT1                          .
             TABLES
    TABLES : PERNR.
          INFOTYPES
    INFOTYPES : 0000,
                0001,
                0002,
                0006,
                0105.
         STRUCTURES
    TYPES : BEGIN OF T_FINAL,
            PERNR  TYPE PERNR_D,
            STAT2  TYPE STAT2,
            BUKRS  TYPE BUKRS,
            PLANS  TYPE PLANS,
            ORGEH  TYPE ORGEH,
            ABKRS  TYPE ABKRS,
            VORNA  TYPE VORNA,
            NACHN  TYPE NACHN,
            GBDAT  TYPE GBDAT,
            STRAS  TYPE STRAS,
            ORT01  TYPE ORT01,
            PSTLZ  TYPE PSTLZ,
            MAILID TYPE CHAR255,
            CARAT  TYPE CHAR15,
            END OF T_FINAL.
          INTERNAL TABLES
    DATA : IT_FINAL TYPE STANDARD TABLE OF T_FINAL.
          WORK AREAS
    DATA : WA_FINAL  TYPE T_FINAL.
    PARAMETER : P_DOWN AS CHECKBOX.
    START-OF-SELECTION.
    GET PERNR.
    *SUBROUTINE TO FETCH DATA FROM INFOTYPES
      PERFORM F_FETCH_DATA_FROM_INFTY.
    END-OF-SELECTION.
    *SUBROUTINE TO DISPLAY DATA
      PERFORM F_DISPLAY_DATA.
    *&      Form  F_FETCH_DATA_FROM_INFTY
          text
    FORM F_FETCH_DATA_FROM_INFTY .
      RP_PROVIDE_FROM_LAST P0000 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-PERNR = P0000-PERNR.
        WA_FINAL-STAT2 = P0000-STAT2.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-BUKRS = P0001-BUKRS.
        WA_FINAL-PLANS = P0001-PLANS.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0002 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-VORNA = P0002-VORNA.
        WA_FINAL-NACHN = P0002-NACHN.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0006 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-STRAS = P0006-STRAS.
        WA_FINAL-ORT01 = P0006-ORT01.
      ENDIF.
      RP_PROVIDE_FROM_LAST P0105 '0010' PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ '1'.
        WA_FINAL-MAILID = P0105-USRID_LONG.
      ENDIF.
    *SUBROUTINE TO FETCH EMPLOYEE PAYROLL RESULTS
      PERFORM F_FETCH_PAYROLL_DATA.
      APPEND WA_FINAL TO IT_FINAL.
      CLEAR WA_FINAL.
    ENDFORM.                    " F_FETCH_DATA_FROM_INFTY
    *&      Form  F_DISPLAY_DATA
          text
    FORM F_DISPLAY_DATA .
      LOOP AT IT_FINAL INTO WA_FINAL.
       AT FIRST.
         WRITE : / 'EMP.NO',
                 10 'FIRST NAME',
                 20 'COMPANY CODE'.
       ENDAT.
        WRITE : / WA_FINAL-PERNR,
                10 WA_FINAL-VORNA,
                20 WA_FINAL-BUKRS,
                30 WA_FINAL-CARAT.
      ENDLOOP.
    ENDFORM.                    " F_DISPLAY_DATA
    *&      Form  F_FETCH_PAYROLL_DATA
          text
    FORM F_FETCH_PAYROLL_DATA .
      DATA : W_MOLGA TYPE MOLGA,
             W_SEQNR TYPE CDSEQ,
             W_RELID TYPE RELID_PCL2.
      DATA : IT_RGDIR TYPE STANDARD TABLE OF PC261,
             IT_RESULT  TYPE PAY99_RESULT.
      DATA : WA_RT TYPE PC207.
      CALL FUNCTION 'CU_READ_RGDIR'
        EXPORTING
          PERSNR          = P0000-PERNR
        IMPORTING
          MOLGA           = W_MOLGA
        TABLES
          IN_RGDIR        = IT_RGDIR
        EXCEPTIONS
          NO_RECORD_FOUND = 1
          OTHERS          = 2.
      IF SY-SUBRC EQ 0.
        CALL FUNCTION 'CD_READ_LAST'
          EXPORTING
            BEGIN_DATE      = PN-BEGDA
            END_DATE        = PN-ENDDA
          IMPORTING
            OUT_SEQNR       = W_SEQNR
          TABLES
            RGDIR           = IT_RGDIR
          EXCEPTIONS
            NO_RECORD_FOUND = 1
            OTHERS          = 2.
        IF SY-SUBRC EQ 0.
          SELECT SINGLE RELID FROM T500L INTO W_RELID WHERE MOLGA = W_MOLGA
          IF SY-SUBRC EQ 0.
            CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
              EXPORTING
                CLUSTERID                    = w_relid
                EMPLOYEENUMBER               = P0000-PERNR
                SEQUENCENUMBER               = W_SEQNR
                READ_ONLY_INTERNATIONAL      = 'X'
              CHANGING
                PAYROLL_RESULT               = IT_RESULT
              EXCEPTIONS
                ILLEGAL_ISOCODE_OR_CLUSTERID = 1
                ERROR_GENERATING_IMPORT      = 2
                IMPORT_MISMATCH_ERROR        = 3
                SUBPOOL_DIR_FULL             = 4
                NO_READ_AUTHORITY            = 5
                NO_RECORD_FOUND              = 6
                VERSIONS_DO_NOT_MATCH        = 7
                OTHERS                       = 8.
            IF SY-SUBRC EQ 0.
              LOOP AT IT_RESULT-INTER-RT INTO WA_RT.
                IF WA_RT-LGART EQ 'M810'.
                  WA_FINAL-CARAT = WA_RT-BETRG.
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " F_FETCH_PAYROLL_DATA

  • Default Wage Type Values in Infotype 8 screen using  exit EXIT_SAPFP50M_002

    Hi Experts,
    I am facing an issue with defaluting few of the Wage Type Amount/Percent values in Infotype 8 when PAI gets triggered while chnaging the record.
    I have implemented the custom logic and updating Wage Type amount for IT0008 sturcture in PAI ( PBAS0001 -> EXIT_SAPFP50M_002) and again rewriting the data back to screen by using cl_hr_pnnnn_type_cast=>pnnnn_to_prelp. But the changed data is not getting shown on the screen. Can some one help me out on this issue.
    I have tried with SHOW_DATA_AGAIN = 'X', but this is leading to non functioning of SAVE button. No BADI will suit for this requirement. How to acheive the solution for this issue?.
    This is an high priority issue for us and would appreciate your help in resolving this issue.
    Thanks and regards,
    Srikanth Reddy.

    Hi Srikanth
    Try updating IT0008 by submitting a report, as mentioned below:
    IF
    UR CONDITION
    SUBMIT ZHR0008 (for example)
    ENDIF.
    In ZHR0008
    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
    Hope this helps
    Best Regards
    Reddy

  • Wage type in basic pay (0008) group

    Hi
    How to add one wage type (newly added) in to payroll schema, which forms the basic pay element. It is already included in wage type group 0008
    Regards
    DInabandhu

    Dear Dinabandhu,
    1) The WT needs to be added to WT Model and LGMST Feature
    2) IF India, thn it also need to be added in Allowance Grouping and A9 table.
    3) can u tel mewhat do u mean by "We want the this wage type to be included in a calculation which is inturn update another wage type".
       do u mean, say XXXX=200 u assign in IT8, then calculate YYYY=XXXX/20 ? for such kind of calculation u can use INVAL B in V_T511 table, and this can be achived at Infotype maitnaince level only.
    But, if u want this to happen at Paryoll Process level, you may then need to use some PCR's. this is not adivisable until unless there is no alternative.
    Regards
    ...SAdhu

Maybe you are looking for

  • Is it possible to force a fixed Application to open in a Secondary Monitor?

    This is my first time actively using a forum, so forgive me if I'm unclear with my question or if I'm unaware of forum common sense or etiquette. I've been running a Multi-Monitor system for awhile now at my office. I ran into a few problems when I f

  • Help- can't play video!!

    Hi! I have an extremely frustrating problem with regards to quicktime not being able to play a video of mine. I get the sound but no picture (just a white screen). I was warned that a quicktime component may be required but was not directed to which

  • Changes not reflecting in CRMM_ACCOUNTS

    I made some changes in Application Elements in Field group ACC_SRES_LOG_NAM adding NAME3 and NAME4 but the main problem is after generating the layout it shows on executing the Preview. All done using the Customizing Tool. If i test the changes in th

  • What happens now?

    I ordered my iPhone 6 Plus 64 GB on September 16th (with a November 4th ship date) my account got charged for it last night but it wont finish "processing" until tomorrow since the banks were closed today (Sunday). It now shows up in my order history

  • Can an ipod only be linked with one library on itunes on one computer?

    I have set up my ipod on one computer and downloaded a load of music on to it. now i want to put more music on from another computer but the computer is telling me that all the music i have on it already will be replaced by this new library from a di