cancel
Showing results for 
Search instead for 
Did you mean: 

porblem in PYXX_READ_PAYROLL_RESULT

Former Member
0 Kudos

hi experts...!

i have problem in retrieving betrg amount basic pay 0001 from that moudule........some one help me....!

my code is



 select  info~pernr info~abkrs info~persg bas~endda bas~begda
    into corresponding fields of table itab
                from pa0001 as info inner join pa0008 as bas
                on info~pernr eq bas~pernr
                where
                     info~pernr in s_pernr and
                     info~abkrs in s_payrol and
                     info~persg in s_empgrp and
                     bas~begda ge s_begda and
                     bas~endda le s_endda  .

sort itab by pernr.

    loop at itab.

      select single ename plans into (itab-ename, itab-plans)
        from pa0001
        where pernr eq itab-pernr.

        translate itab-ename to upper case.

        select single plstx into itab-plstx
          from t528t
          where plans eq itab-plans and
          sprsl eq 'EN'.

          translate itab-plstx to upper case.

        modify itab.
      endloop.
  endform.

Edited by: BFawad26 on Aug 10, 2010 3:25 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

..........



data : p_inper like hrpy_rgdir-inper.
  p_inper = st_date(6).
loop at itab where persg in s_empgrp.
    select single * from hrpy_rgdir
                    where
                      fpbeg = itab-begda
                     and fpend = itab-endda
 and pernr eq itab-pernr
                      and payty ne 'A'
                      and srtza = 'A'.
    if sy-subrc eq 0.

      call function 'PYXX_READ_PAYROLL_RESULT'
        exporting
         clusterid                    = 'RX'
          employeenumber               = itab-pernr
          sequencenumber               = hrpy_rgdir-seqnr
        changing
          payroll_result               = ls_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
          error_reading_archive        = 8
          error_reading_relid          = 9
          others                       = 10.
      if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.

      loop at ls_result-inter-rt into wa_rt.

        case wa_rt-lgart.
          when '/559'.
            itab-payment      = wa_rt-betrg.
*
          when '0001'.
            itab-basicpay      = itab-basicpay + wa_rt-betrg.

        "Wage Type 06 addition 30th July 2010 (Kamran)
         when '0006'.
            itab-basicpay      = itab-basicpay + wa_rt-betrg.

         when '/557'.
            itab-payment       = wa_rt-betrg.
        endcase.
      endloop.
      append itab.

    endif.

    clear itab.
  endloop.
  endform.

Edited by: BFawad26 on Aug 10, 2010 3:27 PM