Logical database AA- *Accumulated depreciation* & *Original Acquistion Cost

Hi
I am creating a SAP QUERY report with logical data base AA in asset accounting.Can anyone suggest me on what fields to be taken for the below values:
Accumulated depreciation   - Depreciation posted till date (including the ACC dep +current year dep)
Original Acquistion Cost    - Acquistion and Production Cost + current year acquistion
Please advice.
Edited by: mysap query on Feb 24, 2009 6:33 PM

ANLCV-KANSW  for acquisition costs and ANLCV-KNAFA  for accumulated depreciaiton

Similar Messages

  • How calculate original value and accumulated depreciation ?

    recently,FI department let me develop a report about fixed
    assets,which need show original value , accumulated depreciation. but
    my problem is I can not fix where I can draw out the correct data ,ANLC
    or ANLP ? FI key user told me that the T-code aw01n can show original
    value and accumulated depreciation ,infact ,it is true,but I don't know
    how T-code aw01n calculate that? specially, I can not fix the
    item 'value ajust' . can you give me a correct calculate formula?

    use logical database ADA - table anlcv
    or use fm FI_AA_VALUES_CALCULATE (look docu)
    hope that helps
    Andreas

  • Cost center relationship in PCH logical database

    Hi Experts .
    According to what I knew theoretically ,
    External objects such as cost centers or users do not store data in the PCH logical database .
    But I created a position and Idid a cost assignment using relationship A11 to a cost center and went to SE36 and ran PCH for the selection of current plan version and object type K and object id of the cost center .
    After running for the evaluation path KOSTDIUP ( Account assignment usage ) , I could see the relationship of cost center with the earlier created position .
    So if relationships of cost center are not supposed to be in PCH logical database , then how come I can see the above result ?
    Thanks
    Rishabh

    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.
    The Organizational Management uses the PCH logical database
    so S-Position is an object in OM, you can see the relationship.
    correct me if i am wrong !!
    regards,
    mohammed

  • Adding cost center in RABEST_ALV01 from ANLZ node - ADA Logical database

    Hi,
    I am trying to display cost center in output list of RABEST_ALV01 ALV report (Copied it to ZRABEST_ALV01).
    I was able to include fields which are there in ANLAB and ANLAV in FIAA_SALVTAB_RABEST structure - CI_REPRABEST inlcude. And have included cost center field also in the include (KOSTL).
    This ALV report RABEST_ALV01  is reffering to ADA logical database. I included a node explicitly in the program along with other node declaration :
    NODES: anla0,
                 anlav,
                 anlz ,
                 anlb,
                 anek,
                 anepv,                    
                 anlcv.             
    and added a GET statement in the program GET ANLZ before moving the values to final internal table.
    Here, the the issue is that the values of ANLZ is getting displayed as "#".
    Kidnly suggest.
    Thanks and Regards,
    Rashmi

    Hi Rashmi,
    Please make sure the order of the nodes should be same as the order in which they are there in LDB or else they will be overwritten
    Thanks
    Bala Duvvuri

  • 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 in sd

    hi experts,
       i need standard LDB's  related to the tables of sd, mm and fi... can anyone help regarding this.....

    Ok so here you are, If you want to edit one go to SE36
    LDB name
    Logical database short text
    50V
    Delivery in process
    AAV
    Logical Database RV: Sales Documents
    ABCLAIMLDB
    Agency Business: Complaints Processing
    ABS
    ABAP Book: Customer and bookings
    ACAC_ACE_LDBDS
    Accrual Object Distribution Server Reporting Table
    ACAC_ACE_LDBPS
    Accrual Engine Posting Server Reporting Database
    ACE_FILA_LDBDS
    Accrual Object Distribution Server Reporting Table
    ACE_FILA_LDBPS
    Accrual Engine Posting Server Reporting Database
    ACE_SOP_LDBDS
    Stock Option Accounting Distribution Server LDB
    ACE_SOP_LDBPS
    Provisions for Awards: Posting Server LDB
    ACEDS_003
    Accrual Object Distribution Server Reporting Table
    ACEPS_003
    Accrual Engine Posting Server Reporting Database
    ADA
    Assets Database
    AFI
    Logical database for orders
    AGENCYLDB
    Agency Business: Logical Database
    AKV
    Logical Database RV: Sales Documents
    ALV
    Archiving Deliveries
    ARV
    Logical Database RV: Sales Documents
    ASV
    Request Screen for Summary Information
    AUK
    Settlement documents
    AUW
    Allocation Table
    B1L
    Transfer requirements by number
    BAF
    BAV-Data collector
    BAM
    Purchase Requisitions (General)
    BANK
    Logical Database for Table BNKA
    BBM
    Archiving of Purchase Requisitions
    BC405_DIFF_NODES
    Example of Different Node Types
    BJF
    Loans flow records with date restriction(YR
    BKK
    Base Planning Object
    BKM
    Purchase Requisitions per Account Assignment
    BMM
    Documents for Number
    BPF
    Treasury Business Partner
    BRF
    Document Database
    BRM
    Accounting Documents
    BTF
    Loan portfolios and flows
    BTM
    Process Order; Print
    BUCHUNGSJOURNAL
    LDB for Posting Journal
    BUD
    LDB For Loans Master Data, Conditions, Documents
    C1F
    Cash Budget Management
    CCLDB_AENR
    ECH: Change number with status information
    CDC
    Document structure
    CEC
    Equipment BOM
    CEK
    Cost Centers - Line Items
    CFK
    Data pool for SAP EIS
    CIK
    Cost Centers - Actual Data
    CKA
    Costing
    CKC
    Sales order BOM
    CKM
    Material master
    CKQ
    Material Selection for New Costing Solution
    CKS
    MiniApp. for the Calculator: Sales Order Data
    CKS_WAO
    MiniApp: Sales Order Items to be Processed
    CKW
    Costing run: Material Selection
    CMC
    Material BOM
    CPK
    Cost Centers - Plan Data
    CRC
    Work Centers
    CRK
    Cost Centers - Total
    CRZ
    Logical database for courses BC220/BC230
    CSC
    Standard BOM
    CSR
    Logical database for archiving BOMs
    CTC
    Functional location BOM
    DBM
    MRP Documents
    DDF
    CUSTOMER  DATABASE
    DPM
    Planned Orders
    DSF
    Loan Debit Position
    DVS
    Logical database for archiving DMS data
    DWF
    Loan resubmission
    EBM
    Purchasing Activities per Requirement Tracking No.
    ECM
    Purchasing Documents per Material Class
    EHS_OH001
    Logical Database for Occupational Health
    EKM
    Purchasing Documents per Account Assignment
    ELM
    Purchasing Documents per Vendor
    EMM
    Purchasing Documents for Material
    ENM
    Purchasing Documents per Document Number
    EQI
    Logical Database (Equipment)
    ERM
    Archiving of Purchasing Documents
    ESM
    Purchasing Documents per Collective Number
    EWM
    Purchasing Documents per Supplying Plant
    F1S
    BC: Planned flights, flights and bookings
    FDF
    Cash management and forecast
    FDK
    IS-U/FERC: Drill down to line items and paths
    FEF
    Cash Management - Memo Records
    FILA
    Lease Accounting
    FMF
    Funds Management
    FPMF
    LDB, reads FPAYH and FPAYP
    FRF
    Drill-down Selection Screen
    FSF
    Cash Management Totals Records
    FTI_BW_CFM_VALUES
    Market Values and Simulated Values in Pos. Mgmt
    FTI_LO_PERIODS
    Loan/CML Period Evaluations
    FTI_LO_POSITIONS
    Loan /CML Positions
    FTI_SWAP_POSITION
    Swap Positions
    FTI_TR_CASH_FLOWS
    Treasury Payment Information
    FTI_TR_PERIODS
    Treasury: Period-Based Evaluations
    FTI_TR_PL_CF
    Treasury: Revenue and Cash Flow Reporting
    FTI_TR_POSITIONS
    Treasury Positions
    FTLM_DB01
    Limit Management
    FUK
    IS-U/FERC: Drill back from document line items
    G1S
    text
    GLG
    FI-SL Totals and Line Items
    GLU3
    Flexible G/L
    I1L
    Inventory data for storage bin
    I2L
    Warehouse quants for storage bin
    I3L
    Inventory documents
    IBF
    Real Estate Logical Database (Lease-Out)
    IDF
    Real Estate Logical Database
    IDFPLUS
    Real Estate Plus Logical Database
    IFM
    Purchasing Info Records: General
    ILM
    Archiving Purchasing Info Records
    IMA
    Logical database for investment programs
    IMC
    IM Summarization (not usable operationally)
    IMM
    Inventory documents for material
    IMR
    Approp. requests (not operationally functional)
    IMT
    Approp. requests (not operationally functional)
    INM
    Inventory documents
    IOC
    Shop floor control - order info system
    IPM_ACE_LDBDS
    Accrual Object Distribution Server Reporting Table
    IPM_ACE_LDBPS
    Accrual Engine Posting Server Reporting Database
    IRM
    Reorganization of inventory documents
    J5F
    Logical Database for new Nota Fiscal Database
    K1V
    Generating Conditions
    KDF
    Vendor Database
    KIV
    Customer Material Information
    KKF
    Balance Audit Trail of Open Items
    KLF
    Historical Balance Audit Trail
    KMV
    SD Documents for Credit Limit
    KOV
    Selection of Condition Records
    L1L
    Evaluation Whse Documents
    L1M
    Stock movements for material
    LMM
    Stock Movements for Material
    LNM
    Stock movements
    LO_CHANGE_MNMT
    Logical database for engineering change management
    MAF
    Dataset for Dunning Notices
    MDF
    Logical Database for Master Data Selection
    MEPOLDB
    Logical Database/Selection of Purch. Order Tables
    MIV
    BC: Planned flights, flights and bookings
    MMIMRKPFRESB
    Selection from Reservations
    MRM
    Reorganization of material documents
    MSM
    Material master
    NOTIF
    LDB for Basic Notifications
    NOTIFICATIONS
    NTI
    Logical database object networking
    ODC
    Shop floor control - orders per MRP controller
    ODK
    Orders
    OFC
    Shop floor control - orders per prod.scheduler
    OHC
    Shop floor control - orders by numbers
    OPC
    Shop floor control - orders by material
    PAK
    CO-PA Segment Level and Line Items
    PAP
    Applicant master data
    PCH
    Personnel Planning
    PGQ
    QM: Specs and Results of the Quality Inspection
    PMI
    Structure database (plant maintenance)
    PNI
    PM Planning Database
    PNM
    Planning database
    PNM_OLD
    Planning Database
    PNP
    HR Master Data
    PNPCE
    HR Master Data (Incl. Concurrent Employment)
    POH
    Production orders database - header
    PSJ
    Project system
    PTRVP
    Travel Management
    PYF
    Database for Payment Medium Print Programs
    QAM
    Inspection Catalogs: Selected Sets
    QAQ
    Inspection Catalogs: Selected Sets
    QCM
    Inspection Catalogs: Codes
    QCQ
    Inspection Catalogs: Codes
    QMI
    Logical database (PM notifications)
    QMQ
    Inspection Characteristics
    QNQ
    Quality Notifications
    QTQ
    Logical database for inspection methods
    QUERYTESTLDB
    Test LDB for InfoSet Query
    R0L
    Archive selection: Transfer orders (MM-WM)
    R1L
    Archive selection: Transfer requirements (MM-WM)
    R2L
    Archive Selection: Posting Change Notices (MM-WM)
    R3L
    Archive selection: Inventory documents (MM-WM)
    R4L
    Archive selection: Inventory histories (MM-WM)
    RBL
    Archiving of transfer requests
    REAO
    Real Estate: Logical Database for Architecture
    REBD
    Logical Database for Real Estate Objects
    REBP
    Logical Database via Partner (Real Estate)
    RECN
    Real Estate: Selection by Contracts
    RECONTRACT
    RE Logical Database: (General) Contract
    RHL
    Archiving of inventory history
    RIL
    Archiving of inventory documents
    RKM
    Reservations for Account Assignment
    RLI
    Logical Database Reference Location
    RMM
    Reservations for material
    RNM
    Reservations
    RTL
    Archiving of transfer orders
    RUL
    Archiving of Posting Change Notices
    S1L
    Stock by storage bins
    S1L_OLD
    Stock by Storage Bins
    S2L
    Warehouse quant for material
    S3L
    Stocks
    SAK
    Completely Reversed Allocation Documents
    SD_KUSTA
    Logical Database for Sales Summary
    SD_ORDER
    Logical database for inquiries, contracts
    SD_SALES_DOCUMENT
    Logical database for inquiries, contracts
    SDF
    G/L Account Database
    SMI
    Serial Number Management
    T1L
    Transfer orders by number
    T1L_OLD
    Transfer Orders by Number
    T2L
    Transfer orders for material
    T3L
    Transfer orders for storage type
    T4L
    Transfer order for TO printing
    T5L
    Transfer orders for reference number
    TAF
    Treasury
    TIF
    Treasury Information System
    TPI
    Functional Location Logical Database
    U1S
    User master reorganization: Password changes
    U2S
    User master reorganization: Password changes
    U3S
    User master reorganization: Password changes
    U4S
    User master reorganization: Password changes
    UKM_BUPA
    SAP Credit Management: Business Partner
    V12L
    Pricing Report
    VAV
    Logical Database RV: Sales Documents
    VC1
    List of Sales Activities
    VC2
    Generate Address List
    VDF
    Customer Database with View of Document Index
    VFV
    Logical Database RV: Billing Documents
    VLV
    Logical Database For Deliveries
    VVAV
    Logical Database RV: Sales Documents
    VXV
    SD: Billing Document - Export
    WAF
    Securities position plus additional master data
    WOI
    Maintenance Item
    WPI
    Maintenance plans
    WTF
    Securities positions and flows
    WTY
    WTY LD
    WUF
    Sec.-Determ.master data for positions
    I hope this will delh

  • Logical Database PNP cannot fetch correct data?

    I use logical database PNP fetch HR master data.
    PA0001 has records with company code = 0960 .
    But can not fetch data using GET PERNR.
    however
    PA0001 has not records with company code = 0770 .
    But it got so many data using GET PERNR.
    WHY..............
    person originally transferd from 0770 to 0960, It is OK.

    I belive this is not concurent employment why we need to use
    PNPCE
    Please be specific about your question
    Regards

  • Logical database PSJ

    Hi All,
    I need to add a Y-table in the logical database PSJ and need to assign the fields to one of the Functional Groups.
    For this I went to tcode SE36 with logical database as PSJ, then went to Extras->Selection Views from menu, I gave the Origin of view as CUS and went in change mode. But in the tables/nodes it is not allowing me to add the Y-table.
    In the tables/nodes I need to add the Y-table and assign its fields to one the function groups
    Please give me the step by step procedure to do the same.
    -Srinath S

    Hi Sisab,
    Can you check for your support pack level ?
    125199 Termination with error message OK033 25.03.2003
    Other related notes are:
    165309 Termination with error message OK033 /3 25.03.2003
    144419 Termination with error message OK033 /2 11.10.2005
    Also please provide your system details.
    Do let me know if this solves your problem.
    Thank you.
    Regards,
    Manomeet
    Award points if helpful **

  • How to select a new table in logical database after creating the Infoset

    I have created a abap query report ,i have used logical data base ADA in the infoset in SQ02.In the logical database i had selected only two tables then ANALV and ANLB.Now my client wants one more field to be added and thats is from table ANEK.Now i need to select this table in logical database ADA.
    Please assist on how to select another table available in the Logicaldata base now which i didnt select when i created the query

    Markus,
    I have now selected the additional field Posting date in Document ANEK -BUDAT .Earlier the report had the fields from ANLCV - Current acquisition value ,ordinary dep posted selected for  the output.
    When i run the query after adding this new field ANEK-BUDAT the below warning  is generated  by system :
    The query specifications cannot be used to generate a list,
    i.e. the query will probably not return the list you desire.
    If you still want to execute the query, please use the
    "Generate" function
    -> 'Generate'
    Fields from parallel tables within a line*
    Line: 01
    Field: Posting Date in the Document
    (ANEK-BUDAT, table ANEK)
    Field: Ordinary depreciation posted
    (ANLCV-NAFA GEB, table ANLCV)
    Fields from parallel tables within a line*
    Line: 01
    Field: Posting Date in the Document
    (ANEK-BUDAT, table ANEK)
    Field: Current asset acquisition value
    (ANLCV-LFD KANSW, table ANLCV)
    2 warnings for query QUERY ***
    Please advice .How get this new field added.

  • 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

  • How to hide selection fields when using logical database PNP

    hi.
    i m using a logical database PNP and report catagory 1PY_DEF in my program.
    but when i execute it , it shows to selection box. one name is period and second is selections.
    but i just want to show only period box selection fields , not the selection box fields.
    how it iz possible.

    HI,
    In my case i haved used the PNP logical database..in the selection box i don't wnat to display Contorling area,Cost Center & Organizational Unit. i have written this code to hide those fields..
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name CS 'PNPKOKRS' OR
           screen-name CS 'PNPKOSTL' OR
           screen-name CS 'PNPORGEH'.
          screen-active = '0'.
          screen-invisible = '1'.
          MODIFY SCREEN.
          CLEAR screen.
        ENDIF.
      ENDLOOP.
    Try modify hide the total block instead of individual fields in that block.

  • Issue with 900 screen of PNP logical database.

    Hi Experts,
    I am using 900 screen in PNP logical database and assigned the default report catagory.
    But in the selection screen when I click on further selection and select any of the parameter like company code/cost center, nothing comes in to the screen.
    Request to let me know any issue there?
    Br/Manas

    hi
    After selecting the fields from further options are you first adding them and then saying ok or just saying ok. Please check and let me know.
    If you add and then say ok these fields appear on the screen,
    Santoshi

  • Logical database definition

    Hi Experts ,
    I am trying to execute a program with logical database .
    It is showing error that logical database is unknown.
    REPORT  ZHRTRAIN.
    tables :pernr.
    Infotypes: 0002.
    data: begin of name,
    nachn like p0002-nachn,
    vorna like p0002-vorna,
    end of name.
    select-options : nation for p0002-natio.
    GET PERNR.
      provide * from p0002 between pn/begda and pn/endda.
      check nation.
      move-corresponding p0002 to name.
      condense name.
      write : / p0002-pernr,
      name,
      p0002-natio,
      p002-gebat.
      endprovide.
    Pls tell me how to correct this error.
    Thank you.
    Regds,
    devika.

    HR Logical Databases
    In Human Resources (HR), the following logical databases can be used as a data source for HR InfoSets:
    PNP
    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
    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.
    See also:
    HR InfoSets for InfoSet Query
    InfoSets in the HR Application

  • Asset Reporting - Copying Logical Database ADA

    Can you please assist with the following query?  I’m trying to include the following standard R3 ffields within standard R3 reports AR01 (Asset Balances) & AR18 (Depreciation Simulation):
                                    Table            Field Name            Data Element
    Serial Number            ANLA            SERNR                AM_SERNR
    Inventory Number       ANLA            IVNR                   INVNR_ANLA
    To date I have been unsuccessful in my endeavours.
    I have been discussing with an ABAPer and have been discussing the creation of Z transactions to give me the information I’m looking for.
    I’m looking for help, assistance and expertise whether the following would be recommended or even technically feasible.
    ·     Is it possible to copy logical database ADA to say ZADA (if yes how would I or the ABAPer go about this)?
    ·     Is there a way to link existing R3 reports to the new logical database
    As the majority of the R3 reports appear to be linked to ADA the aim is to amend this once and not require creating lots of Z reports.
    Any help you could provide would be greatly appreciated
    Best regards,
    Paul

    Hi Paul,
    this is strange, what release are you on?
    I have just checked AR01 on ECC 6.0, and it offers everything you need. On the selection screen of AR01, you can add selection criteria on both Serial number and Inventory number. Plus, you can display both fields in the ALV list.
    The data may be stored on table ANLA physically, but the logical database ADA is using a structure (ANLAV) instead. Both SERNR and INVNR are available in that structure. On the selection screen, you have to use the Dynamic selections button. And in the ALV list, you simply add the 2 columns, best idea wold be to save it as a variant for future use.
    Anyway, logical databases can be copied in SE36, you simply have to press the Copy button   The more critical issue is how to link standard reports to the new LDB. The answer is, no way. Instead, you should copy some of your favorite standard reports, and change the LDB in the copies.
    But, I really do not think you need this, as ADA can provide you with the information required out of the box.
    Hope that helps, points welcome
    Csaba

  • Multiple calling logical database ADA

    Hello,
    I need to call logical database ADA two times in my program. I use calling logical database using LDB_PROCESS function module. I need to call LDB for depreciation areas 01 and 60. If I call second time, I get exception  LDB_NOT_REENTRANT. I found, that for multiple calls of LDB, there should be LDB_PROCESS_INIT subroutine in logical database proram. In this case, program is SAPDBADA and in this program, LDB_PROCESS_INIT is missing.
    Could you pls. help me, how to call ADA logical database two times?
    Thanks&regards,
    Jirka

    The exception LDB_NOT_REENTRANT means: The logical database is not prepared to accept several successive calls within a transaction. So obviously you can't use LDB_PROCESS  for your purpose.
    Perhaps your goal is possible if you use a sequence of commands
    GET <ldb_node_1>.
    GET <ldb_node_1> LATE.
    GET <ldb_node_2>.
    GET <ldb_node_2> LATE.
    etc...
    where  ldb_node_1, ldb_node_2, etc... are some nodes included in logical database ADA. As I am not familiar with this particular LDB I can't tell which nodes are required to achieve your goal.

Maybe you are looking for

  • Media encoder renders soft video

    I noticed that when I render out a .wmv file for clients to review, it is very soft when I check the interlacing option.  I am using lower filed first material so this would obviously be the right option. If I don't chose that option, it must deinter

  • General questions about ditial signatures with livecycle

    Hi, I am interested in knowing the process how a user with Adobe Livecycle ES is able to sign one or more documents with a smartcard. eg. digitally signing 10 or 100 documents with his smartcard. Is it generally possible without downloading all those

  • Can Adobe Viewer only show free issues?

    I have noticed I can only access free issues in Adobe Viewer. Is this a limitation, or only a result of us using a custom sprint20 build? We would really like having the option to access non-free issues, because we have paid content-only.

  • ADD Auto Generate column to table

    Hi All, I drag my table from dataview , what I want is add new column to it ? I have tried but i couldnt , and add script to that column so it come auto generate int numbers? thanks

  • Help file won't come up

    Help file just began to say, "unable to find locale data files please reinstall? How do I do this?