Reading payroll results for an employee from ABAP-HR?

Hi,
   I dont know whether i must post this question in this category ? but i had a problem in reading of the payroll data for employees.
    I used the function of PYXX_READ_PAYROLL_RESULT and passed the PERNR(employee number), SEQNR, RELID(clusterid) for a given period of say PN-BEGDA AND PN-ENDDA. And i took the payroll structure of germany (its PAYDE_RESULT). program is showing the exceptions since between the selected periods i had many different country employees other than germany DE. how can i solve that problem ? if i use PAY99_RESULT then i cant read the National wage types? how to solve this problem?
    which function i must use so that i must get all the payroll data of the employees between the given period with inter/national payroll details and also which structure(like PAYDE_RESULT) i must use for holding the payroll data that is unique?
   please help me.
   ***Ratings are must for a possible answer.

Hi KK,
In this sample code...you will find the use of the method i meantioned.
REPORT zgratuity_ipcl MESSAGE-ID zh.
TABLES : pernr , pa0001, pa0008 , pa0000 , t569v.
TYPE-POOLS: slis.
CONSTANTS:
gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
INFOTYPES: 0008 ,0001,0002,0000.
DATA : period(6),
       pay_period(6),
       c_period(6).
DATA: number LIKE pc261-seqnr.
DATA : refdt LIKE p0000-begda.
DATA: ason_yr LIKE p0347-scryy,
      ason_mon LIKE p0347-scrmm.
DATA : BEGIN OF it_0000 OCCURS 100,
       pernr LIKE pa0000-pernr,
       stat2 LIKE pa0000-stat2,
       massn LIKE pa0000-massn,
       begda LIKE pa0000-begda,
       endda LIKE pa0000-endda,
       END OF it_0000.
DATA : g_molga LIKE t512t-molga.
DATA: BEGIN OF package,
        lga LIKE p0008-lga01,
        bet LIKE p0008-bet01,
      END OF package.
DATA : BEGIN OF rgdir OCCURS 0.
        INCLUDE STRUCTURE pc261.
DATA : END OF rgdir.
DATA : BEGIN OF rx-key OCCURS 0.
        INCLUDE STRUCTURE pc200.
DATA : END OF rx-key.
DATA : BEGIN OF crt OCCURS 0.         "result table
        INCLUDE STRUCTURE pc208.
DATA : END OF crt.
DATA : b_date LIKE sy-datum,
       e_date LIKE sy-datum.
DATA : darate LIKE t539j-gwcht.
DATA : gamt TYPE p.
DATA : BEGIN OF it_0001 OCCURS 100,
       pernr LIKE pa0000-pernr,
       ename LIKE pa0001-ename,
       bukrs LIKE pa0001-bukrs,
       persk LIKE pa0001-persk,
       persg LIKE pa0001-persg,
       werks LIKE pa0001-werks,
       END OF it_0001.
**start of mod by tejas on 31.05.06
DATA : BEGIN OF it_final_sup OCCURS 100,
       pernr LIKE pa0001-pernr,  "PL No
       ename LIKE pa0001-ename,  "NAME
       persg LIKE pa0001-persg,  "EMP GROUP
       persk LIKE pa0001-persk,  "ESG
       zzpla LIKE pa0001-zzpla,  "PLANT/BUSINESS
       orgeh LIKE pa0001-orgeh,  "ORG UNIT
       orgtx LIKE t527x-orgtx,   "ORG UNIT TEXT
       gbdat LIKE pa0002-gbdat,  "DOB
       termn LIKE pa0019-termn,  "DOJ
       zzrtdt LIKE pa0002-zzrtdt,"DOR
       sepdt LIKE pa0000-begda,
       no_years TYPE i,          "SERVICE YEARS
       stat2 LIKE pa0000-stat2,  "STATUS
       s_text(15),               "STATUS TEXT
       basic LIKE pa0008-bet01,  "BASIC
       da LIKE pa0008-bet01,     "DA
       total LIKE pa0008-bet01,  "TOTAL
       crt LIKE pc207-betrg,     "GRTUITY
       massn LIKE pa0000-massn,
       begda LIKE pa0000-begda,
       ason(6) ,
      dates LIKE pa0002-zzrtdt,
       END OF it_final_sup.
DATA : BEGIN OF it_final_nonsup OCCURS 100,
       pernr LIKE pa0001-pernr,  "PL No
       ename LIKE pa0001-ename,  "NAME
       persg LIKE pa0001-persg,  "EMP GROUP
       persk LIKE pa0001-persk,  "ESG
       zzpla LIKE pa0001-zzpla,  "PLANT/BUSINESS
       orgeh LIKE pa0001-orgeh,  "ORG UNIT
       orgtx LIKE t527x-orgtx,   "ORG UNIT TEXT
       gbdat LIKE pa0002-gbdat,  "DOB
       termn LIKE pa0019-termn,  "DOJ
       zzrtdt LIKE pa0002-zzrtdt,"DOR
       sepdt LIKE pa0000-begda,
       no_years TYPE i,          "SERVICE YEARS
       stat2 LIKE pa0000-stat2,  "STATUS
       s_text(15),               "STATUS TEXT
       basic LIKE pa0008-bet01,  "BASIC
       da LIKE pa0008-bet01,     "DA
       total LIKE pa0008-bet01,  "TOTAL
       crt LIKE pc207-betrg,     "GRTUITY
       massn LIKE pa0000-massn,
       begda LIKE pa0000-begda,
       ason(6) ,
      dates LIKE pa0002-zzrtdt,
       END OF it_final_nonsup.
