Size of Logical Database!

How can I calculate the size of Logical Database!

As a rule of thumb take the size of the primary database. Unlike a physical standby a logical standby is not a physical copy of the primary database, so you may need to add more space. That depends on the applications you plan to run.
Werner

Similar Messages

  • Use SAP defined methods instead of Logical Database(LDB)

    Hi All,
    I gonethrough some documents related to new HR ABAP programing without using logical database.  we can replace the logical databased with SAP defined methods for all the infotypes.  Appreciate if anyone let me know how do this.
    Thanks in advance.
    Thanks,
    -suresh

    Yes.. we can use the Infotype reader class.. you can use the following sample code & go from there.. fyi I wrote this on a 47 system..
    *& Report  ZP_INF_CL                                                   *
    *&  read an infotype using ABAP Objects                                *
    report  zp_inf_cl line-size 1000.
    infotypes: 0001,0008.
    parameters: p_infty type infty,
                p_pernr type pernr_d.
    constants: c_a type tclas value 'A',
               c_true value 'X'.
    data: w_infotype_reader type ref to if_hrpa_read_infotype,
          t_inftab type hrpad_prelp_tab,
          w_missing_auth type boole_d,
          w_data_exists  type boole_d,
          rec_infty like line of t_inftab.
    * init infotype reader
    call method cl_hrpa_read_infotype=>get_instance
      importing
        infotype_reader = w_infotype_reader.
    call method w_infotype_reader->read
      exporting
        tclas         = c_a
        pernr         = p_pernr
        infty         = p_infty
        begda         = sy-datum
        endda         = sy-datum
        no_auth_check = c_true
      importing
        infotype_tab  = t_inftab
        data_exists   = w_data_exists
        missing_auth  = w_missing_auth.
    loop at t_inftab into rec_infty.
      call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
        exporting
          prelp = rec_infty
        importing
          pnnnn = p0001.
      append p0001.
    endloop.
    loop at p0001.
      write:/ p0001-orgeh.
    endloop.
    ~Suresh

  • Hr programming - logical database - macro

    Hi everyone !
    I use pnp logical database.
    Now how the program familiar the macro RP-PROVIDE-FROM-FIRST
    from table trmac ? ?
    i know that macro can be familiar from the program between lines:
    define .......
    end-of-definition.
    someone can explain to me ?

    Hi
    See this sample program for using the LDB PNP and the MAcros
    report zporgr0030
           line-size 193
           line-count 60(1)
           no standard page heading
           message-id zndc.
    Database Tables
    tables:    pernr,    " Logical PNP
               t001p,    " Personnel Subarea
               t005t,    " Country Descriptions
               t500p,    " Personnel Area
               t501,     " Employee Group
               t503k,    " Employee Subgroup
               csks,     " Cost Centers
               cskt,     " Cost Center Texts
               t513c,    " Job (Previous) Texts
               t513s,    " Job Titles
               t517t,    " Edn Est.Text
               t518b,    " Discipline Text
               t519t,    " Certificate Text
               t528t,    " Positions Texts
               t538t,    " Unit Text
               pa0003.   " Payroll Status
    infotypes:
               0000,   " Actions
               0001,   " Organizational Assignment
               0002,   " Personal Data
               0007,   " Planned working time
               0008,   " Payroll Data
               0022,   " Education Data
               0023,   " Previous Employer data
               0025,   " Performance Appraisal Data
               0041,   " Date Spcifications
               2001.   " Absences
    Declaration of Internal Tables
    Internal Table for Personal Data
    data: begin of pers_tab occurs 0,
            pernr like pa0001-pernr,      " Personal Number
            ename like pa0001-ename,      " Employee Name
            trfgr like pa0008-trfgr,      " Grade
            natio like pa0002-natio,      " Nationality
            hdate like pa0041-dat01,      " Hire Date
            gbdat like pa0002-gbdat,      " Birth Date
            plans like pa0001-plans,      " Position
            werks like pa0001-werks,      " Pers.Area
            kostl like pa0001-kostl,      " Cost Center
            ctext(40),                    " Cost Center Text
            ptext(25),                    " Position Text
            ntext(15),                    " Nation Text
            name1(23),                    " Location
          end of pers_tab.
    Internal Table for Payroll Data
    data: begin of pay_tab occurs 0,
            pernr like pa0008-pernr,      " Personal Number
            waers like pbwla-waers,       " Grade
            basic like pa0008-bet01,      " Basic Pay
            hra_allow like pa0008-bet01,  " Housing Allowance
            sup_allow like pa0008-bet01,  " Supp. Allowance
            soc_allow like pa0008-bet01,  " Social Allowance
            chl_allow like pa0008-bet01,  " Child Allowance
            fix_allow like pa0008-bet01,  " Fixed Overtime
            ra_allow  like pa0008-bet01,  " RA Allowance
            per_allow like pa0008-bet01,  " Perform. Allowance
            pen_allow like pa0008-bet01,  " Pension Allowance
            oth_allow like pa0008-bet01,  " Other Allowances
            tot_allow like pa0008-bet01,  " Total Allowances
          end of pay_tab.
    Internal Table for Educational Data
    data: begin of edn_tab occurs 0,
            pernr like pa0022-pernr,      " Personal Number
            ausbi like pa0022-ausbi,      " Discipline Name
            slart like pa0022-slart,      " Edn Establishment
            insti like pa0022-insti,      " Institute
            sland like pa0022-sland,      " Country
            slabs like pa0022-slabs,      " Certificate
            anzkl like pa0022-anzkl,      " Duration
            anzeh like pa0022-anzeh,      " Unit for Duration
            atext like t518b-atext,       " Discipline Text
            stext like t517t-stext,       " Edn Est.Text
            landx like t005t-landx,       " Country Text
            ctext like t519t-stext,       " Certificate Text
            etext like t538t-etext,       " Unit Text
          end of edn_tab.
    Internal Table for Previous Employment Data
    data: begin of pemp_tab occurs 0,
            pernr like pa0023-pernr,      " Personal Number
            arbgb like pa0023-arbgb,      " Previous Employer
            begda like pa0023-begda,      " Start Date
            endda like pa0023-endda,      " End Date
            taete like pa0023-taete,      " Last Position
            land1 like pa0023-land1,      " Country
            stltx like t513s-stltx,       " Position Text
            landx like t005t-landx,       " Country Text
          end of pemp_tab.
    Internal Table for Job History Data
    data: begin of job_tab occurs 0,
            pernr like pa0001-pernr,      " Personal Number
            begda like pa0001-begda,      " Promotion Date
            plans like pa0001-plans,      " Position
            stell like pa0001-stell,      " Job Key
            stltx like t513s-stltx,       " Job Text
            ptext like t528t-plstx,       " Position Text
          end of job_tab.
    Internal Table for Performance Appraisal Data
    data: begin of app_tab occurs 0,
            pernr like pa0001-pernr,       " Personal Number
            year(4) type     c,            " Current Year
            appr(35) type    c,            " C Y Appraisal
           year1(4) type    c,            " Last Year
           appr1(35) type   c,            " Last Year Appraisal
           year2(4) type    c,
           appr2(35) type   c,
           year3(4) type    c,
           appr3(35) type   c,
           year4(4) type    c,
           appr4(35) type   c,
          end of app_tab.
    Internal Table for Performance Appraisal Data
    data: begin of app1_tab occurs 0,
            year(4) type     c,            " Year
            appr(35) type    c,            " Appraisal
          end of app1_tab.
    Internal Table to get the Payroll Amounts
    data  wage_tab like pbwla occurs 0 with header line.
    Internal table for retreiving Employee Appraisals
    data  app_in_tab  like hrsobid occurs 0 with header line .
    data  app_out_tab like hrpe_profa  occurs 0 with header line .
    Declaration of Variables
    data : v_year(4)  type c,
           v_ayear(4) type c,
           v_cyear(4) type c,
           v_year1(4) type c,
           v_year2(4) type c,
           v_year3(4) type c,
           v_year4(4) type c,
           v_year5(4) type c,
           v_year6(4) type c,
           v_mon(2)   type c,
           v_date2  like sy-datum,
           v_date3  like sy-datum,
           v_date   like sy-datum,
           v_date1  like sy-datum.
    Declaration of Constants
    constants : c_x       type c value 'X',              " Sign
                c_pernr(8) type n value '00000000',      " Pernr
                c_p   like hrp1007-otype  value 'P',     " Object Type
                c_01  like hrp1001-plvar  value '01',    " Version
                c_val1(2) type c value '31',             " Date Type
                c_val2(2) type c value '12',             " Date Type
                c_val    like p0041-dar01 value '01',    " Date Type
                c_1      like pernr-persg value '1',     " Emp Group
                c_type   like hrp1001-otype  value 'S',  " Object Type
                c_date1  like sy-datum value '18000101', " Date
                c_date2  like sy-datum value '99991231', " Date
                c_lga01 like pa0008-lga01 value '0101',  " Wage Type
                c_lga02 like pa0008-lga01 value '0102',  " Wage Type
                c_lga03 like pa0008-lga01 value '0103',  " Wage Type
                c_lga04 like pa0008-lga01 value '0105',  " Wage Type
                c_lga05 like pa0008-lga01 value '0109',  " Wage Type
                c_lga06 like pa0008-lga01 value '0110',  " Wage Type
                c_lga07 like pa0008-lga01 value '0114',  " Wage Type
                c_lga08 like pa0008-lga01 value '0116',  " Wage Type
                c_lga09 like pa0008-lga01 value '0267',  " Wage Type
                c_kokrs  like cskt-kokrs value '1000'.   " Controlling Area
    Selection Screen
    selection-screen begin of block b1 with frame title text-003.
    selection-screen begin of line.
    selection-screen comment 1(33)   text-060.
    parameters: r_all radiobutton group rb1.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(33)   text-020.
    parameters: r_per radiobutton group rb1.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(33)   text-021.
    parameters: r_pay radiobutton group rb1.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(33)   text-022.
    parameters: r_edn radiobutton group rb1.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(33)   text-023.
    parameters: r_pemp radiobutton group rb1.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(33)   text-024.
    parameters: r_job radiobutton group rb1.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(33)   text-025.
    parameters: r_app radiobutton group rb1.
    selection-screen end of line.
    selection-screen end of block b1.
    At selection-screen
    at selection-screen.
    Validate the Selection Screen fields
      perform validate_screen.
    Start-of-Selection
    start-of-selection.
    Selection of Period
      perform get_period.
    Get PERNR from LDB
    get pernr.
      if pernr-persg eq c_1 or pernr-pernr ne c_pernr.
        if r_all eq c_x.
    Get the Personal data from PA0001,PA0002, PA0008, PA0041
          perform get_pers_data.
    Get the Payroll data from PA0008
          perform get_pay_data.
    Get the Education data from PA0022
          perform get_edn_data.
    Get the Previous Employment data from PA0023
          perform get_pemp_data.
    Get the Job History data
          perform get_job_data.
    Get the Performance Appraisal data
          perform get_app_data.
        elseif r_per eq c_x.
    Get the Personal data from PA0001,PA0002, PA0008, PA0041
          perform get_pers_data.
        elseif r_pay eq c_x.
    Get the Payroll data from PA0008
          perform get_pay_data.
        elseif r_edn eq c_x.
    Get the Education data from PA0022
          perform get_edn_data.
        elseif r_pemp eq c_x.
    Get the Previous Employment data from PA0023
          perform get_pemp_data.
        elseif r_job eq c_x.
    Get the Job History data
          perform get_job_data.
        elseif r_app eq c_x.
    Get the Performance Appraisal data
          perform get_app_data.
        endif.
      endif.
    Top-of-page
    top-of-page.
    Write the Report and Column Headings
      perform top_of_page.
    End-of-Page
    end-of-page.
      perform end_of_page.
    End-of-Selection
    end-of-selection.
    Display the Output Report.
      perform display_report.
    Form-Routines
    *&      Form  validate_screen
    Validation of selection Screen fields
    form validate_screen.
    Validation of Personnel Number
      clear pa0003.
      if not pnppernr[] is initial.
        select pernr
        from pa0003 up to 1 rows
          into pa0003-pernr
          where pernr in pnppernr.
        endselect.
        if sy-subrc <> 0.
          message e999 with 'Incorrect Personnel Number Entered'(001).
        endif.
      endif.
    Validation of Cost Center
      clear csks.
      if not pnpkostl[] is initial.
        select single kostl
          into csks-kostl
          from csks
          where kostl in pnpkostl.
        if sy-subrc <> 0.
          message e999 with 'Invalid Cost Center'(002).
        endif.
      endif.
    Validation of Personnel Area
      clear t500p.
      if not pnpwerks[] is initial.
        select persa
        from t500p up to 1 rows
          into t500p-persa
          where persa in pnpwerks.
        endselect.
        if sy-subrc <> 0.
          message e999 with 'Incorrect Personnel Area Entered'(004).
        endif.
      endif.
    Validation of Personnel Sub Area
      clear t001p.
      if not pnpbtrtl[] is initial.
        select btrtl
        from t001p up to 1 rows
          into t001p-btrtl
          where btrtl in pnpbtrtl.
        endselect.
        if sy-subrc <> 0.
          message e999 with 'Incorrect Personnel Sub Area Entered'(005).
        endif.
      endif.
    Validation of Employee Group
      clear t501.
      if not pnppersg[] is initial.
        select persg
        from t501 up to 1 rows
          into t501-persg
          where persg in pnppersg.
        endselect.
        if sy-subrc <> 0.
          message e999 with 'Incorrect Employee Group Entered'(006).
        endif.
      endif.
    Validation of Employee Sub Group
      clear t503k.
      if not pnppersk[] is initial.
        select persk
        from t503k up to 1 rows
          into t503k-persk
          where persk in pnppersk.
        endselect.
        if sy-subrc <> 0.
          message e999 with 'Incorrect Employee Sub Group Entered'(007).
        endif.
      endif.
    endform.                  "validate_screen
    *&      Form  get_period
    Get the Correct Period based on Selection screen selection
    form get_period.
      clear: v_year,v_mon, v_date, v_date1.
      v_year = sy-datum+0(4).
      v_mon  = sy-datum+4(2).
      if pnptimr1 = c_x.      " Current Date
        pnpbegda = sy-datum.
        pnpendda = sy-datum.
      elseif pnptimr2 = c_x.  " Current Month
        concatenate v_year v_mon c_val into v_date.
        concatenate v_year v_mon c_val1 into v_date1.
        pnpbegda = v_date.
        pnpendda = v_date1.
      elseif pnptimr3 = c_x.  " Current Year
        concatenate v_year c_val c_val into v_date.
        concatenate v_year c_val2 c_val1 into v_date1.
        pnpbegda = v_date.
        pnpendda = v_date1.
      elseif pnptimr4 = c_x.  " Upto Today
        pnpbegda = c_date1.
        pnpendda = sy-datum.
      elseif pnptimr5 = c_x.  " From Today
        pnpbegda = sy-datum.
        pnpendda = c_date2.
      else.
        if ( pnpbegda is initial and pnpendda is initial ).
          pnpbegda = c_date1.
          pnpendda = c_date2.
        elseif pnpbegda is initial and not pnpendda is initial.
          pnpbegda = c_date1.
          pnpendda = pnpendda.
        elseif not ( pnpbegda is initial and pnpendda is initial ).
          pnpbegda = pnpbegda.
          pnpendda = pnpendda.
        endif.
      endif.
    endform.              "get_period
    *&      Form  get_pers_data
    Get the Personal Data from PA0001,PA0002,PA0008, PA0041
    form get_pers_data.
    Get data from Respective Infotypes
      rp_provide_from_last p0001 space pnpbegda pnpendda.
      rp_provide_from_last p0002 space pnpbegda pnpendda.
      rp_provide_from_last p0008 space pnpbegda pnpendda.
      rp_provide_from_last p0041 space pnpbegda pnpendda.
      pers_tab-pernr    = p0001-pernr.
      pers_tab-ename    = p0001-ename.
      pers_tab-werks    = p0001-werks.
      pers_tab-plans    = p0001-plans.
      pers_tab-kostl    = p0001-kostl.
      pers_tab-gbdat    = p0002-gbdat.
      pers_tab-trfgr    = p0008-trfgr.
    Get the Engaged Date
      read table p0041 with key dar01 = c_val.
      if sy-subrc = 0.
        pers_tab-hdate = p0041-dat01.
      endif.
    Get the Cost Center Text
      clear cskt-ltext.
      select single ltext into cskt-ltext from cskt
              where spras = sy-langu and
                    kokrs = c_kokrs and
                    kostl = p0001-kostl.
      if sy-subrc = 0.
        pers_tab-ctext = cskt-ltext.
      endif.
    Get the Position Text
      clear t528t-plstx.
      select single plstx into t528t-plstx from t528t
              where plans = p0001-plans and
                    otype = c_type and
                    sprsl = sy-langu.
      if sy-subrc = 0.
        pers_tab-ptext = t528t-plstx.
      endif.
    Get the Nationality
      clear t005t-natio.
      select single natio into t005t-natio from t005t
              where spras = sy-langu and
                    land1 = p0002-natio.
      if sy-subrc = 0.
        pers_tab-ntext = t005t-natio.
      endif.
    Get the Location (Personal Area) Text
      clear t500p-name1.
      select single name1 into t500p-name1 from t500p
              where persa = p0001-werks.
      if sy-subrc = 0.
        pers_tab-name1 = t500p-name1.
      endif.
      append pers_tab.
      clear pers_tab.
      sort pers_tab by pernr.
    endform.          "get_pers_data
    *&      Form  get_pay_data
    Get the Payroll Data from Infotype 0008
    form get_pay_data.
    Get the Payroll data from Respective Infotypes
      rp_provide_from_last p0008 space pnpbegda pnpendda.
      pay_tab-pernr    = pernr-pernr.
      call function 'RP_FILL_WAGE_TYPE_TABLE_EXT'
        exporting
         appli                              = 'E'
         begda                              = p0008-begda
         endda                              = p0008-endda
         infty                              = '0008'
         objps                              = '  '
         tclas                              = 'A'
         pernr                              = pernr-pernr
         seqnr                              = '   '
         subty                              = '0   '
         dlspl                              = 'X'
         msgflg                             = ''
         nordct                             = ''
        tables
          pp0001                             = p0001
          pp0007                             = p0007
          pp0008                             = p0008
          ppbwla                             = wage_tab
      PP0230                             =
      PP0014                             =
      PP0015                             =
      PP0052                             =
    EXCEPTIONS
      ERROR_AT_INDIRECT_EVALUATION       = 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.
      loop at wage_tab.
        pay_tab-waers = wage_tab-waers.
        case wage_tab-lgart.
          when c_lga01.
            pay_tab-basic = wage_tab-betrg.
          when c_lga02.
            pay_tab-sup_allow = wage_tab-betrg.
          when c_lga03.
            pay_tab-hra_allow = wage_tab-betrg.
          when c_lga04.
            pay_tab-chl_allow = wage_tab-betrg.
          when c_lga05.
            pay_tab-soc_allow = wage_tab-betrg.
          when c_lga06.
            pay_tab-fix_allow = wage_tab-betrg.
          when c_lga07.
            pay_tab-ra_allow = wage_tab-betrg.
          when c_lga08.
            pay_tab-per_allow = wage_tab-betrg.
          when c_lga09.
            pay_tab-pen_allow = wage_tab-betrg.
          when others.
            pay_tab-oth_allow = pay_tab-oth_allow + wage_tab-betrg.
        endcase.
        pay_tab-tot_allow = pay_tab-basic + pay_tab-sup_allow +
                            pay_tab-hra_allow + pay_tab-chl_allow +
                            pay_tab-soc_allow + pay_tab-fix_allow +
                            pay_tab-ra_allow + pay_tab-per_allow +
                            pay_tab-oth_allow - pay_tab-pen_allow.
      endloop.
      append pay_tab.
      clear  pay_tab.
    endform.          "get_pay_data
    *&      Form  get_edn_data
    Get the Education Data from Infotype 0022
    form get_edn_data.
    Get the Education data from Respective Infotypes
      loop at p0022 where pernr = pernr-pernr.
        edn_tab-pernr    = pernr-pernr.
        edn_tab-ausbi    = p0022-ausbi.
        edn_tab-slart    = p0022-slart.
        edn_tab-insti    = p0022-insti.
        edn_tab-sland    = p0022-sland.
        edn_tab-slabs    = p0022-slabs.
        edn_tab-anzkl    = p0022-anzkl.
        edn_tab-anzeh    = p0022-anzeh.
    Get the Discipline Text
        clear t518b-atext.
        select single atext into t518b-atext from t518b
                where langu = sy-langu and
                      ausbi = p0022-ausbi.
        if sy-subrc = 0.
          edn_tab-atext = t518b-atext.
        endif.
    Get the Edn Establishment Text
        clear t517t-stext.
        select single stext into t517t-stext from t517t
                where slart = p0022-slart and
                      sprsl = sy-langu.
        if sy-subrc = 0.
          edn_tab-stext = t517t-stext.
        endif.
    Get the Certificate Text
        clear t519t-stext.
        select single stext into t519t-stext from t519t
                where slabs = p0022-slabs and
                      sprsl = sy-langu.
        if sy-subrc = 0.
          edn_tab-ctext = t519t-stext.
        endif.
    Get the Unit Text
        clear t538t-etext.
        select single etext into t538t-etext from t538t
                where zeinh = p0022-anzeh and
                      sprsl = sy-langu.
        if sy-subrc = 0.
          edn_tab-etext = t538t-etext.
        endif.
    Get the Country Description
        clear t005t-landx.
        select single landx into t005t-landx from t005t
                where spras = sy-langu and
                      land1 = p0022-sland.
        if sy-subrc = 0.
          edn_tab-landx = t005t-landx.
        endif.
        append edn_tab.
        clear edn_tab.
      endloop.
    endform.              "edn_data
    *&      Form  get_pemp_data
    Get the Previous Employment Data from Infotype 0023
    form get_pemp_data.
    Get the Previous Employment data from Respective Infotypes
      loop at p0023 where pernr = pernr-pernr.
        pemp_tab-pernr    = pernr-pernr.
        pemp_tab-arbgb    = p0023-arbgb.
        pemp_tab-begda    = p0023-begda.
        pemp_tab-endda    = p0023-endda.
        pemp_tab-taete    = p0023-taete.
        pemp_tab-land1    = p0023-land1.
    Get the Last Job Text
        clear t513c-ltext.
        select single ltext into t513c-ltext from t513c
                where taete = pemp_tab-taete and
                      spras = sy-langu.
        if sy-subrc = 0.
          pemp_tab-stltx = t513c-ltext.
        endif.
    Get the Country Description
        clear t005t-landx.
        select single landx into t005t-landx from t005t
                where spras = sy-langu and
                      land1 = pemp_tab-land1.
        if sy-subrc = 0.
          pemp_tab-landx = t005t-landx.
        endif.
        append pemp_tab.
        clear pemp_tab.
      endloop.
      sort pemp_tab by pernr.
    endform.              "pemp_data
    *&      Form  get_job_data
    Get the Job History Data from Infotype
    form get_job_data.
    Get the Job History data from Respective Infotypes
      loop at p0001 where pernr = pernr-pernr.
        job_tab-pernr    = pernr-pernr.
        job_tab-begda    = p0001-begda.
        job_tab-plans    = p0001-plans.
        job_tab-stell    = p0001-stell.
    Get the Last Job Text
        clear t513s-stltx.
        select single stltx into t513s-stltx from t513s
                where stell = job_tab-stell and
                      sprsl = sy-langu.
        if sy-subrc = 0.
          job_tab-stltx = t513s-stltx.
        endif.
    Get the Position Text
        clear t528t-plstx.
        select single plstx into t528t-plstx from t528t
                where plans = job_tab-plans and
                      otype = c_type and
                      sprsl = sy-langu.
        if sy-subrc = 0.
          job_tab-ptext = t528t-plstx.
        endif.
        append job_tab.
        clear  job_tab.
      endloop.
      sort job_tab by pernr.
    endform.          "get_job_data
    *&      Form  get_app_data
    Get the Performance Appraisal Data from Infotype
    form get_app_data.
      clear: v_cyear, v_year1, v_year2, v_year3, v_year4,
             v_year5, v_year6, v_ayear, v_date2, v_date3.
      v_cyear = sy-datum+0(4) - 1.
      v_year1 = v_cyear - 1.
      v_year2 = v_cyear - 2.
      v_year3 = v_cyear - 3.
      v_year4 = v_cyear - 4.
      v_year5 = v_cyear - 5.
      v_year6 = v_cyear - 6.
      concatenate v_cyear c_date2+4(4) into v_date2.
      concatenate v_year6 c_date1+4(4) into v_date3.
      clear: app_in_tab, app_out_tab.
      refresh: app_in_tab, app_out_tab.
      app_in_tab-plvar = c_01.
      app_in_tab-otype = c_p.
      app_in_tab-sobid = pernr-pernr.
      append app_in_tab.
    Get Appraisals data from Respective Infotypes
      call function 'RHPA_APPRAISEES_APP_READ'
       exporting
         begda               =   v_date3
         endda               =   v_date2
      WITH_STEXT          = 'X'
      WITH_ADD_INFO       = 'X'
        tables
          appraisees          = app_in_tab
          appraisals          = app_out_tab
       exceptions
         no_authority        = 1
         undefined           = 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.
      sort app_out_tab  by sobid vbegd vendd appraisal_adate descending .
      delete adjacent duplicates from app_out_tab
                comparing  sobid vbegd vendd.
      loop at app_out_tab where appraisal_histo = 'X' .
        condense app_out_tab-appraisal_result.
        app1_tab-year = app_out_tab-vendd+0(4).
        app1_tab-appr = app_out_tab-appraisal_result_text.
        append app1_tab.
        clear app1_tab.
      endloop.
      sort app1_tab by year descending.
      loop at app1_tab.
        app_tab-pernr    = pernr-pernr.
        move-corresponding  app1_tab to app_tab.
        append app_tab.
        clear: app1_tab, app_tab.
      endloop.
      refresh app1_tab.
      sort app_tab by pernr.
      delete app_tab where year = ' ' and appr = ' ' .
    endform.          "get_app_data
    *&      Form  top_of_page
    Write the Report and Column Headings
    form top_of_page.
      skip.
      format color col_heading on.
      if r_all eq c_x.
        write: /1(193) 'NATIONAL DRILLING COMPANY'(009) centered,
               /1(193) 'Employee Details Report'(066) centered.
      elseif r_per eq c_x.
        write: /1(193) 'NATIONAL DRILLING COMPANY'(009) centered,
               /1(193) 'Employee Details - Personal Data'(010)
                                                centered.
      elseif r_pay eq c_x.
        write: /1(172) 'NATIONAL DRILLING COMPANY'(009) centered,
               /1(172) 'Employee Details - Payroll Data'(027)
                                                centered.
      elseif r_edn eq c_x.
        write: /1(172) 'NATIONAL DRILLING COMPANY'(009) centered,
               /1(172) 'Employee Details - Education Data'(028)
                                                centered.
      elseif r_pemp eq c_x.
        write: /1(97) 'NATIONAL DRILLING COMPANY'(009) centered,
              /1(97) 'Employee Details - Previous Employment Data'(029)
                                                centered.
      elseif r_job eq c_x.
        write: /1(75) 'NATIONAL DRILLING COMPANY'(009) centered,
              /1(75) 'Employee Details - Job History Data'(030)
                                                centered.
      elseif r_app eq c_x.
        write: /1(192) 'NATIONAL DRILLING COMPANY'(009) centered,
              /1(192) 'Employee Details - Performance Appraisal Data'(031)
                                                centered.
      endif.
      format color off.
      if pnptimr1 = c_x.      " Current Date
        write: /2 'Period From     :'(008), sy-datum,
                         'To:'(019), sy-datum.
      elseif pnptimr2 = c_x.  " Current Month
        write: /2 'Period From     :'(008), v_date, 'To:'(019), v_date1.
      elseif pnptimr3 = c_x.  " Current Year
        write: /2 'Period From     :'(008), v_date, 'To:'(019), v_date1.
      elseif pnptimr4 = c_x.  " Upto Today
        write: /2 'Period From     :'(008), c_date1, 'To:'(019), sy-datum.
      elseif pnptimr5 = c_x.  " From Today
        write: /2 'Period From     :'(008), sy-datum, 'To:'(019), c_date2.
      else.
        if ( pnpbegda is initial and pnpendda is initial ).
          write: /2 'Period From     :'(008), c_date1, 'To:'(019), c_date2.
        elseif pnpbegda is initial and not pnpendda is initial.
          write: /2 'Period From     :'(008), c_date1, 'To:'(019), pnpendda.
        elseif not ( pnpbegda is initial and pnpendda is initial ).
          write: /2 'Period From     :'(008), pnpbegda,
                   'To:'(019), pnpendda.
        endif.
      endif.
      if not ( r_pemp eq c_x or r_job eq c_x ).
        write: 140 'Report Run Date:'(073), sy-datum.
        if not pnpkostl[] is initial.
          if pnpkostl-high is initial.
            write: /2 'Cost Center     :'(074), pnpkostl-low,
                  125 'Time           :'(075), sy-uzeit.
          else.
            write: /2 'Cost Center From:'(076), pnpkostl-low+7(3),
                                      'To:'(019), pnpkostl-high,
                  140 'Time           :'(075), sy-uzeit.
          endif.
        else.
          write: /140  'Time           :'(075), sy-uzeit.
        endif.
        if not pnppernr[] is initial.
          if pnppernr-high is initial.
            write: /2 'Personal Number :'(077), pnppernr-low,
                   140 'User           :'(078), sy-uname.
          else.
            write: /2 'Personal No.From:'(079),  pnppernr-low,
                                      'To:'(019), pnppernr-high,
                   140 'User           :'(078), sy-uname.
          endif.
        else.
          write: /140 'User           :'(078), sy-uname.
        endif.
        write: /140 'Page No        :'(080), sy-pagno.
      else.
        write: 48 'Report Run Date:'(073), sy-datum.
        if not pnpkostl[] is initial.
          if pnpkostl-high is initial.
            write: /2 'Cost Center     :'(074), pnpkostl-low,
                  48 'Time           :'(075), sy-uzeit.
          else.
            write: /2 'Cost Center From:'(076), pnpkostl-low+7(3),
                                      'To:'(019), pnpkostl-high,
                  48 'Time           :'(075), sy-uzeit.
          endif.
        else.
          write: /48  'Time           :'(075), sy-uzeit.
        endif.
        if not pnppernr[] is initial.
          if pnppernr-high is initial.
            write: /2 'Personal Number :'(077), pnppernr-low,
                   48 'User           :'(078), sy-uname.
          else.
            write: /2 'Personal No.From:'(079),  pnppernr-low,
                                      'To:'(019), pnppernr-high,
                   48 'User           :'(078), sy-uname.
          endif.
        else.
          write: /48 'User           :'(078), sy-uname.
        endif.
        write: /48 'Page No        :'(080), sy-pagno.
      endif.
      skip.
      if r_per eq c_x.
        write /1(193) sy-uline.
        format color col_heading on.
        write:/1 sy-vline,  2(10) 'Employee #'(011),
              12 sy-vline, 13(40) 'Name'(012) centered,
              53 sy-vline, 54(8)  'Grade'(013) centered,
              62 sy-vline, 63(15) 'Nationality'(017) centered,
              78 sy-vline, 79(10) 'Eng.Date'(014) centered,
              89 sy-vline, 90(10) 'Birth Date'(016) centered,
             100 sy-vline,101(25) 'Location'(026) centered,
             126 sy-vline,127(25) 'Position'(015) centered,
             152 sy-vline,153(40) 'Division'(018) centered,
             193 sy-vline.
        format color off.
        write /1(193) sy-uline.
      elseif r_pay eq c_x.
        write /1(188) sy-uline.
        format color col_heading on.
        write:/1 sy-vline,  2(10) 'Employee #'(011),
              12 sy-vline, 13(15) 'Basic'(033) centered,
              28 sy-vline, 29(15) 'Housing Allow.'(034) centered,
              44 sy-vline, 45(15) 'Sup.Allow.'(035) centered,
              60 sy-vline, 61(15) 'Social Allow.'(036) centered,
              76 sy-vline, 77(15) 'Child Allow.'(037) centered,
              92 sy-vline, 93(15) 'Fixed Overtime'(038) centered,
             108 sy-vline,109(15) 'R.A.Allow.'(041) centered,
             124 sy-vline,125(15) 'Perform.Allow.'(039) centered,
             140 sy-vline,141(15) 'Pension.Allow.'(059) centered,
             156 sy-vline,157(15) 'Others'(040) centered,
             172 sy-vline,173(15) 'Total'(042) centered,
             188 sy-vline.
        format color off.
        write /1(188) sy-uline.
      elseif r_edn eq c_x.
        write /1(172) sy-uline.
        format color col_heading on.
        write:/1 sy-vline,  2(10) 'Employee #'(011),
              12 sy-vline, 13(25) 'Discipline'(043) centered,
              38 sy-vline, 39(20) 'Edu.Establishment'(044) centered,
              59 sy-vline, 60(45) 'Institute'(045) centered,
             105 sy-vline,106(15) 'Country'(046) centered,
             121 sy-vline,122(30) 'Certificate'(047) centered,
             152 sy-vline,153(19) 'Duration of Course'(048) centered,
             172 sy-vline.
        format color off.
        write /1(172) sy-uline.
      elseif r_pemp eq c_x.
        write /1(97) sy-uline.
        format color col_heading on.
        write:/1 sy-vline, 12 sy-vline,
              33 sy-vline, 34(21) 'Employment Period'(055) centered,
              55 sy-vline, 81 sy-vline,
              97 sy-vline.
        write:/1 sy-vline,  2(10) 'Employee #'(011),
              12 sy-vline, 13(20) 'Employer'(049) centered,
              33 sy-vline, 34(10) 'From'(050) centered,
              44 sy-vline, 45(10) 'To'(051) centered,
              55 sy-vline, 56(25) 'Last Position'(052) centered,
              81 sy-vline, 82(15) 'Country'(053) centered,
              97 sy-vline.
        format color off.
        write /1(97) sy-uline.
      elseif r_job eq c_x.
        write /1(75) sy-uline.
        format color col_heading on.
        write:/1 sy-vline,
              12 sy-vline,13(10) 'Date of'(054) centered,
              23 sy-vline,49 sy-vline,
              75 sy-vline.
        write:/1 sy-vline,2(10)  'Employee #'(011),
              12 sy-vline,13(10) 'Upgrading/'(058) centered,
              23 sy-vline,24(25) 'Position'(015) centered,
              49 sy-vline,50(25) 'Job'(056) centered,
              75 sy-vline.
        write:/1 sy-vline, 12 sy-vline,
              13(10) 'Promotion'(057) centered,
              23 sy-vline, 49 sy-vline,
              75 sy-vline.
        format color off.
        write /1(75) sy-uline.
      elseif r_app eq c_x.
        format color col_heading on.
         write: /1 sy-vline,2(56) sy-uline, 58 sy-vline,
                /1 sy-vline, 2(56) text-025 centered color 3, 58 sy-vline.
         write /1(58) sy-uline.
         format color col_heading on.
         write:/1 sy-vline,  2(10) 'Employee #'(011),
               12 sy-vline, 13(4)  'Year'(067),
               17 sy-vline, 18(40) 'Appraisal Text'(068) centered,
               58 sy-vline.
        format color off.
        write /1(58) sy-uline.
      endif.
    endform.               "top_of_page
    *&      Form  end_of_page
    Write the Page footers
    form end_of_page.
      if r_per eq c_x.
        write : /(193) sy-uline.
      elseif r_pay eq c_x.
        write : /(188) sy-uline.
      elseif r_edn eq c_x.
        write : /(172) sy-uline.
      elseif r_pemp eq c_x.
        write /1(97) sy-uline.
      elseif r_job eq c_x.
        write /1(75) sy-uline.
      elseif r_app eq c_x.
        write /1(217) sy-uline.
      endif.
    endform.               "end_of_page
    *&      Form  Display_report
    Write the Report Output
    form display_report.
      if r_all eq c_x.
        if pers_tab[] is initial.
          message i999 with
           'No Personal Data found'(061).
        else.
          write: /1 sy-vline,2(51) sy-uline, 53 sy-vline,
                 /1 sy-vline, 2(50) text-020 centered color 3, 53 sy-vline.
          write /1(193) sy-uline.
          format color col_heading on.
          write:/1 sy-vline,  2(10) 'Employee #'(011),
                12 sy-vline, 13(40) 'Name'(012) centered,
                53 sy-vline, 54(8)  'Grade'(013) centered,
                62 sy-vline, 63(15) 'Nationality'(017) centered,
                78 sy-vline, 79(10) 'Eng.Date'(014) centered,
                89 sy-vline, 90(10) 'Birth Date'(016) centered,
               100 sy-vline,101(25) 'Location'(026) centered,
               126 sy-vline,127(25) 'Position'(015) centered,
               152 sy-vline,153(40) 'Division'(018) centered,
               193 sy-vline.
          format color off.
          write /1(193) sy-uline.
          sort pers_tab by pernr.
          loop at pers_tab.
            format color col_normal.
            write:/1 sy-vline,  2(10) pers_tab-pernr,
                  12 sy-vline, 13(40) pers_tab-ename,
                  53 sy-vline, 56(6)  pers_tab-trfgr,
                  62 sy-vline, 63(15) pers_tab-ntext,
                  78 sy-vline, 79(10) pers_tab-hdate,
                  89 sy-vline, 90(10) pers_tab-gbdat,
                 100 sy-vline,101(25) pers_tab-name1,
                 126 sy-vline,127(25) pers_tab-ptext,
                 152 sy-vline,153(40) pers_tab-ctext,
                 193 sy-vline.
          endloop.
          write /1(193) sy-uline.
        endif.
        skip 3.
        if pay_tab[] is initial.
          message i999 with
           'No Standard Pay Data found'(062).
        else.
          write: /1 sy-vline,2(42) sy-uline, 44 sy-vline,
                 /1 sy-vline, 2(42) text-021 centered color 3, 44 sy-vline.
          format color col_heading on.
          write /1(188) sy-uline.
          write:/1 sy-vline,  2(10) 'Employee #'(011),
                12 sy-vline, 13(15) 'Basic'(033) centered,
                28 sy-vline, 29(15) 'Housing Allow.'(034) centered,
                44 sy-vline, 45(15) 'Sup.Allow.'(035) centered,
                60 sy-vline, 61(15) 'Social Allow.'(036) centered,
                76 sy-vline, 77(15) 'Child Allow.'(037) centered,
                92 sy-vline, 93(15) 'Fixed Overtime'(038) centered,
               108 sy-vline,109(15) 'R.A.Allow.'(041) centered,
               124 sy-vline,125(15) 'Perform.Allow.'(039) centered,
               140 sy-vline,141(15) 'Pension.Allow.'(059) centered,
               156 sy-vline,157(15) 'Others'(040) centered,
               172 sy-vline,173(15) 'Total'(042) centered,
               188 sy-vline.
          format color off.
          write /1(188) sy-uline.
          sort pay_tab by pernr.
          loop at pay_tab.
            format color col_normal.
            write:/1 sy-vline,  2(10) pay_tab-pernr,
                  12 sy-vline,
                  13(15) pay_tab-basic currency pay_tab-waers no-zero,
                  28 sy-vline,
                  29(15) pay_tab-hra_allow currency pay_tab-waers no-zero,
                  44 sy-vline,
                  45(15) pay_tab-sup_allow currency pay_tab-waers no-zero,
                  60 sy-vline,
                  61(15) pay_tab-soc_allow currency pay_tab-waers no-zero,
                  76 sy-vline,
                  77(15) pay_tab-chl_allow currency pay_tab-waers no-zero,
                  92 sy-vline,
                  93(15) pay_tab-fix_allow currency pay_tab-waers no-zero,
                 108 sy-vline,
                 109(15) pay_tab-ra_allow currency pay_tab-waers no-zero,
                 124 sy-vline,
                 125(15) pay_tab-per_allow currency pay_tab-waers no-zero,
                 140 sy-vline.
            pay_tab-pen_allow = pay_tab-pen_allow * -1.
            write: 141(15) pay_tab-pen_allow currency pay_tab-waers no-zero,
                   156 sy-vline,
                   157(15) pay_tab-oth_allow currency pay_tab-waers no-zero,
                   172 sy-vline,
                   173(15) pay_tab-tot_allow currency pay_tab-waers no-zero,
                   188 sy-vline.
          endloop.
          write /1(188) sy-uline.
        endif.
        skip 3.
        if edn_tab[] is in

  • Logical Database of SAP Example Program

    Hi all,
    I need an example ABAP program using standard Logical Database ( LDB ) .
    Help me.
    Regards,
    Peachi.

    Hi,
    Some links to refer..
    /people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/893908#
    A sample prog with LDB PNP
    *& Report ZH_REPT_PAYMENT *
    report zh_rept_payment line-size 80 no standard page
    heading.
    tables: pernr, " Standard Selections for HR Master Data Reporting
    pcl1, " HR Cluster 1
    pcl2, " HR Cluster 2
    pa0009,
    PA9001,
    PA9006,
    pa0002,
    pc260 , " Cluster Directory for Payroll Results
    bnka .
    Infotypes
    infotypes: 0001. " Organizational Assignment
    Declaration of Internal Tables
    data : bnka1 like bnka occurs 0 with header line .
    data: begin of t_int_rep occurs 100,
    bankl like pc209-bankl, " Bank Number
    zlsch like pc209-zlsch, " Payment method
    pernr like pernr-pernr, " Employee Number
    ename like pernr-ename, " Employee Name
    bankn like pc209-bankn, " Bank Account Number
    betrg like pc209-betrg, " Amount to be transfered
    zweck like pa0009-zweck, " Purpose
    end of t_int_rep.
    data: begin of int_rep occurs 100,
    bankl like pc209-bankl, " Bank Number
    zlsch like pc209-zlsch, " Payment method
    pernr like pernr-pernr, " Employee Number
    ename like pernr-ename, " Employee Name
    bankn like pc209-bankn, " Bank Account Number
    betrg like pc209-betrg, " Amount to be transfered
    zweck like pa0009-zweck, " Purpose
    begda like pa0009-begda, "Begin date
    end of int_rep.
    Declaration of Data Variables
    data: ws_betrg like pc209-betrg, " BT Amount
    w_val like spell occurs 0 with header line,
    int_rep1(6), " TYPE I, " Employee Number
    cnt type i value 0, " Counter
    calcmolga like t500l-molga value '40', " Country Grouping
    v_id(15),
    calc_currency like t001-waers value 'INR'. " Currency
    data : ctr type i,
    dt_merge like pa0009-begda.
    data: ws_totemp(6) type c,
    ws_totamt(20) type c,
    r_mth(9) type c,
    ws_fpbeg(6) type c,
    ws_fpend(6) type c,
    ws_mthyr(6) type c,
    ws_mthyr_r(14) type c,
    r_mth_t(3) type c,
    ws_amt(8) type c,
    ws_bankl(14) type c,
    ws_date(6) type c,
    amount_word(500),
    total_page type i,
    pages type i,
    remain type i.
    data begin of i_spell.
    include structure spell .
    data end of i_spell .
    data : c_molga type t500l-molga value '40',
    c_banks type bnka-banks value 'IN'.
    Standard Includes
    include rpc2cd09. "Cluster CD data definition
    include pc2rxin0.
    include rpc2rx09.
    include rpppxd00. " Data Definition buffer PCL1/PCL2
    include rpppxd10. " Common Part buffer PCL1/PCL2
    include rpppxm00. " Buffer Handling RoutinePCL1/PCL2
    include zrpc2rox2. " Data Definition POCLSTERS (not J,K,U)
    Selection Screen
    selection-screen begin of block b1 with frame title text-001.
    parameter: pa_mth(2) type c default sy-datum+4(2) obligatory,
    pa_year(4) type c default sy-datum(4) obligatory,
    p_bankl like pc209-bankl, " Bank Number
    p_zlsch like pc209-zlsch. " Payment method
    selection-screen end of block b1.
    save_calc_currency = calc_currency.
    count_top = 0.
    get_pernr_flag = 0.
    Top-Of-Page
    top-of-page.
    perform convert_month using pa_mth(2) r_mth.
    ws_mthyr_r = r_mth.
    concatenate ws_mthyr_r pa_year into ws_mthyr_r separated by space.
    SKIP 5.
    skip 1.
    skip 4.
    if int_rep-bankl eq ' '.
    if int_rep-zlsch eq 'C' or int_rep-zlsch eq 'E' or
    int_rep-zlsch eq ' '.
    write: /1(85) 'CHEQUE PAYMENT STATEMENT'(047) centered.
    elseif int_rep-zlsch eq 'L'.
    write: /1(85) 'DEMAND DRAFT STATEMENT'(047) centered.
    endif.
    else.
    write: /1(85) 'BANK TRANSFER STATEMENT'(002) centered.
    endif.
    skip.
    write: /34 ws_mthyr_r,
    62 'Page :'(008),69(2) sy-pagno intensified off,
    ' Of ',78(2) pages intensified off.
    clear pages.
    read table bnka1 with key bankl = int_rep-bankl .
    if sy-subrc = 0.
    if int_rep-zlsch eq 'T'.
    write:/03(10) 'Bank Name : ', bnka1-banka.
    write:/03(10) 'Branch : ', bnka1-brnch.
    write:/03(10) 'Address : ', bnka1-stras.
    endif.
    endif.
    skip.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 2(5) 'Sl.No'(002),
    7 sy-vline, 8(8) 'Emp.No.'(003),
    16 sy-vline,17(35) 'Employee Name'(004).
    *--added for Demand Draft
    if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
    write : 47 sy-vline, 48(15) 'Payable at'(005).
    else.
    write : 47 sy-vline,48(15) 'Account No.'(005).
    endif.
    write: 63 sy-vline,64(16) 'Amount'(006),
    80 sy-vline.
    write:/1(80) sy-uline.
    end-of-page.
    write:/1(80) sy-uline.
    write:/2 'Printed on ', sy-datum.
    Start-of-selection.
    start-of-selection.
    *perform h_headr.
    ctr = 0.
    set margin 5.
    call function 'RP_GET_CURRENCY'
    exporting
    molga = calcmolga
    importing
    waers = calc_currency
    exceptions
    others.
    if sy-subrc ne 0.
    calc_currency = 'DEM'.
    calc_currency = save_calc_currency.
    endif.
    get pernr.
    cd-key-pernr = pernr-pernr.
    perform import_cluster.
    get_pernr_flag = 1.
    check : ocd-version-molga eq calcmolga.
    The table 'tabpernr' is filled with the personnel numbers
    and is used after selection is finished.
    move-corresponding pernr to tabpernr.
    append tabpernr.
    The table 'tab_rgdir' is filled
    loop at rgdir.
    rx-key-pernr = pernr-pernr.
    unpack rgdir-seqnr to rx-key-seqno.
    perform int_tab. "fill tab_rgdir
    perform import_bt.
    perform validate.
    endloop.
    End of Selection
    end-of-selection.
    *perform h_headr.
    perform convert_date_a using pa_mth r_mth_t.
    sort int_rep by bankl zlsch pernr betrg descending.
    delete adjacent duplicates from int_rep
    comparing bankl zlsch pernr .
    sort int_rep by bankl zlsch bankn . "PERNR.
    loop at int_rep.
    at new bankl.
    select single * into bnka1 from bnka
    where banks = c_banks and
    bankl = int_rep-bankl .
    append bnka1.
    clear bnka1.
    endat.
    endloop.
    for Demand Draft - purpose added
    loop at int_rep.
    concatenate pa_year(4) pa_mth(2) '01' into dt_merge.
    select single * "zweck into int_rep-zweck
    from pa0009 where
    pernr = int_rep-pernr and
    bankl = int_rep-bankl and
    zlsch = int_rep-zlsch
    and begda <= dt_merge and
    endda >= dt_merge .
    if sy-subrc = 0.
    int_rep-zweck = pa0009-zweck.
    modify int_rep.
    endif.
    endloop.
    *-for DD and Chq sorted by PAyable at and EMPNO wise
    if p_zlsch = 'T' .
    sort int_rep by bankl zlsch bankn . "PERNR.
    else. "added for "payable at" for DD/Chq
    else.
    sort int_rep by zweck pernr . "PERNR.
    endif.
    *delete adjacent duplicates from int_rep.
    t_int_rep] = int_rep[.
    loop at int_rep.
    *-for page of page no.
    total_page = 0.
    loop at t_int_rep where bankl = int_rep-bankl
    and zlsch = int_rep-zlsch.
    total_page = total_page + 1.
    endloop.
    pages = total_page div 25.
    remain = total_page mod 25.
    comment bcoz its adding one extra page no.
    done as on 29/11/2004
    if remain > 0.
    pages = pages + 1.
    endif.
    **-end
    at new bankl.
    ctr = 0 .
    new-page.
    endat.
    at new zlsch.
    ctr = 0 .
    new-page.
    endat.
    clear v_id.
    select single natio
    into pa0002-natio
    from pa0002
    where pernr eq int_rep-pernr.
    *-testing......for soma
    if ctr > 24.
    ctr = 0 .
    write:/1(80) sy-uline.
    new-page .
    endif.
    ctr = ctr + 1 .
    cnt = cnt + 1.
    pack int_rep-pernr to int_rep1.
    write:/1 sy-vline, 2(3) cnt intensified off,
    7 sy-vline, 9(6) int_rep1 intensified off,
    16 sy-vline,17(35) int_rep-ename intensified off .
    if ( int_rep-zlsch = 'l' or int_rep-zlsch = 'L' ).
    write : 47 sy-vline,48(15) int_rep-zweck intensified off.
    else.
    write:
    47 sy-vline,48(15) int_rep-bankn intensified off .
    endif.
    write: 63 sy-vline,64(16) int_rep-betrg
    intensified off currency 'INR',
    80 sy-vline.
    ws_betrg = ws_betrg + int_rep-betrg.
    *-testing......for soma
    skip.
    write :
    /1 sy-vline, 7 sy-vline ,16 sy-vline ,47 sy-vline,63 sy-vline,80
    sy-vline .
    *-end testing......for soma
    at end of zlsch.
    if int_rep-bankl = ' '.
    call function 'HR_IN_CHG_INR_WRDS'
    exporting
    amt_in_num = ws_betrg
    importing
    amt_in_words = amount_word
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    w_val-word = amount_word.
    concatenate 'INR.' w_val-word into w_val-word
    separated by space.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 7 'Total transfer:'(009),
    64(16) ws_betrg intensified off currency 'INR',
    80 sy-vline.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
    80 sy-vline.
    write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
    80 sy-vline.
    write:/1(80) sy-uline.
    clear: ws_betrg,cnt.
    skip 2.
    write: /2 'Prepared by :'(010), '_______________'(013),
    45 'Checked by :'(011),'_______________'(013).
    skip 2.
    write: /2 'Printed On ', sy-datum,
    45 'Approved by :'(012),'_______________'(013).
    clear sy-pagno.
    endif.
    endat.
    at end of bankl.
    if int_rep-bankl ' '.
    call function 'HR_IN_CHG_INR_WRDS'
    exporting
    amt_in_num = ws_betrg
    importing
    amt_in_words = amount_word
    EXCEPTIONS
    DATA_TYPE_MISMATCH = 1
    OTHERS = 2
    w_val-word = amount_word.
    concatenate 'INR.' w_val-word into w_val-word
    separated by space.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 7 'Total transfer:'(009),
    64(16) ws_betrg intensified off currency 'INR',
    80 sy-vline.
    write:/1(80) sy-uline.
    write: /1 sy-vline, 3 w_val-word+0(76) intensified off,
    80 sy-vline.
    write :/1 sy-vline, 10 w_val-word+76(70) intensified off,
    80 sy-vline.
    write:/1(80) sy-uline.
    clear: ws_betrg,cnt.
    skip 2.
    write: /2 'Prepared by :'(010), '_______________'(013),
    45 'Checked by :'(011),'_______________'(013).
    skip 2.
    write: /2 'Printed on ', sy-datum,
    45 'Approved by :'(012),'_______________'(013).
    clear sy-pagno.
    NEW-PAGE.
    endif.
    endat.
    endloop.
    End of Page
    end-of-page.
    write: /2 'Prepared by :'(010), '_______________',
    45 'Checked by :'(011),'_______________'.
    *& Form IMPORT_CLUSTER
    Importing Data from Cluster *
    form import_cluster.
    sy-subrc = 0.
    rp-imp-c2-cd.
    if sy-subrc eq 0.
    if cd-version-number ne ocd-version-number.
    endif.
    endif. " SY-SUBRC EQ 0
    endform. " IMPORT_CLUSTER
    *& Form INT_TAB
    Filling internal table tab_rgdir
    form int_tab.
    *Fill internal table tab_rgdir.
    move-corresponding rgdir to tab_rgdir.
    tab_rgdir-pernr = pernr-pernr.
    append tab_rgdir.
    endform. " INT_TAB
    *& Form IMPORT_bt
    Import Values from Bank Transactions Table (BT)
    form import_bt.
    rp-init-buffer.
    RP-IMP-C2-RX.
    rp-imp-c2-in.
    if rp-imp-in-subrc eq 0.
    if in-version-number ne oin-version-number.
    write: / 'Schlüssel des Clusters RX:'(015),
    rx-key-pernr, rx-key-seqno.
    write: / 'The imported version of the cluster'(016), 'RX',
    'is not current'(017).
    write: / 'Imported version :'(018),
    oin-version-number.
    write: / 'Current version of cluster :'(019),
    in-version-number.
    stop.
    else.
    sy-subrc = 0.
    endif.
    else.
    sy-subrc = 8.
    write: /
    'Inconsistencies between cluster directory and directory for'(020).
    write: /
    'No payroll results found for data in cluster directory'(021).
    write : /
    'Please contact hotline to solve the current problem'(022).
    endif.
    ws_fpbeg(2) = versc-fpbeg+4(2).
    ws_fpbeg+2(4) = versc-fpbeg(4).
    ws_fpend(2) = versc-fpend+4(2).
    ws_fpend+2(4) = versc-fpend(4).
    ws_mthyr(2) = pa_mth.
    ws_mthyr+2(4) = pa_year.
    check ws_mthyr = ws_fpbeg.
    check ws_mthyr = ws_fpend.
    loop at bt. "from pc209
    int_rep-pernr = pernr-pernr.
    int_rep-ename = pernr-ename.
    int_rep-bankl = bt-bankl.
    int_rep-bankn = bt-bankn.
    int_rep-betrg = bt-betrg.
    int_rep-zlsch = bt-zlsch.
    append int_rep.
    endloop.
    IF P_BANKL ' ' AND P_ZLSCH ' '.
    DELETE INT_REP WHERE BANKL P_BANKL.
    ELSEIF P_BANKL = ' ' AND P_ZLSCH ' '.
    DELETE INT_REP WHERE ZLSCH P_ZLSCH.
    ELSEIF P_BANKL ' ' AND P_ZLSCH = ' '.
    DELETE INT_REP WHERE BANKL P_BANKL.
    ENDIF.
    endform. " IMPORT_BT
    *& Form CONVERT_MONTH
    Fetching Month Text
    form convert_month using mth t_mth.
    case mth.
    when '01'.
    t_mth = 'January'(023).
    when '02'.
    t_mth = 'February'(024).
    when '03'.
    t_mth = 'March'(025).
    when '04'.
    t_mth = 'April'(026).
    when '05'.
    t_mth = 'May'(027).
    when '06'.
    t_mth = 'June'(028).
    when '07'.
    t_mth = 'July'(029).
    when '08'.
    t_mth = 'August'(030).
    when '09'.
    t_mth = 'September'(031).
    when '10'.
    t_mth = 'October'(032).
    when '11'.
    t_mth = 'November'(033).
    when '12'.
    t_mth = 'December'(034).
    endcase.
    endform. " CONVERT_MONTH
    *& Form CONVERT_DATE_A
    Fetching Month Text *
    form convert_date_a using mth_t t_mth_t.
    case mth_t.
    when '01'.
    t_mth_t = 'Jan.'(035).
    when '02'.
    t_mth_t = 'Feb.'(036).
    when '03'.
    t_mth_t = 'Mar.'(037).
    when '04'.
    t_mth_t = 'Apr.'(038).
    when '05'.
    t_mth_t = 'May.'(039).
    when '06'.
    t_mth_t = 'Jun.'(040).
    when '07'.
    t_mth_t = 'Jul.'(041).
    when '08'.
    t_mth_t = 'Aug.'(042).
    when '09'.
    t_mth_t = 'Sep.'(043).
    when '10'.
    t_mth_t = 'Oct.'(044).
    when '11'.
    t_mth_t = 'Nov.'(045).
    when '12'.
    t_mth_t = 'Dec.'(046).
    endcase.
    endform. " CONVERT_DATE_A
    *& Form VALIDATE
    text
    --> p1 text
    <-- p2 text
    form validate .
    if p_bankl <> ' ' and p_zlsch ' '.
    delete int_rep where bankl p_bankl.
    elseif p_bankl = ' ' and p_zlsch ' '.
    delete int_rep where zlsch p_zlsch.
    elseif p_bankl ' ' and p_zlsch = ' '.
    delete int_rep where bankl p_bankl.
    endif.
    endform. " VALIDATE
    check this weblog.....
    /people/dj.adams/blog/2003/11/13/food-for-thought-ldbs-and-abap-objects
    Also , check the following link too.
    http://www.datamanagementgroup.com/Resources/Articles/Article_1005_2.asp
    Regards,
    Satish

  • Position of parameters of a report using a Logical Database

    Hallo all,
    Is there any way that I can make the parameters defined by me in a report to appear <b>before</b> the ones defined by the Logical Database it is using ?
    I searched but I couldn't find something relevant.
    I would like to avoid having to copy and modify the LDB program.
    Thanks

    Here are a couple of things you can do:
    1.  Right-click on the subreport and select "Format Subreport...".  Turn off the borders on the subreport.
    2.  Right-click on the subreport and select "Size and Position".  Set the X and Y coordinates both to 0.  This will place the subreport at the top-left of the section where it's located.
    3.  In the subreport, suppress ALL of the sections that you're not using.
    4.  Make the height of the subreport fairly small - it will expand to the size of the data it contains.
    5.  Put the column labels in the Page Header of the main report, using markers on the ruler to identify the placement of the left side of each column header.  Be sure to line the markers up to a specific "tick mark" on the ruler.
    6.  In the subreport, place markers at the same tick-marks on the rule as you used for the column labels on the main report.  Then align the fields in the subreport with the markers.
    This should get you close to the format you're looking for.  If it's not exact, you can look at the report in Preview and tweak the position of the column labels to match the data in the subreport.
    -Dell

  • HR Reporing Payroll using Logical Database PNPCE

    Hi ALL
    Can any body explain me how can we do HR Payroll reporing using logical database PNPCE.
    In the program attibutes as mentioned we need to scee 900 for payroll reporting, but when I use PNPCE I cant see that screen in the Dropdown.
    can any body help me with this.
    regards
    AJ

    check this program..
    REPORT    ZHR_PAYROLL_EX1
               MESSAGE-ID ZZ
               LINE-SIZE 132
               LINE-COUNT 64(2)
               NO STANDARD PAGE HEADING .
                  T A B L E S                                            *
    TABLES    : PA0001 ,        "Infotype 0001
                 PCL1,           "HR Cluster 1
                 PCL2,           "HR Cluster 2
                 T549A,          "Payroll Accounting Areas
                 T549Q.          "Payroll Periods
                  I N C L U D E S                                        *
    *--Standard Include for US Payroll
    INCLUDE RPC2RUU0.            "Cluster RD data definition
    INCLUDE RPC2CD00.            "Cluster CD Data-Definition
    INCLUDE RPC2CA00.            "Cluster CA Data-Definition
    INCLUDE RPC2RX00.            "Cluster RF data definition internat. part
    INCLUDE RPPPXD00.            "Data definition buffer PCL1/PCL2
    INCLUDE RPPPXD10.            "Common part buffer PCL1/PCL2
    INCLUDE RPPPXM00.            "Buffer handling routine
                    INTERNAL TABLES
    *Internal Table to Hold data from PA0001
    DATA : BEGIN OF I_0001 OCCURS 0,
              PERNR LIKE PA0001-PERNR,  "Personnel Number
            END OF I_0001.
    *Internal Table to Hold data from PA0001
    DATA : BEGIN OF I_FINAL OCCURS 0,
              PERNR LIKE PA0001-PERNR, "Personnel Number
              GAMNT LIKE PC207-BETRG,  "Gross Amount
              NTAMT LIKE PC207-BETRG,  "Net Amount
              PAYDT LIKE PC261-PAYDT,  "Pay Date
              RUNDT LIKE PC261-RUNDT,  "Run Date
              VORNA LIKE PA0002-VORNA,  "First Name
              NACHN LIKE PA0002-NACHN,  "Last Name
            END OF I_FINAL.
    *Internal Table to Hold data from PA0002
    DATA : BEGIN OF I_0002 OCCURS 0,
              PERNR LIKE PA0002-PERNR,  "Personnel Number
              VORNA LIKE PA0002-VORNA,  "First Name
              NACHN LIKE PA0002-NACHN,  "Last Name
            END OF I_0002.
    Control record type
    TYPES     : BEGIN OF T_T569V,
                   ABKRS    LIKE T569V-ABKRS, "Personnel Area
                   PABRJ    LIKE T569V-PABRJ, "Accounting year
                   PABRP    LIKE T569V-PABRP, "Accounting period
                   STATE    LIKE T569V-STATE, "Status of Control Record
                   ADRUN    LIKE T569V-ADRUN, "HR: Special payroll run
                 END   OF T_T569V.
                      STRUCTURES
    DATA : WA_T569V TYPE T_T569V.    " Work area for t569v
                     DATA
    DATA : V_PABRJ  LIKE T569V-PABRJ,  "Accounting year
            V_PABRP  LIKE T569V-PABRP,  "Accounting period
            V_BEGDA  LIKE SY-DATUM,     "Begin Date
            V_ENDDA  LIKE SY-DATUM,     "End Date
            V_FPPER(6) TYPE C,          "For Period
            V_SEQNR  LIKE PC261-SEQNR.  "Sequence Number
       SELECTION SCREEN
    Selectio Screen Block for Employee Selection.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_PERNR FOR PA0001-PERNR, "Pernr
                      S_DATE  FOR SY-DATUM.     "Date
    SELECTION-SCREEN END OF BLOCK B1.
       START-OF-SELECTION
    START-OF-SELECTION.
    *Get Data from pa0001
       PERFORM GET_DATA_FROM_0001.
    *Get Data from pa0001
       PERFORM GET_DATA_FROM_0002.
    *Get CHAD Details
       PERFORM GET_PAYDATA.
       END-OF-SELECTION
    END-OF-SELECTION.
       IF NOT I_FINAL[] IS INITIAL.
    *Print the Final Report.
         PERFORM PRINT_REPORT.
       ENDIF.
                    T O P  O F  P A G E
    TOP-OF-PAGE.
    Display Header
       PERFORM DISPLAY_HEADER.
                    S U B - R O U T I N E S
    *&      Form  get_data_from_0001
          Get Data from 0001
    FORM GET_DATA_FROM_0001.
       SELECT PERNR                     "Personnel Number
              FROM PA0001
              INTO TABLE I_0001
              WHERE PERNR IN S_PERNR AND
                    ENDDA >= S_DATE-LOW AND
                    BEGDA <= S_DATE-HIGH .
       IF SY-SUBRC = 0.
         SORT I_0001 BY PERNR.
       ENDIF.
    ENDFORM.                    " get_data_from_0001
    *&      Form  get_data_from_0002
          Get Data from 0002
    FORM GET_DATA_FROM_0002.
       SELECT PERNR                     "Personnel Number
              VORNA
              NACHN
              FROM PA0002
              INTO TABLE I_0002
              WHERE PERNR IN S_PERNR AND
                    ENDDA >= S_DATE-LOW AND
                    BEGDA <= S_DATE-HIGH .
       IF SY-SUBRC = 0.
         SORT I_0002 BY PERNR.
       ENDIF.
    ENDFORM.                    " get_data_from_0002
    *&      Form  populate_chad_coinage_table
          text
    FORM GET_PAYDATA.
       LOOP AT I_0001.
         READ TABLE I_0002 WITH KEY PERNR = I_0001-PERNR BINARY SEARCH.
         IF SY-SUBRC = 0.
           I_FINAL-VORNA = I_0002-VORNA.
           I_FINAL-NACHN = I_0002-NACHN.
         ENDIF.
    Read Result Directory for Payroll Results for a Employee.
         PERFORM CU_READ_RGDIR.
    Get Sequence Number & Associated Payroll Results.
         PERFORM GET_PAYROLL_RESULTS.
       ENDLOOP.
    ENDFORM.                    " get_paydata
    *&      Form  cu_read_rgdir
          Reag rgdir to get the results with conty grouping 'TD'
    FORM CU_READ_RGDIR.
       DATA : V_MOLGA  LIKE T500L-MOLGA ."Country Grouping
    *Call function module to get Results
       CALL FUNCTION 'CU_READ_RGDIR'
         EXPORTING
           PERSNR          = I_0001-PERNR
         IMPORTING
           MOLGA           = V_MOLGA
         TABLES
           IN_RGDIR        = RGDIR
         EXCEPTIONS
           NO_RECORD_FOUND = 1
           OTHERS          = 2.
       SORT RGDIR BY SEQNR.
    ENDFORM.                    " cu_read_rgdir
    *&      Form  get_payroll_results
          Get Sequence number
    FORM GET_PAYROLL_RESULTS.
       LOOP AT RGDIR WHERE   SRTZA = 'A' AND
                         VOID IS INITIAL AND
                         REVERSAL IS INITIAL AND
                         OUTOFSEQ IS INITIAL AND
                         PAYDT    IN S_DATE.
         V_SEQNR = RGDIR-SEQNR.
    *-- Macro Call for Germany
         RP-INIT-BUFFER.
         RX-KEY-PERNR = I_0001-PERNR.
         RX-KEY-SEQNO = V_SEQNR.
         RP-IMP-C2-RU.
         LOOP AT RT WHERE LGART = '/559'.
           I_FINAL-PERNR = I_0001-PERNR.
           I_FINAL-GAMNT = RT-BETRG.
           I_FINAL-PAYDT = RGDIR-PAYDT.
           I_FINAL-RUNDT = RGDIR-RUNDT.
           APPEND I_FINAL.
           CLEAR  I_FINAL.
         ENDLOOP.
       ENDLOOP.
    ENDFORM.                    "get_payroll_results
    *&      Form  display_header
          Display Header
    FORM DISPLAY_HEADER .
       FORMAT COLOR 1.
       ULINE.
       WRITE:/1 SY-VLINE,
             (15) 'Empl Number',
             SY-VLINE,
             (20) 'First Name',
             SY-VLINE,
             (20) 'Last Name',
             SY-VLINE,
             (15) 'Pay Date',
             SY-VLINE,
             (15) 'Run Date',
             SY-VLINE,
             (25) 'Gross Amount',
             132 SY-VLINE.
       ULINE.
       FORMAT COLOR OFF.
    ENDFORM.                    " display_header
    *&      Form  print_report
          Display Report
    FORM PRINT_REPORT .
       LOOP AT I_FINAL.
         WRITE:/1 SY-VLINE,
               (15) I_FINAL-PERNR,
               SY-VLINE,
               (20) I_FINAL-VORNA,
               SY-VLINE,
               (20) I_FINAL-NACHN,
               SY-VLINE,
               (15) I_FINAL-PAYDT,
               SY-VLINE,
               (15) I_FINAL-RUNDT,
               SY-VLINE,
               (25) I_FINAL-GAMNT,
               132 SY-VLINE.
         ULINE.
       ENDLOOP.
       SKIP 2.
       WRITE:/1 'Period Begin Date:',(25) V_BEGDA.
       WRITE:/1 'Period End   Date:',(25) V_ENDDA.
    ENDFORM.                    " print_report

  • How tuning memory in Logical database 10.2.0.2 in Unix server?

    Hi
    I need your help.
    I have a logical database ver, 10.2.0.2, in a unix itanium with 16G in Ram.
    Recently my database has issues because is not refresing the data that comes from the primary DB.
    I have to flush the SGA memory and shutdown the database.
    Also I decrese the max_servers from 27 to 18 and still fails.
    My sga memory is 9G
    How can I tuning the size of the SGA, shared pool etc for a better performance?
    Or what else I need to review in order to have a better performance?
    Thanks in advance for the help.
    Lorein

    Hello
    That's the issue I don't receive any error just take long time to apply the archive files from the primary database.
    This is a part of the alert file. Yesterday the file arch112366_1_652812906.arc start to be applied but for 5 hours didn't finish, but I didn't receive any error. The logical continued receiving the arch fiels from the primary but never finish loading this file. What I did was flush the SGA and shutdown the database , and decrease the max_servers. Then the database starts applying the files.
    LOGMINER: End mining logfile: /oracle/pexp/arch/sarchive/arch112365_1_652812906.arc
    Wed Feb 3 12:32:36 2010
    RFS[2]: No standby redo logfiles created
    RFS[2]: Archived Log: '/oracle/pexp/arch/sarchive/arch112366_1_652812906.arc'
    Wed Feb 3 12:32:38 2010
    RFS LogMiner: Registered logfile [oracle/pexp/arch/sarchive/arch112366_1_652812906.arc] to LogMiner session id [1]
    Wed Feb 3 12:32:38 2010
    LOGMINER: Begin mining logfile: /oracle/pexp/arch/sarchive/arch112366_1_652812906.arc
    Wed Feb 3 12:32:40 2010
    LSP0: rolling back apply server 4
    LSP0: apply server 4 rolled back
    Wed Feb 3 12:32:45 2010
    Thread 1 advanced to log sequence 1026
    Current log# 1 seq# 1026 mem# 0: /oradata/pexp/redoA/redo01.log
    Current log# 1 seq# 1026 mem# 1: /oradata/pexp/mirrorredoA/redo01b.log
    Wed Feb 3 12:32:46 2010
    LOGMINER: Log Auto Delete - deleting: /oracle/pexp/arch/sarchive/arch112352_1_652812906.arc
    Deleted file /oracle/pexp/arch/sarchive/arch112352_1_652812906.arc
    Wed Feb 3 12:32:46 2010
    LOGMINER: Log Auto Delete - deleting: /oracle/pexp/arch/sarchive/arch112353_1_652812906.arc
    Deleted file /oracle/pexp/arch/sarchive/arch112353_1_652812906.arc
    Wed Feb 3 12:32:46 2010
    Regards

  • Archive logs not applied on logical database.

    I have 10.2.04 oracle logical dataguard on windows:
    The logs are trasported smoothly from primary to stanby;
    But they are not applied to the logical standby;
    There are no GAPS.
    This is the message i got from DG broker wehn i ran verify configuration
    Initializing
    Connected to instance I-AG1101:tito
    Starting alert log monitor...
    Updating Data Guard link on database homepage...
    Data Protection Settings:
    Protection mode : Maximum Performance
    Redo Transport Mode settings:
    hclistg: ASYNC
    hclidg: ASYNC
    Checking standby redo log files.....OK
    Checking Data Guard status
    hclistg : Normal
    hclidg : Normal
    Checking Inconsistent Properties
    Checking agent status
    hclistg ... OK
    hclidg ... WARNING: No credentials available for target. I-SAG1151
    Attempting agent ping ... OK
    Switching log file 420.Done
    Checking applied log on hclidg.......WARNING:
    Timed out after 60 seconds waiting for log to be applied.
    Processing completed.
    This is the results of query: SELECT SEQUENCE#, FIRST_TIME, APPLIED
    FROM DBA_LOGSTDBY_LOG
    ORDER BY SEQUENCE#;
    SEQUENCE#|FIRST_TIME|APPLIED
    391|3/31/2010 1:08:27 PM|CURRENT
    392|3/31/2010 3:10:19 PM|NO
    393|3/31/2010 3:47:05 PM|NO
    394|3/31/2010 3:47:13 PM|NO
    395|3/31/2010 3:47:40 PM|NO
    396|3/31/2010 3:47:46 PM|NO
    397|3/31/2010 3:50:14 PM|NO
    398|3/31/2010 3:50:20 PM|NO
    399|3/31/2010 3:54:01 PM|NO
    400|3/31/2010 3:54:36 PM|NO
    401|3/31/2010 3:54:43 PM|NO
    402|3/31/2010 3:56:24 PM|NO
    403|3/31/2010 3:56:30 PM|NO
    404|3/31/2010 4:00:46 PM|NO
    405|3/31/2010 4:34:03 PM|NO
    406|3/31/2010 4:35:31 PM|NO
    407|3/31/2010 5:38:57 PM|NO
    408|4/1/2010 7:30:25 AM|NO
    409|4/1/2010 11:45:23 AM|NO
    410|4/1/2010 11:47:06 AM|NO
    411|4/1/2010 2:26:25 PM|NO
    412|4/1/2010 2:26:43 PM|NO
    413|4/1/2010 2:26:44 PM|NO
    414|4/1/2010 2:28:13 PM|NO
    415|4/1/2010 5:08:12 PM|NO
    416|4/1/2010 5:08:19 PM|NO
    417|4/1/2010 5:08:52 PM|NO
    418|4/2/2010 10:31:19 AM|NO
    419|4/2/2010 10:35:06 AM|NO
    420|4/2/2010 11:24:27 AM|NO
    Please help,,,

    i am getting this error when i run alter database mount standby database
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup nomount;
    ORACLE instance started.
    Total System Global Area 1610612736 bytes
    Fixed Size 1299288 bytes
    Variable Size 545262760 bytes
    Database Buffers 1056964608 bytes
    Redo Buffers 7086080 bytes
    SQL> alter database mount standby database;
    alter database mount standby database
    ERROR at line 1:
    ORA-01665: control file is not a standby control file
    I configured my logical DG using Grid control

  • Logical Database in Abap Objects

    Hi to All
    I want do it a program report using a Logical Database.
    Is this possible ??? But when I make a GET <node>, occurs the following error:
             "" Statement "ENDMETHOD" missing.  ""
    I'm doing the following:
    CLASS MONFIN IMPLEMENTATION.
           METHOD TRAER_DATOS.
                   GET VBRK.
           ENDMETHOD.
    ENDCLASS.
    Please, somebody tell me how I use the logical database in Abap Objects.
    Thank you very much
    Regards
    Dario R.

    Hi there
    Logical databases whilst of "some use" are not really part of OO.
    If you want to use a logical database in an abap OO program I would create a special class which just does the get data from your DB and pass this either at record or table level.
    Techniques such as GET XXXX LATE aren't really part of any OO type of application since at Object Instantiation time you should be able to access ALL the attributes of that object.
    As far as OO is concerned Logical databases are a throwback to "Dinosaur Technology".
    Since however modules such as SD and FI are still heavily reliant on relational structures (i.e linked tables etc)  then there is still some limited life in this stuff but for OO try and solve it by another method.
    If you really must use this stuff in OO then do it via a FMOD call and save the data in a table which your method will pass back to your application program.
    You can't issue a GET command directly in a method.
    Cheers
    Jimbo

  • Logical Database in Webdynpro

    Hello,
    I have a program in R/3 that is based on a logical database. I don't want to have to write the program all over again in Webdynpro.
    Is there a way to use the logical database in Webdynpro for ABAP.

    Basically WDA calls a FM and then the following help is a good starting point:
    "Calling a Logical Database Using a Function Module"
    http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm
    Kindly close the thread and award appropriate a points to the answer given.
    Sergio

  • Logical database in adhoc query

    Hello All,
    Can anyone tell me what is the logical database in adhoc query?

    Hi
    When you create a query , you have to select an infoset. Infoset can be considered as a source from which data is populated in the Query Fields.
    Infosets are created from Transaction SQ02.
    There can be four methods through which an Infoset can become a source of data:
    1.  Table join ( By joining two or more tables from Data dictionary)
         example: Joining tables PA0001 and PA0006 on Pernr to get a one resultant dataset
    2. Direct read of Basis Table ( Like PA0001 as a source for data in Infoset )
    3. Logical Database ( A Pre-written Program by SAP that extract data from clusters, tables taking care of authorizations and validity periods)
    Example : Logical database PNP, PNPCE (Concurrent Employement),PCH ( LDB for Personnel Development Data)
    Custom Logical DBs can be created in T_Code SE-36.
    4. Data Retrieval by a Program ( Custom code written by ABAP developers which will collect and process data) . This program has a corresponding Structure in data dictionary and the fields of this structure will be used in query)
    Reward Points, if helpful.
    Regards
    Waseem Imran

  • LOGICAL DATABASE IN HR ABAP PRPGRAMMING

    Hi Friends,
    what is use of LOGICAL DATABASE IN HR ABAP PROGRAMMING
    AND END-OF-SELECTION EVENT IN HR PROGRAMMING PROGRAMMING???
    regards,
    vijay.

    hi
    HR Logical Databases
    In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
    PNP (PNPCE)
    PAP
    PCH
    By selecting a logical database, you determine the HR data that can be reported on using an InfoSet.
    Logical Database PCH
    This logical database generally enables you to report on all HR infotypes. However, you are advised not to use this logical database unless you want to report on Personnel Planning data.
    Logical Database PNP (or PNPCE)
    Use logical database PNP to report on HR master data. It is possible to use logical database PCH to access this data, but PNP meets such reporting requirements more quickly because it is best suited to the task of selecting persons.
    Logical database PNP enables you to access HR master data and infotypes from Personnel Planning. For example, you have the following options:
    Reporting on the costs, number of attendees booked, and instructor for a business event on which an employee is booked
    Reporting on working time and planned compensation for a position that an employee occupies
    Reporting on the validity and proficiency of a qualification that an employee fulfils
    From a technical perspective, this means you can use PNP to report on all of the infotypes that exist for objects (infotype 1000) that have a direct relationship (infotype 1001) with the Person object.
    The ability to access infotypes from Personnel Planning using logical database PNP is a special feature that you can only use in the context of SAP Query and Ad Hoc Query. You cannot use this functionality for ABAP reports you programmed yourself.
    You can also use logical database PNP to report on data from Personnel Time Management (infotypes 2000 to 2999) and Payroll (special payroll infotypes for the USA and customer infotypes; for more information, access Customizing for the Human Resources Information System and see Payroll Results).
    Logical Database PAP
    Logical database PAP enables you to access data from Recruitment.
    regards
    navjot
    reward if helpfull

  • Logical  database and program selection filter

    Hi experts ,
    In my program i have to select pernr through logical database selection and payroll area through manual coding .
    Could you tell me how to give the filter condition in program.I am  using PNPCE Logical database .
    Thank you.
    Devika.

    I guess you mean to modify the screen layout during AT SELECTION-SCREEN OUTPUT via
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        screen-active = 0.
        MODIFY SCREEN.
      ENDLOOP.
    This does hides all screen elements but the screen is still displayed.

  • Logical Database and Logical Thing

    Hi,
    i want to access KONV which is cluster table and the field is KWERT.
    The thing is that i want to access it by taking customers from KNVV and giving it to VBRK (SALES Table). Now in VBRK i want to have a selection on FKDAT to get a list of Customers stored in the field called KUNAG.
    on VBRK-KUNAG basis i want to access the table KONV-KWERT.
    If i am doing queries then the System stops responding cuz it has got alot of overhead. So i tried to use Logical Database called VFV.
    If this is the best solution means using LDB then how to use it, can anyone help me with this. I tried it by Function module but it is showing all data without considering selection criteria.
    If anyone can help me then plz do answer or refer me to any web site so that i can figure this thing out. If anyione has got a good book on that then plz feel free to mail me.
    Thanks,
    Muhammad Usman Malik
    ABAP Consultant
    Siemens
    [email protected]
    +92-333-2700972

    Thanks Shibba that was very helpful, i applied that but the system overhead was so much.
    can u help me with Dynamic selection code.
    I used FREE_SELECTION_INIT, FREE_SELECTION_DIALOG and then FREE_SELECTIONS_RANGE_2_WHERE to get ther Selections in one table.
    if u want me to send u the code then i can do that cuz i am getting so much mad that this work is not done yet.
    The Scenario here is that we want to take BILLED Customers and VKORG as Industrial Billing Customer and then taking VBRK and giving all these Customers and then taking selection on FKDAT range.
    Now after that the data should be collected from KONV-KWERT and i want to perform some calculation over it. I am using VFV (Logical Database) to perform this thing because i know that it would be very fast then applying my own queries.
    If you can mail me any book on Logical Database and Dynamic selection then it will be very Helpful.
    Thanks once again for being such helpful.
    Muhammad Usman Malik
    SAP Consultant
    [email protected]
    +92-333-2700972

  • Logical database access in abap HR

    Dear all,
                 i am working on HR Master Report. is there any way to access logical database PNP without standard input screen.
    means due to requirement my input screen is totally different so i don't want to use standard input screen. but i want to access
    pernr table by get pernr or other functioality of PNP logical database.
    any valuable suggesstion will be much apprecaited.
    Thanks and Regards
    vijay dwivedi

    Yes, there is, by means of FM [LDB_PROCESS|http://help.sap.com/saphelp_47x200/helpdata/en/64/237f8cd43711d1950b0000e8353423/frameset.htm]
    Regards
    Marcin

Maybe you are looking for

  • Opening & Closing Posting Period

    At the time of  opening & Closing posting period ,we get two fields From Account and To Account. Can some body explain theuse of this two fields.Points will be assigned to all reply.

  • I am getting error 1661 whenever i connect iPhone4 (iOS5 GM)...

    I am getting error 1661 whenever i connect iPhone4 (iOS5 GM)... also i am not able to activate cellular data network with ios5. everything was fine with iOS4.3.5. my carrier is TATA DOCOMO in INDIA.

  • Grub2 can't see partition on a MBR drive but can on GPT drives

    I have three hdds, the first two are formatted with GPT and the third MBR so as to boot windows when needed.  I have grub2 installed on /dev/sda and I can boot my Arch partitions just fine.  I can't however boot the windows partition (/dev/sdc1).  I

  • Keynote files in iCloud do not appear when opening Keynote on iPad

    I have just run into a problem in which one file created in Keynote, 5MB, stored in iCloud, doesn't appear when I open Keynote on my iPad.  This is the only file that I am having difficulty with.  I have tried removing and resaving it to iCloud to kn

  • BAPI for sales information

    Hi all, Please suggest me a BAPI for getting sales related data into SAP. It must have: 1)Billing details (ex, receipt no, cashier no, name etc...) 2)Shop details (ex. shop no, location etc...) 3)Payment details(ex.total amt, vat amt, cash, credit ca