Ldb pnpce

hi,
i have to display a report using ldb PNPCE .Displayed Data should be between the date period entered in selection-screen. say pn-begda = 11.02.2008 and pn-endda = 17.02.2008.for this i hav written code
GET PERAS.
PROVIDE massn massg begda pernr stat2 FROM P0000
          BETWEEN pn-begda AND pn-endda .
MOVE:
p0000-begda TO wa_data-begda,
p0000-pernr TO wa_data-pernr,  etc....
ENDPROVIDE.
but in output its displaying all data with BEGDA what i entered in selection-screen( i.e 11.02.2008)  for all PERNR.
i tried ldb PNP but its displaying date what existing in database for corresponding  PERNR .even this also not displaying in date range what i entered in selection screen. i tried with standard report categoty and custom report category. 
is there anything additional coding should add ?
thanks,
rajkumar.

Hi Raj
Just try this report
S_AHR_61016380 - Logged Changes in Infotype Data
Regards
Santhosh.S

Similar Messages

  • How to use ldb PNPCE with FM u0091HR_INFOTYPE_OPERATIONu0092

    Hi all,
    I’m creating a report with LDB PNPCE, this report has to create/modify infotypes of an ID person. I’m trying to use de FM ‘HR_INFOTYPE_OPERATION’, but it’s not working… A DUMP is generated, with this description:
    An exception that could not be caught occurred.CX_HRPA_VIOLATED_PRECONDITION
    I think that the problem is due to logical database PNPCE, because if I use PNP, it’s working… Does anybody know anything about using the FM ‘HR_INFOTYPE_OPERATION’ with the LDB PNPCE?
    Thanks!!

    This piece of code it's working with ldb PNP 
    CALL FUNCTION 'ENQUEUE_EPPRELE'
       EXPORTING
      MODE_PREL            = 'E'
      MANDT                = SY-MANDT
         pernr                = wa_p9961-pernr
         infty                = '9961'
      SUBTY                =
      OBJPS                =
      SPRPS                =
    endda                =  wa_p9961-endda                      "'99991231'
    begda                =  wa_p9961-begda                      "'20071201'
      SEQNR                =
      X_PERNR              = ' '
      X_INFTY              = ' '
      X_SUBTY              = ' '
      X_OBJPS              = ' '
      X_SPRPS              = ' '
      X_ENDDA              = ' '
      X_BEGDA              = ' '
      X_SEQNR              = ' '
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
       EXCEPTIONS
         foreign_lock         = 1
         system_failure       = 2
         OTHERS               = 3
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty                   = '9961'
          number                  = wa_p9961-pernr
           subtype                = wa_p9961-subty
            OBJECTID               =
            lockindicator          = 'X'
           validityend            = wa_p9961-endda
           validitybegin          = wa_p9961-begda
            recordnumber           = lwa_pa9961-seqnr
          record                  = wa_p9961
          operation               = 'INS'
          tclas                   = 'A'
          dialog_mode             = '0'
            nocommit               = ' '
            VIEW_IDENTIFIER        =
            SECONDARY_RECORD       =
       IMPORTING
         return                 = l_return
            KEY                    =
      CALL FUNCTION 'DEQUEUE_EPPRELE'
       EXPORTING
      MODE_PREL       = 'E'
      MANDT           = SY-MANDT
         pernr           = wa_p9961-pernr
         infty           = '9961'
      SUBTY           =
      OBJPS           =
      SPRPS           =
    endda                = wa_p9961-endda                       "'99991231'
    begda                = wa_p9961-begda                       "'20071201'
      SEQNR           =
      X_PERNR         = ' '
      X_INFTY         = ' '
      X_SUBTY         = ' '
      X_OBJPS         = ' '
      X_SPRPS         = ' '
      X_ENDDA         = ' '
      X_BEGDA         = ' '
      X_SEQNR         = ' '
      _SCOPE          = '3'
      _SYNCHRON       = ' '
      _COLLECT        = ' '
    But if I use ldb PNPCE instead PNP, with the events:
    GET person.
    GET group.
    GET peras.
    ths dump is generated...
    Thank u!!

  • Selection screen stmt for LDB PNPCE

    hi
    Like we have GET PERNR. for the Logical databse PNP wat is the statement GET ? for LDB PNPCE.

    Hi,
    Try this -
    nodes person.
    get person.
    Regards,
    Anand Mandalika.

  • FM's used in report program using ldb pnpce

    hii all,
      will anybody provide me function modules that are used to populate data in report program using ldb pnpce.
    <REMOVED BY MODERATOR>
    thanks in advance
    regards
    Ashweeni.
    Edited by: Alvaro Tejada Galindo on Mar 18, 2008 6:01 PM

    U can use all the FM's which were used for LDB PNP ..
    For ex : Use the below to get the payroll results ..
    To get the results directory
      call function 'CU_READ_RGDIR'
        exporting
          persnr          = peras-pernr
        tables
          in_rgdir        = pc261_tab
        exceptions
          no_record_found = 1
          others          = 2.
    to get evaluation periods ...
    call function 'CD_EVALUATION_PERIODS'
    There are no particular FM's that will populate data in report
    program .. please let me know what is the requirement ...

  • HR ABAP- concurrent employment  ( LDB :PNPCE)

    Hi
         I am working on concurrent employment in HR. I have to write ABAP report I don’t know where to start. Do you guys give me some idea? How I’ll start. I know that we use LDB PNPCE for concurrent employment. Do you guys know any standard reports for concurrent employment?
    Waiting

    In the program attributes declare the LDB as PNPCE and look at the sample code.
    REPORT  z_pnpce MESSAGE-ID pn LINE-SIZE 130.
    tables: pernr.
    Nodes : Person, peras.
    INFOTYPES: 0006.
    DATA: BEGIN OF gt_0006 OCCURS 0,
           pernr LIKE pernr-pernr,
           stras LIKE p0006-stras,
           ort01 LIKE p0006-ort01,
           ort02 LIKE p0006-ort02,
           pstlz LIKE p0006-pstlz,
          END OF gt_0006.
    START-OF-SELECTION.
    GET person.
    GET peras.
      rp_provide_from_last p0006 '1' pn-begda pn-endda.
      gt_0006-pernr = p0006-pernr.
      gt_0006-stras = p0006-stras.
      gt_0006-ort01 = p0006-ort01.
      gt_0006-ort02 = p0006-ort02.
      gt_0006-pstlz = p0006-pstlz.
      APPEND gt_0006.
      CLEAR  gt_0006.
    END-OF-SELECTION.
      LOOP AT gt_0006.
        WRITE:/ gt_0006-pernr,
                gt_0006-stras,
                gt_0006-ort01,
                gt_0006-ort02,
                gt_0006-pstlz.
      ENDLOOP.
    Good luck.
    Venu

  • Regarding using of LDB PNPCE  in sap hr

    Can some one please tell me how to disable some of the selection screen fields and blocks of LDB PNPCE selection-screen which are not used in my report selection-screen?
    Thanks,
    Phanisreedhar.L

    *: Report:  ZP_POSTCODE                                                :
    *: Author:  www.SAPDev.co.uk                                           :
    *: Date  :  2004                                                       :
    *: Description: Displays report of employees by postcode area,         :
    *:              includes current travelling allowances (i.e. parking   :
    *:              permit or transport card etc..)                        :
    *: Use:         Help encourage the use of car sharing and public       :
    *:              transport where appropriate.                           :
    REPORT  zp_postcode.
    type-pools: slis.                                      "ALV Declarations
    NODES: pernr.
    INFOTYPES: 0000, 0001, 0002, 0006, 0008, 0014, 0105, 0121.
    SELECTION-SCREEN BEGIN OF BLOCK pcode WITH FRAME TITLE text-s01.
    SELECT-OPTIONS: so_pcode FOR p0006-pstlz.
    SELECTION-SCREEN END OF BLOCK pcode.
    TYPES: BEGIN OF t_output,
      pernr       TYPE p0001-pernr,   "personnel name
      anredtxt    TYPE t522t-atext,   "title (based on p0002-anred)
      fname       TYPE p0002-vorna,   "first name
      lname       TYPE p0002-nachn,   "last name
      orgtx       TYPE t527x-orgtx,   "dept
      fte         TYPE p0008-bsgrd,   "fte
      parking(20) TYPE c,
      payslip     TYPE t526-sachn,        "payslip address
      telno       TYPE p0105-usrid_long,  "tel number(p0105-usrty = 0020)
      email       TYPE p0105-usrid_long,  "email (p0105-usrty = MAIL)
      postcode    type p0006-pstlz,
    END OF t_output.
    DATA: it_output TYPE STANDARD TABLE OF t_output INITIAL SIZE 0,
          wa_output TYPE t_output.
    *ALV data declarations
    data: fieldcatalog   type slis_t_fieldcat_alv with header line,
          gd_tab_group   type slis_t_sp_group_alv,
          gd_layout      type slis_layout_alv,
          gd_repid       like sy-repid,
          gt_events      type slis_t_event,
          gd_prntparams  type slis_print_alv,
          gd_count(6)    type n,
          gd_outtext(70) type c,
          gd_lines       type i.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    clear: gd_count.
    GET pernr.
    Infotype 0121 is used to store multiple contracts for personnel.
    Field p0121-hpern contains the personnel number for the main contract.
      PROVIDE * from p0121 between pn-begda and pn-endda.
      Check if main contract
        if p0121-pernr ne p0121-hpern.
          reject.
        endif.
      ENDPROVIDE.
      add 1 to gd_count.
      concatenate 'Processing personnel data'(m10) gd_count into gd_outtext
                separated by ' '.
    Display indicator for employee count
      perform progress_indicator using gd_outtext.
    Retrieve datd from infotypes
      rp_provide_from_last p0000 space pn-begda pn-endda.
      rp_provide_from_last p0001 space pn-begda pn-endda.
      rp_provide_from_last p0002 space pn-begda pn-endda.
      rp_provide_from_last p0006 space pn-begda pn-endda.
      rp_provide_from_last p0008 space pn-begda pn-endda.
      rp_provide_from_last p0014 space pn-begda pn-endda.
    Check post code
      CHECK p0006-pstlz IN so_pcode.  "cp
    Post code
      wa_output-postcode = p0006-pstlz.
    Personnel number
      wa_output-pernr = pernr-pernr.
    Personnel title
      SELECT SINGLE atext
        FROM t522t
        INTO wa_output-anredtxt
       WHERE sprsl EQ sy-langu AND
             anred EQ p0002-anred.
    First name
      wa_output-fname = p0002-vorna.
    Last name
      wa_output-lname = p0002-nachn.
    Organizational Unit text (dept)
      SELECT SINGLE orgtx
        FROM t527x
        INTO wa_output-orgtx
       WHERE sprsl EQ sy-langu AND
             orgeh EQ p0001-orgeh AND
             endda GE sy-datum.
    FTE
      wa_output-fte = p0008-bsgrd.
    Parking / travel deducted?
      CASE p0014-lgart.
        WHEN '7180' OR '7181' OR '7182'.
          wa_output-parking = text-002.
        WHEN '7183'.
          wa_output-parking = text-001.
        WHEN '7171' OR '7172' or '7173' or '7174' or
             '7175' or '7176' or '7177' or '7178'.
          wa_output-parking = text-003.
      ENDCASE.
    Payslip Address
      SELECT SINGLE sachn
        FROM t526
        INTO wa_output-payslip
       WHERE werks EQ p0001-werks AND
             sachx EQ p0001-sacha.
      PROVIDE * from p0105 between pn-begda and pn-endda.
      Telephone numbers
        if p0105-usrty = '0020'.
           wa_output-telno = p0105-usrid_long.
        endif.
      Email address
        if p0105-usrty = 'MAIL'.
           wa_output-email = p0105-usrid_long.
        endif.
      ENDPROVIDE.
      append wa_output to it_output.
      clear: wa_output.
    *END-OF-SELECTION.
    END-OF-SELECTION.
    describe table it_output lines gd_lines.
    if gd_lines gt 0.
      perform build_fieldcatalog.
      perform build_layout.
      perform display_alv_report.
    else.
      message i003(zp) with 'No records found'.
    endif.
    *&      Form  PROGRESS_INDICATOR
          Displays progress indicator on SAP screen
    form progress_indicator using p_text.
      call function 'SAPGUI_PROGRESS_INDICATOR'
          exporting
            PERCENTAGE = 0
               text       = p_text.
    endform.                    " PROGRESS_INDICATOR
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'PERNR'.
      fieldcatalog-seltext_m   = 'Personnel No.'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
    fieldcatalog-emphasize   = 'X'.
    fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'ANREDTXT'.
      fieldcatalog-seltext_m   = 'Title'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'FNAME'.
      fieldcatalog-seltext_m   = 'First Name'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'LNAME'.
      fieldcatalog-seltext_m   = 'Last Name'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'ORGTX'.
      fieldcatalog-seltext_m   = 'Department'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'FTE'.
      fieldcatalog-seltext_m   = 'FTE'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PARKING'.
      fieldcatalog-seltext_m   = 'Parking/Metrocard'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PAYSLIP'.
      fieldcatalog-seltext_m   = 'Payslip Add.'.
      fieldcatalog-col_pos     = 7.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'TELNO'.
      fieldcatalog-seltext_m   = 'Telephone'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EMAIL'.
      fieldcatalog-seltext_m   = 'E-mail'.
      fieldcatalog-col_pos     = 9.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'POSTCODE'.
      fieldcatalog-seltext_m   = 'Post code'.
      fieldcatalog-col_pos     = 10.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-zebra             = 'X'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_output
           exceptions
                program_error           = 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.
    endform.                    " DISPLAY_ALV_REPORT
    The following program allows you to retrieve all the individuall sickpay values for a given period and person.This data is then exported to memory using the memory id entered on the selection screen. This thereforeallows you to submit this program from another program and then process the data within the calling programby importing the data from memory.  Click here for example .
    Report:  ZSXP_ABSENCE_DATA                                           **                                                                      ** Author:  www.SAPdev.co.uk                                            **                                                                      ** Date  :  12.02.2003                                                  **                                                                      ** Description: Retrieve maternaty/Sickness Absence data*                                                                      ************************************************************************REPORT ZSXP_ABSENCE_DATA      LINE-SIZE 100 NO STANDARD PAGE HEADING                MESSAGE-ID 5g.TABLES: t554s, pernr, pcl1, pcl2.INCLUDE rpclst00.INCLUDE rpc2rx09.                      "Payroll results datadefns-Intl.INCLUDE rpc2rxx0.                      "Payroll results datadefns-Intl.INCLUDE rpc2rgg0.                      "Payroll results datadefns-GBINCLUDE rpcfdcg0.                      "Payroll results datadefns-GBINCLUDE rpcdatg0.INCLUDE rpc2cd00.                      "Cluster Directory defns.INCLUDE rpc2ps00.                      "Cluster: Generierte SchematasINCLUDE rpc2pt00.INCLUDE rpcfdc10.INCLUDE rpcfdc00.INCLUDE rpppxd00.INCLUDE rpppxd10.INCLUDE rpcfvp09.INCLUDE rpcfvpg0.INCLUDE rpppxm00.INFOTYPES: 0001,                       "Organisational assignment           0002,                       "Personal Data           0003,                       "Payroll Status           0088,                                            "SMP           2001,                       "Absences           0086.                       "SSP/SMP ExlclusionsDATA:   ssp_weeks TYPE p DECIMALS 2 VALUE 0.DATA:   ssp_total TYPE p DECIMALS 2 VALUE 0,        total_val TYPE p DECIMALS 2 VALUE 0,        smp_weeks TYPE p DECIMALS 2 VALUE 0,        smp_value TYPE p DECIMALS 2 VALUE 0,        gross     LIKE pc207-betrg,        dis_gross TYPE p DECIMALS 2 VALUE 0.DATA: gd_begda(10) TYPE c,      gd_endda(10) TYPE c.DATA: ld_orgtxt LIKE t527x-orgtx.DATA: name(30).DATA: BEGIN OF itab OCCURS 0,      pernr LIKE p0002-pernr,      perid LIKE p0002-perid,      name  LIKE name,      END OF itab.TYPES: BEGIN OF t_report,   pernr   TYPE pernr-pernr,   "8   name    TYPE name,          "30   awart   TYPE p2001-awart,   "4   begda   TYPE p2001-begda,   "10   endda   TYPE p2001-endda,   "10   wkspaid TYPE p DECIMALS 2,  "10   amtpaid TYPE p DECIMALS 2,  "10  END OF t_report.DATA: it_report TYPE STANDARD TABLE OF t_report INITIAL SIZE 0,      wa_report TYPE t_report.DATA: moabw LIKE t001p-moabw.DATA: printheader TYPE i VALUE 1,      gd_success  TYPE i. NCALE declarationsTYPES : BEGIN OF pfra0_pcale,           annee(4) TYPE c.        INCLUDE STRUCTURE pcint.TYPES : END OF pfra0_pcale.TYPES : pfra0_tab_pcale  TYPE  pfra0_pcale  OCCURS 0.DATA:  it_ncale TYPE STANDARD TABLE OF pcnat INITIAL SIZE 0,       wa_ncale TYPE pcnat,       it_pcale TYPE  pfra0_tab_pcale,       pcale  TYPE  pfra0_tab_pcale.* SMP/SSP absence datadata begin of it_msa occurs 0.        include structure pc27j.data end of it_msa.parameters: p_memid type char30.************************************************************************STAR-OF-SELECTIONSTART-OF-SELECTION.gd_begda = pn-begda.gd_endda = pn-endda.gd_begda6(2) = '01'.gd_endda6(2) = '01'.refresh: it_msa.clear:   it_msa.GET pernr.*    PERFORM IMPORT_PC USING GD_SUCCESs.  PERFORM get_rgdir.  while gd_begda le gd_endda.    PERFORM get_new_rg USING gd_begda.    CALL FUNCTION 'CALCULATE_DATE'        EXPORTING*             DAYS        = '0'             MONTHS      = '1'             START_DATE  = gd_begda        IMPORTING             RESULT_DATE = gd_begda.  endwhile.  msa[] = it_msa[].  EXPORT msa TO MEMORY ID p_memid.&---------------------------------------------------------------------&      Form  GET_RGDIR&-------------------------------------------------------------------FORM get_rgdir.  rp-init-buffer.  CLEAR rgdir.  REFRESH rgdir.  MOVE pernr-pernr(8) TO cd-key-pernr.  rp-imp-c2-cd.  IF rp-imp-cd-subrc = 0.                                "rgdir success    SORT rgdir BY seqnr ASCENDING.    CLEAR rgdir.  ENDIF.ENDFORM.-----------------------------------------------------------------**       FORM get_new_rg                                               **-----------------------------------------------------------------**       ........                                                      **-------------------------------------------------------------------**  >  search_date                                                   **-----------------------------------------------------------------FORM get_new_rg USING search_date.  DATA: rg_day TYPE d,        rgbeg  TYPE d,        rgend  TYPE d.  MOVE: search_date TO rg_day.  CLEAR: msa.  LOOP AT rgdir WHERE void NE 'V'.    MOVE: rgdir-fpbeg TO rgbeg,          rgdir-fpend TO rgend.    IF ( rgbeg <= rg_day ) AND       ( rgend >= rg_day ) AND       rgdir-srtza = 'A'.        "Must be periods actual set of results      EXIT.    ENDIF.  ENDLOOP.  UNPACK rgdir-seqnr TO rx-key-seqno.  MOVE pernr-pernr(8) TO rx-key-pernr(8).  rp-imp-c2-rg.  append lines of msa to it_msa.  IF rp-imp-rg-subrc <> 0.   rg fail  ELSE.*   rg success  ENDIF.ENDFORM.Text elements------------------------------------------------------*  001     Sickness History for SSP 1*  002     Employee Name.*  003     National Insurance Number.*  004     Payroll Number.*  005     Sickness Start Date*  006     Sickness End Date*  007     Number of weeks paid*  008     system-error:*  009     No SSP / SMP record found*  010     Absence type*  011     No. weeks paid*  012     Amount*  013     Organisation Unit.*  T01     Sickness Absence typesSelection texts--------------------------------------------------------* SO_SAP          SAP Att./absence types* SO_SMP          SMP Att./absence types* SO_SPP          SPP Att./absence types* SO_SSP          SSP Att./absence types
    Uses Logical database 'PNP'(entered in program attributes) to retrieve various personnel data and downloadit to an excel / tab delimited file.
    .......................................................................: Report:  ZDOWNEMPDATA                                               ::                                                                     :: Author:  www.SAPDev.co.uk                                           ::                                                                     :: Date  :  2004                                                       ::                                                                     :: Description: Downloads employee data to TAB delimited flat files    ::                                                                     ::.....................................................................:.......................................................................: Report:  ZDOWNEMPDATA                                               ::                                                                     :: Author:  www.SAPDev.co.uk                                           ::                                                                     :: Date  :  2004                                                       ::                                                                     :: Description: Downloads employee data to TAB delimited flat files    ::                                                                     ::.....................................................................:REPORT  zdownempdata                                         .INFOTYPES: 0000, 0001, 0007, 0008, 0121, 0615.NODES: pernr.TABLES: t001p.TYPES: BEGIN OF t_employee,*        INCLUDE STRUCTURE hrms_biw_io_occupancy.  begda     TYPE begda,  endda     TYPE endda,  pernr     TYPE pernr_d,  rfpnr     TYPE rfpnr,  bukrs     TYPE bukrs,  werks     TYPE persa,  btrtl     TYPE btrtl,  persg     TYPE persg,  persk     TYPE persk,  orgeh     TYPE orgeh,  stell     TYPE stell,  plans     TYPE plans,  kokrs     TYPE mast_coar,  kostl     TYPE mast_cctr,  abkrs     TYPE abkrs,  molga     TYPE molga,  trfar     TYPE trfar,  trfgb     TYPE trfgb,  trfkz     TYPE trfkz,  trfgr     TYPE trfgr,  trfst     TYPE trfst,  bsgrd     TYPE bsgrd,  ansal     TYPE ansal_15,  ancur     TYPE ancur,  empct     TYPE empct,  stat2     TYPE stat2,  ncsdate     TYPE hiredate,  sltyp     TYPE p_sltyp,  slreg     TYPE p_slreg,  slgrp     TYPE p_slgrp,  sllev     TYPE p_sllvl,  ansvh     TYPE ansvh,  vdsk1     TYPE vdsk1,  sname     TYPE smnam, END OF t_employee.DATA: it_employee TYPE STANDARD TABLE OF t_employee INITIAL SIZE 0,      wa_employee TYPE t_employee.TYPES: BEGIN OF t_emptexts,*        INCLUDE STRUCTURE hrms_bw_txt_employee.  DATEFROM     TYPE RSDATEFROM,  DATETO     TYPE RSDATETO,  PERNR     TYPE PERSNO,  TXTMD     TYPE EMNAM, END OF t_emptexts.DATA: it_emptexts TYPE STANDARD TABLE OF t_emptexts INITIAL SIZE 0,      wa_emptexts TYPE t_emptexts.TYPES: BEGIN OF t_contract,*        INCLUDE STRUCTURE pa0615.  pernr TYPE p0615-pernr,  begda TYPE p0615-begda,  endda TYPE p0615-endda,  aedtm TYPE p0615-aedtm,  ctype TYPE p0615-ctype,  cbeg  TYPE p0615-cbeg,  cend  TYPE p0615-cend, END OF t_contract.DATA: it_contract TYPE STANDARD TABLE OF t_contract INITIAL SIZE 0,      wa_contract TYPE t_contract.DATA: it_tabemp TYPE filetable,      gd_subrcemp TYPE i,      it_tabempt TYPE filetable,      gd_subrcempt TYPE i,      it_tabcont TYPE filetable,      gd_subrccont TYPE i.DATA: gd_downfile TYPE string.SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.PARAMETERS: p_emp   LIKE rlgrap-filename,            p_empt  LIKE rlgrap-filename,            p_cont LIKE rlgrap-filename.SELECTION-SCREEN END OF BLOCK block1.***********************************************************************at selection-screenAT SELECTION-SCREEN ON VALUE-REQUEST FOR p_emp.  REFRESH: it_tabemp.  CALL METHOD cl_gui_frontend_services=>file_open_dialog    EXPORTING      window_title      = 'Select File'      default_filename  = '.xls'      initial_directory = 'C:\'      multiselection    = ' '  "No multiple selection    CHANGING      file_table        = it_tabemp      rc                = gd_subrcemp.  LOOP AT it_tabemp INTO p_emp.  ENDLOOP.***********************************************************************at selection-screenAT SELECTION-SCREEN ON VALUE-REQUEST FOR p_empt.  REFRESH: it_tabemp.  CALL METHOD cl_gui_frontend_services=>file_open_dialog    EXPORTING      window_title      = 'Select File'      default_filename  = '.xls'      initial_directory = 'C:\'      multiselection    = ' '  "No multiple selection    CHANGING      file_table        = it_tabempt      rc                = gd_subrcempt.  LOOP AT it_tabempt INTO p_empt.  ENDLOOP.***********************************************************************at selection-screenAT SELECTION-SCREEN ON VALUE-REQUEST FOR p_cont.  REFRESH: it_tabcont.  CALL METHOD cl_gui_frontend_services=>file_open_dialog    EXPORTING      window_title      = 'Select File'      default_filename  = '.xls'      initial_directory = 'C:\'      multiselection    = ' '  "No multiple selection    CHANGING      file_table        = it_tabcont      rc                = gd_subrccont.  LOOP AT it_tabcont INTO p_cont.  ENDLOOP.************************************************************************START-OF-SELECTION.START-OF-SELECTION.GET pernr. Selecting the latest infotype record  rp_provide_from_last p0000 space pn-begda pn-endda.  rp_provide_from_last p0001 space pn-begda pn-endda.  rp_provide_from_last p0007 space pn-begda pn-endda.  rp_provide_from_last p0008 space pn-begda pn-endda.  rp_provide_from_last p0121 space pn-begda pn-endda.  rp_provide_from_last p0615 space pn-begda pn-endda.  MOVE-CORRESPONDING p0001 TO wa_employee.  wa_employee-rfpnr = p0121-rfp01. "?????  MOVE-CORRESPONDING p0007 TO wa_employee.  MOVE-CORRESPONDING p0008 TO wa_employee.  MOVE-CORRESPONDING p0000 TO wa_employee.  SELECT SINGLE molga    FROM t001p    INTO wa_employee-molga   WHERE werks EQ p0001-werks AND         btrtl EQ p0001-btrtl.  SELECT SINGLE trfkz    FROM t503    INTO wa_employee-trfkz   WHERE persg EQ p0001-persg AND         persk EQ p0001-persk.  CALL FUNCTION 'HR_ENTRY_DATE'    EXPORTING      persnr                     = pernr-pernr*   RCLAS                      =*   BEGDA                      = '18000101'*   ENDDA                      = '99991231'*   VARKY                      =   IMPORTING      entrydate                  = wa_employee-ncsdate* TABLES*   ENTRY_DATES                = EXCEPTIONS   ENTRY_DATE_NOT_FOUND       = 1   PERNR_NOT_ASSIGNED         = 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.* append employee data  APPEND wa_employee TO it_employee.  CLEAR: wa_employee.  wa_emptexts-datefrom = p0001-begda.  wa_emptexts-dateto   = p0001-endda.  wa_emptexts-pernr    = p0001-pernr.  wa_emptexts-txtmd    = p0001-ename.* append employee texts data  APPEND wa_emptexts TO it_emptexts.  CLEAR: wa_emptexts.  MOVE-CORRESPONDING p0615 TO wa_contract.* append employee contract data  APPEND wa_contract TO it_contract.  CLEAR: wa_contract.************************************************************************END-OF-SELECTION.END-OF-SELECTION. download employee data  IF NOT p_emp IS INITIAL.    gd_downfile = p_emp.    CALL FUNCTION 'GUI_DOWNLOAD'      EXPORTING        filename              = gd_downfile        filetype              = 'ASC'        write_field_separator = 'X'      TABLES        data_tab              = it_employee.    IF sy-subrc EQ 0.      WRITE:/ 'Employee file downloaded to',              gd_downfile.    ELSE.      WRITE:/ 'There was an error downloading Employee file to',              gd_downfile.    ENDIF.  ENDIF.* download employee texts data  IF NOT p_empt IS INITIAL.    gd_downfile = p_empt.    CALL FUNCTION 'GUI_DOWNLOAD'      EXPORTING        filename              = gd_downfile        filetype              = 'ASC'        write_field_separator = 'X'      TABLES        data_tab              = it_emptexts.    IF sy-subrc EQ 0.      WRITE:/ 'Employee text file downloaded to',              gd_downfile.    ELSE.      WRITE:/ 'There was an error downloading Employee text file to',              gd_downfile.    ENDIF.  ENDIF.* download contract data  IF NOT p_cont IS INITIAL.    gd_downfile = p_cont.    CALL FUNCTION 'GUI_DOWNLOAD'      EXPORTING        filename              = gd_downfile        filetype              = 'ASC'        write_field_separator = 'X'      TABLES        data_tab              = it_contract.    IF sy-subrc EQ 0.      WRITE:/ 'Employee contract file downloaded to',              gd_downfile.    ELSE.      WRITE:/ 'There was an error downloading Employee contract file to',              gd_downfile.    ENDIF.  ENDIF.

  • How to create a new selection screen LDBS PNPCE

    how to create a new selection screen LDBS PNPCE

    Hello Ankit,
    Do you want to create a new selection screen in LDB PNPCE, or do you want to create a new selection screen in one of your reports using LDB PNPCE?
    For later (which is more common), you can use HR Report Category.
    Hope this helps.
    Best Regards,
    Biraju Rajyaguru

  • Regarding ldb pnpce and my customized infotype

    i have created my own infotype name '9777' and with the help of
    'hr_infotype_operation' i m inserting the data into this infotype
    now i m creating a report in which i m using ldb pnpce,
    but after the execution of GET PERAS the infotype table p9777
    is not populating but except this other infotypes tables are populating
    ,plz help me to sort out this problem.

    hi after the bapi did you used the commit .
    use this for the creation of an employee
    BAPI_EMPLCOMM_CREATE
    o give  your code here

  • Filling a field in Infoset(LDB-PNPCE) from it001 but want to fil from ztabl

    Hello All,
    I have created a Infoset query with LDB (PNPCE) .
    In infoset query has one field called description is filling from standard LDB PNPCE under orgnizational unit(it001).
    This description field from Standard LDB pnpce ---infotype0001and now i want to fill this field based on Ztable .
    How to achive this .Please help me.
    Thank you
    best regadrs
    Trupthi

    Hi,
    Change in standard field is not the best practice.
    You can write program in adhoc query
    instead of changing logic in that , create a new field and write a small code and fetch data from  Ztable which u r planing.
    steps to create that are given below.
    Go to Sq02 - enter your infoset and click on change
    Select additional fields of particular infotype where you want to create additional field
    Select extras button in the menu and click on create
    Select the option and Enter the name of the field,  Select Additional field and click on Continue
    Enter the data required data.Click on Continue.
    New field created .
    Select the field and click on  code button
    enter code and generate program.
    Regards,
    Naveen

  • Authorization for LDB PNPCE &PNPPS and table T77S0

    Hi folks ,
    I’m working on a very interesting requirement , I have developed an Ad hoc query , which is reading IT0019 ( Monitoring dates infotype ) with field called task type . I take a test login and give task type which is equal = ‘w’ . When I was running that query in test login to see security is in place or not . I found that whenever there’s two recs in IT0019 with task type ‘W’ 9 which test login has authorization and ‘W2’ ( which test login doesn’t have authorization ) its not pulling up any record . its giving no data . to make sure I again went in to Infotype IT0019 and delete the task type (W2 : the one which test login doesn’t have authorization ) . then I run the query . it pull up one record . So my question is how can I handle this situation in Adhoc query . I mean logically speaking it should pull up at least one record for which it has authorization . I am using LDB PNPCE .
    Moreover , I debug the query and I came to know its reading the the table T77S0 using class : CL_HR_T77S0.
    I read the about table (T77S0) , another question if I set another entry in the table with PNPPS and AUTSW. Will it works . Can I control it?
    http://help.sap.com/saphelp_erp2005/helpdata/en/84/49ba3b3bf00152e10000000a114084/content.htm
    Thanks,
    SK

    Hello Amit,
    you have to run the "copy" action ,while changing OM objects. then only it will effect in IT 0001
    if you will click on change then it will not update in PA.
    so click on Copy then do the changes and save it. it will update IT 0001.
    We had the same issue. if you get any solution then let me know.
    OR
    Will you try running  RHINTE30 Report
    do batch input session and run it via SM35
    Thanks and Regards
    Jaydeep Jadhav

  • Not able to use macro with LDB PNPCE

    Hi,
    I am trying to use macro 'rp-provide-from-last' as below with LDB PNPCE.But syntax error 'unable to  interpret SPACE' has occurred.
    rp-provide-from-last p0001 space pn-begda pn-endda.
    Please let me know how to use this macro with LDB PNPCE.

    The reason you are getting this error is that you would have used the GET Pernr. in start of selection.For PNPCE u have to define
    Nodes : person, peras.
    and then use the
    Get PERSON.
    Get PERAS in start of selection
    and then u can use the standard macros without any errors.

  • How to give pernr in range using LDB PNPCE

    I am using LDB PNPCE and in report category i want to give select option for pernr that will accept pernr in ranges also.So Please tell me how to give ranges of pernr.
    Thanx in advance.

    Hi,
    You mean that you want to set a range of personnel numbers as default on selection screen when running the report?
    If so, you can do that. That field is PNPPERNR, it is a select-option, set default values for it in event INITIALIZATION of your report.
    pnppernr-sign = 'I'.
    pnppernr-option = 'BT'.
    pnppernr-low = ....
    pnppernr-high = ...
    append pnppernr.
    Thanks

  • Rp_read_infotype macro wid LDB PNPCE ( Strange results )

    Hi Guys,
                 I’m working on LDB PNPCE. I was writing a report my requirement is to read all the records from 0001 and 0008, I used the macro  rp_read_infotype
    Well Here is the sample code what I’m trying to do ..
    start-of-selection.
    get peras.
      lc_pernr = peras-pernr.
    rp_read_infotype lc_pernr 0001  t_0001  '20000601' '99991231'.
      rp_read_infotype lc_pernr 0008  t_0008  '20000601' '99991231'.
      write:/ 'WHy?'.
    Now the funny thing with above code is that, if I’m passing the same parameter like I’m passing for ‘0008’. It just getting 1 result, ( as it has 4 records in pa0001 ) ,
    But in IT0008 its giving the all of 6 records .
    Then I change the code  , because if you select today on PNPCE selection screen it always take today’s date no matter what you are passing .  But its only behaving like that
    for IT0001.
    Then I change the code like
      lc_pernr = peras-pernr.
    rp_read_infotype lc_pernr 0001  t_0001  pn-begda      pn-enda.
      rp_read_infotype lc_pernr 0008  t_0008  '20000601' '99991231'.
    Its working fine for both in this case , but just notice my macro for it0008 is still the same . its still giving the same records , Even I select ‘ALL’ , DAY  or period on selection screen .
    My understanding is that for IT0001 it always retrieves current record where as for other infotypes it reads all records and considers passing parameters like I am doing for IT0008.
    Now this is very wired behavior for this macro for PNPCE. I have checked the OSS notes , There’re few OSS note which talks about this . But we are on SAPKE47052 support pack .
    That OSS notes are already in placed . Is any body out there also facing the same problem if no try to code in this way and see are you also facing the same problem . Then I should better post OSS message .
    Thanks a lot!!
    Saquib Khan
    "Knowledge comes but wisdom lingers!!"
    "Some are wise and some are otherwise"

    Well I read in PNPCE Documentation and my requirement is   to read specific period .
    <u><b>FYI</b></u>
    <b>Reading Infotypes: RP_READ_INFOTYPE</b>
    The RP_READ_INFOTYPE macro reads the data records of an infotype for the specified personnel numbers that are valid in the specified period, and writes these to the internal table specified. This table must be completed correctly. If no data records exist in the specified period, the PNP-SW-FOUND global switch is set to 0. Otherwise it has the value 1. In addition, an authorization check is performed for all data records. If no authorization exists for a data record, this data record is rejected (that is, it is not placed in the internal table). If data records are rejected because of missing authorization, the PNP-SW-AUTH-SKIPPED-RECORD global switch is set to 1. This switch is otherwise set to 0. The PNP-SW-IGNORELOCKEDRECORDS switch is also taken account of when the data records are read and controls whether locked data records are read or not.
    Normally, infotypes are read using the HR_READ_INFOTYPE function module. The RP_READ_INFOTYPE macro can improve performance when the data records have already been read by PNPCE and are in the internal buffer. PNPCE only read the data records that were requested by the report using the INFOTYPES statement. In addition, the buffer is deleted again at the latest after 100 processed personnel numbers. If however the report requests the data records using an INFOTYPES statement, it is not particularly meaningful to request the data records again for the same personnel number using the RP_READ_INFOTYPE macro. The buffer is only useful when the data records are called for a different personnel number if these personnel numbers belong to the block of the 100 current buffered personnel numbers. Always weigh up the advantages of this macro against the consequences of its use for performance
    Thanks
    SK

  • Hide Reporting Period in LDB PNPCE

    Hi Experts,
    Can someone please tell me how to hide/disable Reporting Period in LDB 'PNPCE'. My clients requirement is to use custom date fields instead of LDB's Reporting Period.
    Thanks
    Vasuki

    Hi,
              Using the reporting event AT SELECTION-SCREEN OUTPUT , we can do this by looping through the "screen" and making the screen period field "active = 0".
        LOOP AT SCREEN.
          IF screen-group1 = 'FF'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.

  • Regarding LDB pnpce

    hi experts,
    i m in need to create a report means i have to design the
    screen,in which i have to use LDB pnpce for HR,but if i select
    program type "module pool" in the report attributes  the filed
    LDB name is not coming means but when i select executable the LDB field is coming but when i select type module pool the it is not coming
    ....plz help me is there any way so that i can use ldb as well
    as module pool report type...............

    Hi
    you can call even LDB by using FM LDB_PROCESS. then you can attach the report to screen that you have designed.
    what you have to do is goto SE38---> Create a new report of type executable and don't select any LDB .
    2. Call teh function module LDB_PROCESS from the report and pass teh LDb name to this Fm
    [further Information|http://help.sap.com/saphelp_nw70/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm]
    Regards
    Pavan

Maybe you are looking for

  • Moving an iPhone to a new apple id

    We have been using two iPhones, one iPad, and one iMac on one Apple ID before iOS5, but now after upgrading to iOS5 and iCloud, the phones think they are siamese twins, and I need to separate them. How do I do that? We have another windows macine if

  • The log file which can be used to track the HTML preview of HFR Reports

    Hi, Could you please let me know the log file which can be used to track the HTML preview of HFR Reports? Thanks, Aparna

  • RH for Word conversions - version 5 to version 7

    Hi, We're considering an upgrade from RoboHelp 5.0.2 to RoboHelp 7. Has anyone out there converted an RH 5 for Word project to RoboHelp for Word in version 7? If you have, what issues did you encounter? Thanks, Jim

  • Photoshop Colors doesn't work..:(

    Hi,      I'm using Photoshop CS6 Extended version. I'm unable to use the colors. When I select any color, it defaults to the Grey for both foreground and the background. I have tried to use the brush as well as the font with not success. Please help!

  • Pdf browser too small?

    Hi, sorry if this is a dumb question (but that won't stop me from asking...) When I'm trying to browse a report either directly in BI Publisher, or from a section on an OBI EE dashboard, the pdf browser is REALLY small. If I enlarge the window, the p