DATA : BEGIN OF it_final OCCURS 100,
       pernr LIKE pa0001-pernr,  "PL No
       ename LIKE pa0001-ename,  "NAME
       persg LIKE pa0001-persg,  "EMP GROUP
       persk LIKE pa0001-persk,  "ESG
       zzpla LIKE pa0001-zzpla,  "PLANT/BUSINESS
       orgeh LIKE pa0001-orgeh,  "ORG UNIT
       orgtx LIKE t527x-orgtx,   "ORG UNIT TEXT
       gbdat LIKE pa0002-gbdat,  "DOB
       termn LIKE pa0019-termn,  "DOJ
       zzrtdt LIKE pa0002-zzrtdt,"DOR
       sepdt LIKE pa0000-begda,
       no_years TYPE i,          "SERVICE YEARS
       stat2 LIKE pa0000-stat2,  "STATUS
       s_text(15),               "STATUS TEXT
       basic LIKE pa0008-bet01,  "BASIC
       da LIKE pa0008-bet01,     "DA
       total LIKE pa0008-bet01,  "TOTAL
       crt LIKE pc207-betrg,     "GRTUITY
       massn LIKE pa0000-massn,
       begda LIKE pa0000-begda,
       ason(6) ,
      dates LIKE pa0002-zzrtdt,
       END OF it_final.
**end of mod by tejas on 31.05.06
DATA : f_pabrj LIKE t549s-pabrj,
       f_pabrp LIKE t549s-pabrp.
DECLARATIONS FOR ALV DISPLAY
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
      gs_layout   TYPE slis_layout_alv ,
      gs_print    TYPE slis_print_alv,
      gt_filter   TYPE slis_t_filter_alv,
      gt_sp_group TYPE slis_t_sp_group_alv,
      gt_alv_graphics TYPE dtc_t_tc,
      gt_excluding  TYPE slis_t_extab ,
      gt_events   TYPE slis_t_event,
      gt_print TYPE slis_print_alv.
DATA: gt_list_top_of_page TYPE slis_t_listheader.
DATA: g_boxnam TYPE slis_fieldname VALUE  'BOX',
      p_f2code LIKE sy-ucomm       VALUE  '&ETA',
      p_lignam TYPE slis_fieldname VALUE  'LIGHTS',
      g_save(1) TYPE c VALUE 'X',
      g_default(1) TYPE c VALUE 'X',
      g_exit(1) TYPE c,
      gx_variant LIKE disvariant,
      g_variant LIKE disvariant,
      g_repid LIKE sy-repid.
DATA : result TYPE pay99_result.
DATA : crt_header TYPE LINE OF hrpay99_crt.
INITIALIZATION.
  SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
  SELECT-OPTIONS : sstat2 FOR pa0000-stat2.
  SELECTION-SCREEN: END OF BLOCK b2.
*SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*SELECTION-SCREEN : SKIP.
*PARAMETERS : P_STAT2 LIKE PA0000-STAT2.
*SELECTION-SCREEN : SKIP.
*SELECTION-SCREEN : END OF BLOCK B1.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'PNPABKRS-LOW'.
      screen-required = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
AT SELECTION-SCREEN." on pnppabrj.
  IF pnptimr9 = 'X'.
    CONCATENATE  pnpdispj pnpdispp INTO period.
    CONCATENATE  pnpdispp pnpdispj INTO  pay_period.
  ELSE.
    CONCATENATE  pnppabrj pnppabrp INTO period.
    CONCATENATE  pnppabrp pnppabrj INTO  pay_period.
  ENDIF.
  IF period < '200505'.
    MESSAGE e001 WITH
    'Gratuity report is for period after month Auguest 2005' .
    STOP.
  ENDIF.
  SELECT SINGLE * FROM t569v
  WHERE abkrs = pnpxabkr.
  CONCATENATE t569v-pabrj t569v-pabrp INTO c_period.
  IF period > c_period.
    MESSAGE e001 WITH 'Payroll for this period is not yet processed' .
    STOP.
  ENDIF.
CONCATENATE  pnppabrj pnppabrp INTO period.
CONCATENATE  pnppabrp pnppabrj INTO  pay_period.
IF period =< '200505'.
   MESSAGE e001 WITH 'Program is not valid for this period' pnppabrj
*pnppabrp.
ENDIF.
START-OF-SELECTION.
GET pernr.
  PERFORM  fill_data.
END-OF-SELECTION.
  PERFORM final_data.
  PERFORM display_data.
*&      Form  FILL_DATA
      text
-->  p1        text
<--  p2        text
FORM fill_data.
  SORT p0000 BY pernr.
  SORT p0001 BY pernr.
  SORT p0002 BY pernr.
  SORT p0008 BY pernr.
start mod made by kinjal for payroll dates
  IF pnptimr9 = 'X'.
    CALL FUNCTION 'HR_GB_PERIOD_DATES'
         EXPORTING
             abkrs            = pnpxabkr
        PERMO            =
              pabrj            = pnpdispj
              pabrp            = pnpdispp
        IMPORTING
              begda            = b_date
              endda            = e_date .
   EXCEPTIONS
        PERIOD_NOT_FOUND = 1
        OTHERS           = 2
  ELSE.
    CALL FUNCTION 'HR_GB_PERIOD_DATES'
        EXPORTING
            abkrs            = pnpxabkr
        PERMO            =
             pabrj            = pnppabrj
             pabrp            = pnppabrp
       IMPORTING
             begda            = b_date
             endda            = e_date
   EXCEPTIONS
        PERIOD_NOT_FOUND = 1
        OTHERS           = 2
    IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDIF.
CONCATENATE  pnppabrj pnppabrp '01' INTO b_date.
CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'
      EXPORTING
           iv_date             = b_date
     IMPORTING
        EV_MONTH_BEGIN_DATE =
          ev_month_end_date   = e_date.
end of modification
*DATA FETCHING FOR SUPERVISOR EMPLOYEES
  LOOP AT p0001 WHERE begda <= e_date AND
                      endda >= e_date AND
                          persg = 'R' OR
                          persg = 'P'
                        AND
                          ( persk >= '11' AND
                            persk <= '17'
                          OR
                          ( persk >= 'IA' AND
                            persk <= 'IJ'
    MOVE-CORRESPONDING p0001 TO it_final_sup.
    READ TABLE p0002 WITH KEY pernr = p0001-pernr BINARY SEARCH.
    IF sy-subrc = 0.
      MOVE-CORRESPONDING p0002 TO it_final_sup.
    ENDIF.
  LOOP AT p0000 WHERE pernr = p0001-pernr AND begda <= e_date AND endda
                >= e_date AND stat2 IN sstat2.
      SELECT SINGLE orgtx INTO it_final_sup-orgtx FROM t527x
      WHERE sprsl = 'EN'
      AND   orgeh = p0001-orgeh.
      SELECT SINGLE text1 INTO it_final_sup-s_text FROM t529u
      WHERE sprsl = 'EN'
      AND statn = '2'
      AND   statv = p0000-stat2.
      MOVE-CORRESPONDING p0000 TO it_final_sup.
      IF p0000-massn = 'A6'.
        MOVE p0000-begda TO it_final_sup-zzrtdt.
      ELSE.
        it_final_sup-zzrtdt = '          '.
      ENDIF.
    ENDLOOP.
    IF sy-subrc <> 0.
      CONTINUE.
    ENDIF.
    SELECT SINGLE termn INTO it_final_sup-termn FROM pa0019
    WHERE pernr = p0001-pernr
    AND  tmart = '06'.
    IF sy-subrc = 0.
      CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
           EXPORTING
                date1                   = sy-datum
                date2                   = it_final_sup-termn
               output_format           = '05'
          IMPORTING
               years                   = ason_yr
               months                  = ason_mon
        DAYS                    =
          EXCEPTIONS
               invalid_dates_specified = 1
               OTHERS                  = 2
      IF ason_mon > 6.
        ason_yr = ason_yr + 1.
      ENDIF.
      MOVE ason_yr TO it_final_sup-no_years.
    ENDIF.
    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 p0008 WHERE begda <= e_date AND endda >= e_date AND pernr =
                        p0001-pernr.
     DO 20 TIMES VARYING  package-lga FROM p0008-lga01 NEXT p0008-lga02
                  VARYING package-bet FROM p0008-bet01 NEXT p0008-bet02.
        CASE package-lga.
          WHEN '0010'.
            it_final_sup-basic = package-bet + it_final_sup-basic.
          WHEN '0I10'.
            it_final_sup-da = package-bet + it_final_sup-da.
        ENDCASE.
      ENDDO.
      it_final_sup-total = it_final_sup-basic + it_final_sup-da.
    ENDLOOP.
   BREAK-POINT.
start mod made by kinjal
    it_final_sup-zzrtdt = it_final_sup-zzrtdt - 1.
    CALL FUNCTION 'HR_PAYROLL_PERIODS_GET'
         EXPORTING
              get_begda       = it_final_sup-zzrtdt
        GET_ENDDA       =
             get_permo        = '67'
         IMPORTING
             get_pabrj       = f_pabrj
             get_pabrp       = f_pabrp
   TABLES
        GET_PERIODS     =
        EXCEPTIONS
             no_period_found = 1
             no_valid_permo  = 2
             OTHERS          = 3
    IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF it_final_sup-stat2 <> '3'.
     CONCATENATE  it_final-dates+4(2) INTO period.
      CONCATENATE f_pabrj f_pabrp INTO period.
      it_final_sup-ason = period.
    ENDIF.
end of mod
    rx-key-pernr = p0001-pernr.
    CALL FUNCTION 'CU_READ_RGDIR'
         EXPORTING
              persnr          = p0001-pernr
         IMPORTING
              molga           = g_molga
         TABLES
              in_rgdir        = rgdir
         EXCEPTIONS
              no_record_found = 1
              OTHERS          = 2.
    LOOP AT rgdir  WHERE fpper = period AND inper = period.
    ENDLOOP.
  With this Seq. number as a key for cluster Key
we can read the RT table from the cluster/..
IF 2
    IF sy-subrc EQ 0.
      rx-key-seqno = rgdir-seqnr.
      IMPORT crt FROM DATABASE pcl2(in) ID rx-key.
      IF NOT crt[] IS INITIAL.
        PERFORM resultstab.
      ENDIF.
      APPEND it_final_sup.
      CLEAR it_final_sup.
    ENDIF.
LOOP AT rgdir WHERE
         inper = period AND
         srtza = 'A'.
   rx-key-seqno = rgdir-seqnr.
   number = rgdir-seqnr.
   CLEAR rt.
   REFRESH rt.
Importing Result table cluster
   IMPORT rt FROM DATABASE pcl2(in) ID rx-key.
   IF NOT rt[] IS INITIAL.
     PERFORM resultstab.
   ENDIF.
ENDLOOP.
   APPEND it_final.
   CLEAR IT_FINAL.
  ENDLOOP.
RP-PROVIDE-FROM-LAST P0008 SPACE B_DATE E_DATE.
BREAK-POINT.
   DO 10 TIMES varying  PACKAGE-LGA from p0008-lga01 next p0008-lga02
               varying package-bet from p0008-bet01 next p0008-bet02.
     compute itab-gross = itab-gross + package-bet.
     IF sy-index = 10.
       itab-pernr = p0008-pernr.
       append itab.
     endif.
   enddo.
*DATA FETCHING FOR NON SUPERVISOR EMPLOYEES
  LOOP AT p0001 WHERE begda <= e_date AND
                      endda >= e_date AND
                          persg = 'R' OR
                          persg = 'P'
                        AND
                          persk >= 'IL' AND
                          persk <= 'IV'
    MOVE-CORRESPONDING p0001 TO it_final_nonsup.
    READ TABLE p0002 WITH KEY pernr = p0001-pernr BINARY SEARCH.
    IF sy-subrc = 0.
      MOVE-CORRESPONDING p0002 TO it_final_nonsup.
    ENDIF.
  LOOP AT p0000 WHERE pernr = p0001-pernr AND begda <= e_date AND endda
                >= e_date AND stat2 IN sstat2.
      SELECT SINGLE orgtx INTO it_final_nonsup-orgtx FROM t527x
      WHERE sprsl = 'EN'
      AND   orgeh = p0001-orgeh.
      SELECT SINGLE text1 INTO it_final_nonsup-s_text FROM t529u
      WHERE sprsl = 'EN'
      AND statn = '2'
      AND   statv = p0000-stat2.
      MOVE-CORRESPONDING p0000 TO it_final_nonsup.
      IF p0000-massn = 'A6'.
        MOVE p0000-begda TO it_final_nonsup-sepdt.
        MOVE p0000-begda TO refdt.
      ELSE.
       MOVE it_final_nonsup-zzrtdt TO refdt.
        MOVE e_date TO refdt.
      ENDIF.
    ENDLOOP.
    IF sy-subrc <> 0.
      CONTINUE.
    ENDIF.
    SELECT SINGLE termn INTO it_final_nonsup-termn FROM pa0019
    WHERE pernr = p0001-pernr
    AND  tmart = '06'.
    IF sy-subrc = 0.
      CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
           EXPORTING
                date1                   = refdt
                date2                   = it_final_nonsup-termn
               output_format           = '05'
          IMPORTING
               years                   = ason_yr
               months                  = ason_mon
        DAYS                    =
          EXCEPTIONS
               invalid_dates_specified = 1
               OTHERS                  = 2
      IF ason_mon > 6.
        ason_yr = ason_yr + 1.
      ENDIF.
      MOVE ason_yr TO it_final_nonsup-no_years.
    ENDIF.
    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 p0008 WHERE begda <= refdt AND endda >= refdt AND
   LOOP AT p0008 WHERE begda <= e_date AND endda >= e_date AND
                        pernr = p0001-pernr.
     DO 20 TIMES VARYING  package-lga FROM p0008-lga01 NEXT p0008-lga02
                  VARYING package-bet FROM p0008-bet01 NEXT p0008-bet02.
        CASE package-lga.
          WHEN '0010'.
            it_final_nonsup-basic = package-bet.
        ENDCASE.
      ENDDO.
    ENDLOOP.
    IF it_final_nonsup-massn = 'A6'.
      SELECT SINGLE gwcht FROM t539j
      INTO darate
      WHERE molga = '40'
      AND bwlga = '0I10'
      AND begda <= it_final_nonsup-begda
      AND endda >= it_final_nonsup-begda.
    ELSE.
      SELECT SINGLE gwcht FROM t539j
      INTO darate
      WHERE molga = '40'
      AND bwlga = '0I10'
      AND begda <= e_date
      AND endda >= e_date.
    ENDIF.
    it_final_nonsup-da = ( it_final_nonsup-basic * darate ) / 100.
    it_final_nonsup-total = it_final_nonsup-basic + it_final_nonsup-da.
    gamt = 0.
    gamt = ( it_final_nonsup-total * 15 * it_final_nonsup-no_years )
            / 26.
    IF gamt >= 350000.
      gamt = 350000.
    ENDIF.
    MOVE gamt TO it_final_nonsup-crt.
    CLEAR gamt.
    CLEAR refdt.
    APPEND it_final_nonsup.
    CLEAR it_final_nonsup.
LOOP AT rgdir WHERE
         inper = period AND
         srtza = 'A'.
   rx-key-seqno = rgdir-seqnr.
   number = rgdir-seqnr.
   CLEAR rt.
   REFRESH rt.
Importing Result table cluster
   IMPORT rt FROM DATABASE pcl2(in) ID rx-key.
   IF NOT rt[] IS INITIAL.
     PERFORM resultstab.
   ENDIF.
ENDLOOP.
   APPEND it_final.
   CLEAR IT_FINAL.
  ENDLOOP.
ENDFORM.                    " FILL_DATA
" GET_GRATUITY
*&      Form  RESULTSTAB
      text
-->  p1        text
<--  p2        text
FORM resultstab.
  LOOP AT crt WHERE lgart = '9GRA' AND cumty = 'U'.
    it_final_sup-crt = abs( crt-betrg ).
  ENDLOOP.
ENDFORM.                    " RESULTSTAB
*&      Form  DISPLAY_DATA
      text
-->  p1        text
<--  p2        text
FORM display_data.
  IF it_final[] IS INITIAL.
    MESSAGE i001 WITH 'No data found'.
    STOP.
  ENDIF.
  g_repid = sy-repid.
  PERFORM e01_fieldcat_init  USING gt_fieldcat[].
  PERFORM eventtab_build CHANGING gt_events.
  PERFORM e04_comment_build USING gt_list_top_of_page[].
  PERFORM display_report.
ENDFORM.                    " DISPLAY_DATA
*&      Form  E01_FIELDCAT_INIT
      text
     -->P_GT_FIELDCAT[]  text
FORM e01_fieldcat_init USING   e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
  DATA: ls_fieldcat TYPE slis_fieldcat_alv.
  gs_layout-group_change_edit = 'X'.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'PERNR'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Pers No'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'ENAME'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Name'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'PERSK'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'ESG Cd'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'ZZPLA'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Plant/Business'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'ORGTX'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Org.Unit'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'GBDAT'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Dt.Of Birth'.
  ls_fieldcat-datatype = 'DATS'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'TERMN'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Dt.Of Joining'.
  ls_fieldcat-datatype = 'DATS'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'ZZRTDT'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Superannuation Dt'.
  ls_fieldcat-datatype = 'DATS'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'SEPDT'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Dt.Of Seperation'.
  ls_fieldcat-datatype = 'DATS'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'NO_YEARS'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Service Years'.
  ls_fieldcat-datatype = 'CHAR'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'S_TEXT'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Status'.
  ls_fieldcat-datatype = 'CHAR'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'BASIC'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Basic'.
  ls_fieldcat-datatype = 'CHAR'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'DA'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'DA'.
  ls_fieldcat-datatype = 'CHAR'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'TOTAL'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Total'.
  ls_fieldcat-datatype = 'CHAR'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'CRT'.
  ls_fieldcat-tabname    = 'IT_FINAL'.
  ls_fieldcat-seltext_l    = 'Gratuity'.
  ls_fieldcat-datatype = 'CHAR'.
  ls_fieldcat-no_zero = 'X'.
  APPEND ls_fieldcat TO e01_lt_fieldcat.
ENDFORM.                    " E01_FIELDCAT_INIT
*&      Form  EVENTTAB_BUILD
      text
     <--P_GT_EVENTS  text
FORM eventtab_build CHANGING lt_events TYPE slis_t_event.
  CONSTANTS:
  gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
  DATA: ls_event TYPE slis_alv_event.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
            i_list_type = 0
       IMPORTING
            et_events   = lt_events.
  READ TABLE lt_events WITH KEY name = slis_ev_top_of_page
  INTO ls_event.
  IF sy-subrc = 0.
    MOVE gc_formname_top_of_page TO ls_event-form.
    APPEND ls_event TO lt_events.
  ENDIF.
ENDFORM.                    " EVENTTAB_BUILD
*&      Form  E04_COMMENT_BUILD
      text
     -->P_GT_LIST_TOP_OF_PAGE[]  text
FORM e04_comment_build USING   e04_lt_top_of_page TYPE slis_t_listheader
  DATA: ls_line TYPE slis_listheader.
  DATA : v_text(100) TYPE c,
         v_text1(100) TYPE c,
         date1(10),
         date2(10).
        v_pernrlines TYPE i,
        v_pernrchar(5).
DESCRIBE TABLE it_pernr LINES v_pernrlines.
MOVE v_pernrlines TO v_pernrchar.
  CONCATENATE b_date6(2) '.' b_date4(2) '.' b_date+0(4) INTO date1.
  CONCATENATE e_date6(2) '.' e_date4(2) '.' e_date+0(4) INTO date2.
  CONCATENATE 'Gratuity Information for ' date1 'to' date2
  INTO v_text SEPARATED BY space.
  CLEAR ls_line.
  ls_line-typ  = 'H'.
  ls_line-info = v_text.
  APPEND ls_line TO e04_lt_top_of_page.
CLEAR ls_line.
ls_line-typ  = 'H'.
ls_line-info = v_text1.
APPEND ls_line TO e04_lt_top_of_page.
ENDFORM.                    " E04_COMMENT_BUILD
*&      Form  DISPLAY_REPORT
      text
-->  p1        text
<--  p2        text
FORM display_report.
  gs_layout-colwidth_optimize = 'X'.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
           i_background_id         = 'ALV_BACKGROUND'
            i_callback_program      = g_repid
           i_callback_user_command = 'USER_COMMAND'
           i_structure_name        = 'IT_FINAL'
            is_layout               = gs_layout
            it_fieldcat             = gt_fieldcat
           it_special_groups       = gt_sp_group[]
           it_sort                 = gt_sort[]
           it_filter               = gt_filter[]
           i_save                  = g_save
           is_variant              = g_variant
            it_events               = gt_events
           is_print                = gs_print
           it_alv_graphics         = gt_alv_graphics[]
           it_excluding            = gt_excluding
       TABLES
            t_outtab                = it_final.
ENDFORM.                    " DISPLAY_REPORT
      FORM top_of_page                                              *
FORM top_of_page.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
           i_logo             = 'ENJOYSAP_LOGO'
            it_list_commentary = gt_list_top_of_page.
ENDFORM   .                    "TOP_OF_PAGE
FORM user_command USING g_ucomm TYPE sy-ucomm
                        g_field TYPE slis_selfield.
  CASE g_ucomm.
    WHEN '&IC1'.
  ENDCASE.
ENDFORM.                    "USER_COMMAND
*&      Form  FINAL_DATA
      text
-->  p1        text
<--  p2        text
FORM final_data.
  LOOP AT it_final_sup.
    MOVE-CORRESPONDING it_final_sup TO it_final.
    APPEND it_final.
    CLEAR it_final.
  ENDLOOP.
  LOOP AT it_final_nonsup.
    MOVE-CORRESPONDING it_final_nonsup TO it_final.
    APPEND it_final.
    CLEAR it_final.
  ENDLOOP.
  SORT it_final BY pernr.
ENDFORM.                    " FINAL_DATA
<b>Reward if useful,</b>
Regards,
Tejas

Similar Messages

  • Function module for reading payroll results

    HI,
    I need a function module for reading payroll results RT table.
    Import parameters are personal number, payroll area, and payroll period.
    Export should be RT table.
    Regards,
    Wasim Ahmed

    Hai Wasim
    Check the following Code
    data: payroll_cluster like t500l-relid.
        call function 'PYXX_READ_PAYROLL_RESULT'
             exporting
                  clusterid                    = payroll_cluster
                  employeenumber               = pernr-pernr
                  sequencenumber               = payroll-evp-seqnr
                READ_ONLY_BUFFER             = ' '
                READ_ONLY_INTERNATIONAL      = ' '
                CHECK_READ_AUTHORITY         = 'X'
           IMPORTING
                VERSION_NUMBER_PAYVN         =
                VERSION_NUMBER_PCL2          =
             changing
                  payroll_result               = payroll_us
            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 <> 0.
          if sy-subrc <> 0.
            write: / 'Fehler beim Laden des US Abrechnungsergebnisses'(003).
            write: /'zu Personalnummer'(008), pernr-pernr,
                    'bei Sequence-Number'(012),
                     payroll-evp-seqnr.
            write: /  'Fehlercode ='(004), sy-subrc.
          endif.
        endif.
    Thanks & regards
    Sreenivasulu P

  • Short dump while reading Payroll results

    we have a Z program to read the payroll results for a quarter(3 months)for a large number of employees.
    As the internal allocated memory is 2G. This is exceeding that limit resulting in a short dump.
    There are no big internal tables in the program except reading some 8 infotypes using rp-provide and get pernr one at a time.
    But, in the FM CU_READ_RGDIR the pcl2 cluster records are being stored in an internal table IMPORT_DATA[] and not refreshed, which I think is the cause for the large memory usage. Any suggestions or directions are welcome.
    Any suggestions
    Thanks,
    Kumar

    Santosh,
    Thanks for your inputs,
    But my internal table type is of DEC (5,2) , I am getting that... it needs to be of type 'C'. Can you suggest.
    Ex :
    MOVE wa_temp-infile_string+106(8)  TO wa_item-QT_PERCENT
    This didnt work
    so i tried moving into a seperate variable
    MOVE wa_temp-infile_string+106(8)  TO v_percent.
    and then write to
    WRITE v_percent to  wa_item-QT_PERCENT.

  • Reading Payroll Results using PNPCE

    Hi All,
    As far as reading infotypes/master data is concerned, I am comfortable using "PNPCE" instead of logical database "PNP".
    Can any one tell me how can I read payroll results using "PNPCE". Since Get payroll event is not available in pnpce.

    Hi khalid,
    1. U want the remuneration (monthly salary )
    2. U won't get it DIRECTLY from any table.
    (Its stored in cluster format)
    3. Use this logic and FM.
    DATA: myseqnr LIKE hrpy_rgdir-seqnr.
    DATA : mypy TYPE payin_result.
    DATA : myrt LIKE TABLE OF pc207 WITH HEADER LINE.
    SELECT SINGLE seqnr FROM hrpy_rgdir
    INTO myseqnr
    WHERE pernr = mypernr
    AND fpper = '200409'
    AND srtza = 'A'.
    IF sy-subrc = 0.
    CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
    EXPORTING
    clusterid = 'IN'
    employeenumber = mypernr
    sequencenumber = myseqnr
    CHANGING
    payroll_result = mypy
    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.
    myrt[] = mypy-inter-rt.
    READ TABLE myrt WITH KEY lgart = '1899'.
    4. the internal table myrt
    will contain what u require.
    regards,
    amit m.

  • Any program for calling bapi from ABAP step by step

    any program for calling bapi from ABAP step by step
    points will be rewarded,
    thank you,
    Jagrut BharatKumar Shukla

    Hi Jagrut,
    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    ex BAPI:
    API_SALESORDER_CREATEFROMDAT1
    BAPI_SALESORDER_CREATEFROMDAT2
    You can get good help form the following links,
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://sap-img.com/bapi.htm
    <b>EG::</b>
    <b>Here is the step by step procedure for creating BAPIs.</b>
    There are 5 different steps in BAPI.
    - Create BAPI Structure
    - Create BAPI Function Module or API Method.
    - Create BAPI object
    - Release BAPI Function Module.
    - Release BAPI object.
    Step1. Creating BAPI Structure:
    - Go to <SE11>.
    - Select Data Type & Enter a name.
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module:
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
    Goto -> Function Groups -> Create Group.
    Enter a name (Note: This name Must start with ZBAPI)
    Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
    Click on the Third ICON that says Inactive Objects.
    Select the group that you just created and click on Activate.
    Notice that the group you created will disappear from the list of inactive objects.
    - Go back to ><SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields
    RETURN TYPE BAPIRETURN (These 3 field values are always same)
    Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object:
    - Enter Tr.Code <SWO1> (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details.
    NOTE: Make sure that that Object Type and Program name are SAME.
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom.
    - Then hit <ENTER>.
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu:
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step.
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    - Now on a different screen goto TR.CODE <SE37>. Enter Function Module name and select from the top menu Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>.
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully
    <b>Reward pts if found usefull :)</b>
    regards
    Sathish

  • Send BW query results as HTML email from ABAP program

    I have published a code sample for sending BW query results as HTML email from ABAP program. if you have any questions or clarification, please post them here.
    the same can be accessed from this link.
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b7658119-0a01-0010-39a9-b600c816f370
    Regards
    Raja
    Message was edited by: Durairaj Athavan Raja

    OK forget about my earlier post.
    do the following changes.
    declare the following variables:
    data: xtext type standard table of solix .
    DATA: atta_sub TYPE sood-objdes .
    after the call of FM SCMS_STRING_TO_FTEXT add the following code.
    CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
      EXPORTING
        ip_solitab        = text
    IMPORTING
       EP_SOLIXTAB       = xtext .
    and after the following statement
    document = cl_document_bcs=>create_document(
                              i_type    = 'HTM'
                              i_text    = text
                              i_length  = conlengths
                              i_subject = subject ).
    add the following code
    CALL METHOD document->add_attachment
                EXPORTING
                  i_attachment_type    = 'htm'
                  i_attachment_subject = atta_sub
                  i_att_content_hex    = xtext.
    now you will have results both in the body as well as attachment. (this is for test you can remove one of them )
    Regards
    Raja

  • Read Combination segments for material account from item level

    Dear Value Consultant,
    Read Combination segments for material account from item level
    "For any inventory transactions"
    Is there is away to read the material account from item level , to affect the real combination segments not general combinations segments from item master or organization
    Business Impacts :
    All inventory transaction for all item will affect the same combination segments for material accounts
    After I transfer to GL, This not helps me to differentiate the balance for material value is related to any item category
    Also for Budget Wise , I want to map the budget on combination level for materials accounts , and this not actualize without affect the real combination for material accounts in subledger ,
    Thanks

    I have not seen any client asking for this, but you can consider Costing Hooks to create your own accounting engine for inventory transactions. Hope you are taalking about standard costing. In such case, costing hooks are available in Oracle for you to write your own accounting.
    Even better in R12, you can do this with setup in SLA.
    Thanks
    Nagamohan

  • RFC for reading payroll results into Accounting

    hi folks,
    I have the HR payroll results forwarded to accounting. I need to display these results in the accounting system. Is there a RFC enabled function module to do that?
    your help is really appreciated.
    thanks
    Vinu

    Hi
    Well there’s a Fm "RFC_READ_TABLE" , if you have authorization of target  system you can read PCL1,2 Tables.
    Here`s the FM "BAPI_GET_PAYROLL_RESULT_LIST"
    Hope this’ll help you
    Thanks
    Message was edited by: Suleman Javed

  • Configurational settings for calling HTTP from ABAP

    Hi,
    I need to call HTTP from ABAP.
    Other than ABAP code, what configurational settings (and functional settings, if any) I need to do for this scenario..
    Please help...
    Thanks,
    Shivaa...
    Moderator message - Duplicate post locked
    Edited by: Rob Burbank on May 7, 2009 3:44 PM

    Hi All,
    I have a problem to pass a file.txt in a parameter of a web service.
    Iam using CL_HTTP_CLIENT and I am passing the parameters (user, password and file):
    clear wa_form.
    wa_form-name = 'user'.
    wa_form-value = '33333333333'.
    append wa_form to it_form.
    clear wa_form.
    wa_form-name = 'password'.
    wa_form-value = '11111111'.
    append wa_form to it_form.
    clear wa_form.
    wa_form-name = 'file'.
    wa_form-value = data. ---> "data" is a type string with the data of the file.txt.
    append wa_form to it_form.
      r_client->request->set_form_fields( fields = it_form ).
    I have not problem with the user and password parameters.
    Thank.

  • Read Payroll Result table.

    Hi,
    Could you please explain to me the procedure or the different steps needed to read the payroll result table for a particular country?To be more specific for my present req. the country is Canada.I'm new to the payroll module and hence do not know how the payroll procedure is executed.
    A code example will be greatly appreciated.
    Any help will be of good to me.
    Thanks,
    Sandeep.
    Edited by: Sandeep Ram on Mar 24, 2008 1:41 PM

    include rpc2cd09.           "Cluster CD Data-Definition
    include rpc2ca00.           "Cluster CA Data-Definition
    include RPC2RKK0.       "Cluster RK Data-Definition
    include rpc2rx09.           "Cluster internat. part
    include rpppxd00.           "Data befinition buffer PCL1/PCL2
    include rpppxd10.           "Common part buffer PCL1/PCL2
    include rpppxm00.          "Buffer handling routine
    data : it_rgdir like pc261 occurs 0 with header line.
    data : it_rt like PC207 occurs 0 with header line.
    First get the payroll results using the FM : CU_READ_RGDIR
      CALL FUNCTION 'CU_READ_RGDIR'
          EXPORTING
            persnr   = p_pernr  <-- pass pernr here ...
          TABLES
            in_rgdir = it_rgdir.
        IF sy-subrc = 0.
          SORT it_rgdir BY seqnr.
        ENDIF.
        LOOP AT it_rgdir WHERE srtza = 'A'
                        AND   void IS INITIAL
                        AND   reversal IS INITIAL
                        AND   fpper = v_fpper.   <-- Pass the period for
             which U want to get the payroll results
              v_seqnr = it_rgdir-seqnr. 
        ENDLOOP.
        rx-key-pernr = p_pernr.
        rx-key-seqno = v_seqnr.
        rp-imp-c2-rk.   <-- relid for canada is 'RK'
    it_rt[] = rt[]. ---> results table ...
    Now loop at rt .. and get the amounts for wage types ...
    just an example ...
    loop at it_rt.
      if it_rt-lgart = '/101'.
         v_betrg = it_rt-betrg.
      endif.
    endloop.

  • Wrongly payroll run for one employee, who left company several month ago

    Hi all,
    There is one case.
    One employee left company several months ago and his payroll data was also determined in the system. But the month payroll run included this guy not correctly. And also there are not any change found for his info type data with pc00_m16_uaud. But system shows the payroll administer, who run the payroll this month, changed his payroll master data in infotype 3.
    Any suggestion about this case will be appreciated.
    Julian

    Hi Jullian
    A Retro payroll runs if  "Earl.pers. RA date" is changed in Infotype 3. This also changes if there is any master data change in any payroll related Infotype like 8, 14, 15 etc. Please check if any data has changed for the employee to cause Retro payroll run.
    Thanks

  • How to remove a network activity for one employee from the worklist?

    Hi,
    We are using the SAP project system where project resources are assigned network activities. In the worklist in the ESS timesheet, the assigned network activities are displayed for the employee. The problem is when several employees are assigned for a network activity, and one of them no longer should register hours on this activity. How can you remove the assignment (using dates etc.) for only one person so that the network activity no longer is present in his worklist in the timesheet?
    Regards,
    Petter

    Well for this pernr you need to have a special coding to check for network and pernr.
    other would be a simple way using cats0003 to validate data an employee records here you can have a individual check
    for this pernr that he doesnt record for this activity and throw an error when he does! this is simpler

  • Multiple Currency Payroll Payments for one Employee

    Hello,
    We have a requirement of paying one employee in multiple currencies (i.e in Local currency and USD). This means that such employee has two bank accounts, i.e. Local Currency Account and USD Account.
    The costing of payroll costs is done in the local currency. Does anyone know any standard procedure for this?
    P.S we are using Global Legislation
    Regards,
    Salman

    Hi Salman,
    Have you tried this from Element Define window. There is functionality for Input and Output currency.
    Hope it could meet your requirement.
    Thanks
    AshokP

  • Error in determining Paper Format for Printout triggering from ABAP Code

    Hi Experts,
    I am trying to trigger a printout from my ABAP code using "NEW-PAGE PRINT ON ...... NEW-PAGE PRINT OFF" statement.
    I am passing the Print Parameters using the FM "GET_PRINT_PARAMETERS" as below:
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
          EXPORTING
            destination    = ls_options-tddest
            copies         = 1
            list_name      = 'Notification'
            list_text      = 'ERROR NOTIFICATION'
            immediately    = 'X'
            release        = 'X'
            new_list_id    = ' '
    *        expiration     =
            line_size      = 79
            line_count     = 23
            layout         = 'X_65_80'
            sap_cover_page = ' '
            receiver       = 'SAP*'
            department     = 'System'
            no_dialog      = 'X'
          IMPORTING
            out_parameters = lv_params.
    But I am facing a problem. Though I am passing X_65_80 to the LAYOUT in the Function Module, it is trying to print in LETTER format. But the specified printer as the printer supports only A4 paper format and as a result, I am not getting any printout.
    Kindly help me with your suggestions to resolve this.
    Thanks in advance.
    Regards,
    Keerthi

    Hi,
    I just found that this problem is even stranger.
    I am able to print the said message on my local printer but when I try to print the same message on a different printer located at a different location, the printout does not get triggered. I am not getting any error messages also in this case.
    What could be the possible reason for this?
    Kindly share your views/experience with me on this one.
    Thank you.
    Regards,
    Keerthi

  • Need to read all entris  for field prtxt from table /sapsll/prt

    hi
    i need to read all entries from table /sapsll/prt field prtxt but only one is coming
    pls see below seelct statement
    if not gt_sagmeld[] is initial.
                SELECT /sapsll/cuit~guid_cuit         " PK
                       /sapsll/cuit~QUANT_FLT         " to be displayed
                       /sapsll/cuit~QUAUM             " to be displayed
                       /sapsll/cuit~RPTDT             " to be displayed
                       /sapsll/cuit~guid_cuhd
                       /sapsll/cuit~guid_pr           " needed for gt_prt inttab
                      /sapsll/corref~refno
                       /sapsll/corref~guid_pobj
                INTO corresponding fields of table gt_sapsllcuit
                FROM ( ( /sapsll/cuit
                inner join /sapsll/cuhd on /sapsll/cuit~guid_cuhd = /sapsll/cuhd~guid_cuhd )
                inner join /sapsll/corref on /sapsll/corref~guid_pobj = /sapsll/cuhd~guid_cuhd )
                FOR all entries in gt_sagmeld
                WHERE /sapsll/cuit~guid_cuit = gt_sagmeld-guid_pobj.
             endif.
            if not gt_sapsllcuit[] is initial.
             select /sapsll/prt~prtxt
                    /sapsll/prt~guid_pr       
             into corresponding fields of table gt_prt
             from /sapsll/prt
             for all entries in gt_sapsllcuit
             where /sapsll/prt~guid_pr = gt_sapsllcuit-guid_pr.
    loop at gt_sagmeld into wa_sagmeld.
    read table gt_sapsllcuit into wa_sapsllcuit
    with key guid_cuit = wa_sagmeld-guid_pobj
    binary search.
    Read table gt_prcon into wa_prcon with key
    guid_pr = wa_sapsllcuit-guid_pr.
    if sy-subrc = 0.
    *wa_sagmeld_outtab-guid_pr  = wa_prt-guid_pr. 
    here i am facing problem as multiple entries from table  /sapsll/prt is not being displayed only one.....but i have checked in table it is having two enteries
    pls suggest
    reagards
    Nishant

    Hi Nishant!
    When you use 'for all entries' SAP (or database?) does a 'delete adjacent duplicates' on the result. This is necessary because of the special selection technique in this case.
    You need to select enough columns from /sapsll/prt, so that your two entries will differ in the result.
    Regards,
    Christian

Maybe you are looking for

  • Dropouts and poor performance

    I'm on a long copper run, getting about as hi speed as expected around 3M (so profile looks ok) But ping times regularly in high hundreds of ms or timeout (several times a minute), normally 60-80ms Trace route & pings below during one of these period

  • Getting username and password with https connection

    I have a webservice that will authenticate the user to run a http://localhost:8080/soap/services/myService, I would like to call this in a form when a user clicks a button.  So I require HTTP/s authentication on the SOAP service, and this brings up a

  • Item level Condition types appearnance by default in PO

    Dear all, I have created the pricing procedure. But, While creating a PO, I want the condition types to appear by default so that I can just enter the discount  and freight %. in the input field. I do not want to enter the condition types for item ma

  • IllegalStateException

    I got the following exception from the console, I don't know whether it is my servlet code problem or the weblogic setup problem. I am using Weblogic 5.1 sp10 in Solaris 7. Thanks in advance. <ServletContext-General> Servlet failed with Exception jav

  • Java app connected to Lite (w/JDBC) on WinCE with Synchronization?

    Anyone already tried to connect a java application to Oracle 9i Lite using JDBC on PocketPC (Windows CE 3.0) with synchronization to Oracle database? I'm trying do it but I'm having problems starting just in jdbc driver... I'll appreciate any share o