Sap abap hr OM infotype

Hi All,
       I am creating a OM infotype. where in ppci i am getting some error like when i am clicking on create button it shaowing that
    the table was not created. but i created a table in se11 and also i activated it.here se11 its showing the is active but in ppci/ppcj  it showing ''infotype can not be created''.   plzzz thanks in advance.
shafi

HRP1000 : Stores all the OM object types for eg, O - Org Unit, S- Position, C- Jobs, K- Cost Centers etc
HRP1001 : Relationship between the object For eg, S (Position) Belongs to O (Org. Unit) etc
HRP1002 : Description for all the objects
HRP1003 : Department or Staff of the respective object, particularly O, S and P
Additional Data in SAP's HRP1001 tells you how to retrieve the u2018additional datau2019 for org management relationships (ADATANR in HRP1000, ADATA in P1001, tables T77AD and T77AR).
Reward if helpful

Similar Messages

  • Nodes statement in payroll in SAP ABAP hr  Report

    hi,
      i am working in sap abap hr report for payroll.i am using nodes statement in that report.it is showing error that ""PERNR" is not a node of the logical database __S".how can i solve this error.in this report.          
    NODES pernr .
    INFOTYPES: 0000, 0001, 2001.
    TABLES: t554s, pcl1, pcl2.
    INCLUDE rpclst00.
    INCLUDE rpc2rx09.                      "Payroll results datadefns-Intl.
    INCLUDE rpc2rxx0.                      "Payroll results datadefns-Intl.
    INCLUDE rpc2rgg0.                      "Payroll results datadefns-GB
    INCLUDE rpcfdcg0.                      "Payroll results datadefns-GB
    INCLUDE rpcdatg0.
    INCLUDE rpc2cd00.                      "Cluster Directory defns.
    INCLUDE rpc2ps00.                      "Cluster: Generierte Schematas
    INCLUDE rpc2pt00.
    INCLUDE rpcfdc10.
    INCLUDE rpcfdc00.
    INCLUDE rpppxd00.
    INCLUDE rpppxd10.
    INCLUDE rpcfvp09.
    INCLUDE rpcfvpg0.
    INCLUDE rpppxm00.
    TYPES: BEGIN OF t_salrate,
        seqnr    TYPE pc261-seqnr,
        begda    TYPE p2001-begda,
        endda    TYPE p2001-endda,
        split(2) TYPE c,
        val      TYPE p DECIMALS 2,
       END OF t_salrate.
    DATA: it_salrate TYPE STANDARD TABLE OF t_salrate INITIAL SIZE 0,
          wa_salrate TYPE t_salrate.
    *Selection screen
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: so_awart FOR p2001-awart.
    SELECTION-SCREEN END OF BLOCK block1.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    GET pernr.
    get payroll results data
      rp-init-buffer.
      CLEAR rgdir. REFRESH rgdir.
      CLEAR rt. REFRESH rt.
      CLEAR: rx-key.
    set key to current pernr
      MOVE pernr-pernr(8) TO cd-key-pernr.
    retrieves payroll results for specific pernr(personnel number)
      rp-imp-c2-cd.
      IF rp-imp-cd-subrc = 0.                                "rgdir success
        rx-key-pernr = pernr-pernr.
        SORT rgdir BY seqnr ASCENDING.
        CLEAR rgdir.
      ENDIF.
      SORT rgdir BY fpbeg fpend ASCENDING seqnr DESCENDING.
    RGDIR the table where all payroll results periods are stored
      LOOP AT rgdir WHERE  abkrs IN pnpabkrs        "pay area
                      AND  srtza EQ 'A'
                      AND  void  NE 'V'.
        IF sy-subrc NE 0.
        set key to specific payroll results period(current RGDIR loop pass)
          UNPACK rgdir-seqnr   TO   rx-key-seqno.
        Retrieves data for specific payroll results period (current RGDIR
        loop pass)
          rp-imp-c2-rg.
        Loop at wpbp data for specific payroll results period
          LOOP AT wpbp.
            wa_salrate-seqnr = rgdir-seqnr.
            wa_salrate-begda = wpbp-begda.
            wa_salrate-endda = wpbp-endda.
            wa_salrate-split = wpbp-apznr.
          loop at rt data for specific payroll results period
            LOOP AT rt WHERE lgart EQ '/010' AND             "wage type
                             apznr EQ wpbp-apznr.            "payroll split
              wa_salrate-val = ( rt-betpe * ( wpbp-adivi / wpbp-kdivi ) ).
              APPEND wa_salrate TO it_salrate.
            ENDLOOP.
          ENDLOOP.
        Process BT table
          LOOP AT BT.
          ENDLOOP.
        Process NIPAY table
          LOOP AT NIPAY.
          ENDLOOP.
        etc................
        ENDIF.
      ENDLOOP.
    *END-OF-SELECTION.
    END-OF-SELECTION.

    Hi,
    Have you put a Logical Database in the attributes of the program that you have created ?
    Regards,
    Samson Rodrigues.

  • Report for time log on detail for each employees in SAP ABAP-HR report

    hi experts,
          please help me .how to create a report for time log on detail for each employees in SAP ABAP-HR report.please help me.
                                                      thank you

    Hi,
    For Time Management Infotypes , If you want to read the data using macro you need to use the Macro called RP_READ_ALL_TIME_ITY
    Example:
    DATA: BEGDA LIKE P2001-BEGDA, ENDDA LIKE P2001-ENDDA.
       INFOTYPES:  0000, 0001, 0002, ...
                         2001 MODE N, 2002 MODE N, ...
         GET PERNR.
       BEGDA = '19900101'. ENDDA = '19900131'.
       RP_READ_ALL_TIME_ITY BEGDA ENDDA.
       IF PNP-SW-AUTH-SKIPPED-RECORD NE '0'.
          WRITE: / 'Authorization for time data missing'.
          WRITE: / 'for personnel number', PERNR-PERNR. REJECT.
       ENDIF.

  • SAP Query on Custom Infotypes

    Dear friends,
       Is it possible to generate SAP Query on Custom Infotypes.
       As I am trying them and while creating Infogroup on my custom Infotype fields, It is not getting generated.
       Could you please suggest how to proceed.
    Thanks in Advance,
    Regards,
    Satya.

    hi,
    I think its not possible to fetch custom infotype fields using SAP Query....ask your abap consultant to write a simple report...that wil do....

  • SAP ABAP HR

    Hi All,
    I am Working as an sap ABAP Consultant, As i want to move to the advance programming like ABAP HR ,WORKFLOW i need some suggestions to go learn it in best way.
    I need the best books for sap abap hr ,workflow mainly press books.
    Any suggestions would be a great help.
    Thanks,
    Pavan

    Pavan,
    Although I believe that you may be able to find some good choices of SAP books to use as reference guides, I believe a good starting point would be focusing your research, figuring out the underlying tables (infotypes in HR) and transactions codes you will be working with.  I have included a few general points below that I hope you will find helpful:
    ABAP Development for HR has some fundamental differences than what you may be accustomed to, for example
    We use logical databases (PNP/PCH) extensively in HCM.
    ROUTINES and PROVIDE/ENDPROVIDE are typically used instead of select statements.
    HR functional modules tend to begin with HR* or RH*.
    Records are time sensitive; therefore, you will need to fetch records based on a certain date that falls between BEGDA and ENDDA
    Depending on what area of HR you will be working, you will need to familiarize yourself with the appropriate infotypes, for example
    Personnel Area infotypes fall between PA0000 – PA19999
    Time infotypes fall between PA2000 – PA29999
    Custom infotypes fall between PA9000 – PA9999
    I suggest looking at transaction PA20/PA30 to get an understanding on how the infotypes are related and how the data is organized in the system.  Actions are used to configure the screens/order for data entry in PA30 (i.e. Hiring action, reactivating action, terminating action, etc…). The following link contains a pretty extensive list of HR transaction codes:http://wiki.scn.sap.com/wiki/display/ERPHCM/SAP+HR+Transaction+Codes
    You can find some more specifics and examples in the following thread:
    http://scn.sap.com/thread/729258
    Lastly, I know that others have suggested the "SAP HR Technical Principals and Programming" book by SAP Press for prospective SAP HCM developers.
    Good luck on your journey through ABAP HR and I hope you find the above to be a helpful start!
    Regards,
    Sam

  • Employee details in SAP ABAP Hr

    hi folks,
    do any one hav done Report -Employee details in SAP ABAP Hr.

    check this code
    *                        INFOTYPES                             *
    INFOTYPES : 0000,     " Actions
                0001,     " Organizaiton Assignment
                0002,     " Personnel Data
                0008,     " Basic Pay
                0022,     " Education
                0025,     " Appraisals
                0077,     " Additional Personal Data
                2001,     " Absences
                9002,     " Additional Personal Data
                9545,     " Discipline data
                0000 NAME INT_PROM,
                0000 NAME INT_CHGPY,
                0302.
    *                        INCLUDES                             *
    *                        TABLES                                *
    TABLES    : PERNR.
    *                        CONSTANTS                             *
    CONSTANTS : C_ONE      TYPE CHAR1  VALUE '1',
                C_EARLY    TYPE CHAR1  VALUE 'E',
                C_NEW      TYPE CHAR1  VALUE 'N',
                C_EARLYDT  TYPE SY-DATUM VALUE '20000501',
                C_JAN      TYPE CHAR2  VALUE '01',
                C_FEB      TYPE CHAR2  VALUE '02',
                C_MAR      TYPE CHAR2  VALUE '03',
                C_AWL      TYPE CHAR3  VALUE 'AWL',
                C_LWP      TYPE CHAR3  VALUE 'LWP'.
    *                        TYPES                                 *
    TYPE-POOLS: SLIS.                      " ALV Type Pool
    TYPES  :
             BEGIN OF T_DISCACT,
               PERNR  TYPE CHAR8,
               COMM1  TYPE CHAR1,
               DESCRI TYPE CHAR40,
               COMM2  TYPE CHAR1,
               MDATE  TYPE CHAR10,
             END OF T_DISCACT,
             BEGIN OF T_INCRE,
               PERNR  TYPE CHAR8,
               INCR1 TYPE CHAR10,
               INCR2 TYPE CHAR10,
               INCR3 TYPE CHAR10,
             END OF T_INCRE,
             BEGIN OF T_OUTPUT,
               PERNR TYPE CHAR8,
               NAME  TYPE CHAR40,
               DESIG TYPE CHAR40,
               PESUB TYPE CHAR15,
               ORGUN TYPE CHAR40,
               COSTC TYPE CHAR20,
               ETHIC TYPE CHAR2,
               CPCODE TYPE ZCCODE,
               GRADE TYPE CHAR8,
               ***   TYPE CHAR6,
               DOB   TYPE CHAR10,
               DOJ   TYPE CHAR10,
               QUAL1 TYPE CHAR30,
               QUAL2 TYPE CHAR30,
               QUAL3 TYPE CHAR30,
               QUAL4 TYPE CHAR30,
               QUAL5 TYPE CHAR30,
               LPROM TYPE CHAR10,
               PROMD TYPE CHAR10,
               PROMT TYPE CHAR1,
               NOYRS TYPE CHAR2,
               AWL   TYPE CHAR9,
               LWP   TYPE CHAR9,
               APPR1 TYPE CHAR9,
               APPR2 TYPE CHAR9,
               APPR3 TYPE CHAR9,
               APPR4 TYPE CHAR9,
               APPR5 TYPE CHAR9,
               DISCI TYPE CHAR57,
             END   OF T_OUTPUT.
    DATA : W_OUTPUT TYPE T_OUTPUT.
    TYPES  :  BEGIN OF T_FILE.
            INCLUDE STRUCTURE W_OUTPUT.
    TYPES  :   INCR1 TYPE CHAR10,
               INCR2 TYPE CHAR10,
               INCR3 TYPE CHAR10,
              END OF T_FILE.
    DATA  : W_FILE TYPE T_FILE.
    TYPES : BEGIN  OF T_EXCEL.
            INCLUDE STRUCTURE W_FILE.
    TYPES :  END OF T_EXCEL.
    *                        INTERNAL TABLES                       *
    DATA   : INT_NONEXE  TYPE STANDARD TABLE OF ZHRT007   WITH HEADER LINE,
             INT_OUTPUT  TYPE STANDARD TABLE OF T_OUTPUT  WITH HEADER LINE,
             INT_DISCACT TYPE STANDARD TABLE OF T_DISCACT WITH HEADER LINE,
             INT_QUALFI  TYPE STANDARD TABLE OF T518B     WITH HEADER LINE,
             INT_INCRE   TYPE STANDARD TABLE OF T_INCRE   WITH HEADER LINE,
             INT_DISCIP  TYPE STANDARD TABLE OF ZHRT004   WITH HEADER LINE,
             INT_PESUB   TYPE STANDARD TABLE OF T001P     WITH HEADER LINE,
             INT_COSTC   TYPE STANDARD TABLE OF CSKT      WITH HEADER LINE,
             INT_EXCEL   TYPE STANDARD TABLE OF T_EXCEL   WITH HEADER LINE,
             EVENT       TYPE SLIS_T_EVENT WITH HEADER LINE,
             LISTHEAD    TYPE SLIS_T_LISTHEADER WITH HEADER LINE.
    *                        VARIABLES                             *
    DATA : W_HIREDATE TYPE BEGDA,
           W_WAGEGRP  TYPE TRFGR,
           W_CPCODE   TYPE ZCCODE,
           W_CAREERCD TYPE CHAR6,
           W_PROMTYPE TYPE ZTSTYPE,
           W_NOOFYRS  TYPE ZNOYRS,
           W_LASTPROM TYPE CHAR10,
           W_PROMDATE TYPE BEGDA,
           W_YEAR     TYPE CHAR4,
           W_APYEAR   TYPE CHAR4,
           W_APPRST   TYPE SY-DATUM,
           W_DISDATE  TYPE ENDDA,
           W_APPREND  TYPE ENDDA,
           W_ABSST    TYPE ENDDA,
           W_ABSEND   TYPE ENDDA,
           W_ABSYR    TYPE CHAR4,
           W_MONTH(2) TYPE N,
           W_AWL      TYPE CHAR9,
           W_LWP      TYPE CHAR9,
           W_DISCI    TYPE T_OUTPUT-DISCI,
           W_ONE(2)   TYPE N VALUE '01',
           W_CURDATE TYPE CHAR10,
           W_HEADING TYPE LVC_TITLE.
    *                        SELECTION SCREEN                      *
    SELECTION-SCREEN BEGIN OF BLOCK FRM1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
      S_WAGRP    FOR  P0008-TRFGR OBLIGATORY,
      S_FROM     FOR  P0000-BEGDA OBLIGATORY NO-EXTENSION.
    SELECTION-SCREEN END OF BLOCK FRM1.
    * Selection screen serach help for wage groups.
    INCLUDE : ZHRI0003.
    *                        AT SELECTION SCREEN                   *
    *                        START OF SELECTION                    *
    START-OF-SELECTION.
      PERFORM PU_EXEUTIVES_PROM.
      IF S_FROM-HIGH IS INITIAL.
        S_FROM-HIGH = SY-DATUM.
      ENDIF.
    *Fetching employee data for all infotypes.
    GET PERNR.
      PERFORM  PU_DATA_RETRIEVAL.
    *                        START OF SELECTION                    *
    END-OF-SELECTION.
      PERFORM PU_FINAL_TABLE.
      PERFORM PU_GRID_DISPLAY.
      PERFORM PU_FREE_TABLES.
    *                        SUBROUTINES                           *
    *&      Form  PU_DATA_RETRIEVAL
    FORM PU_DATA_RETRIEVAL .
    * To find out date of join for employee
      PERFORM PU_DATA_OF_JOIN.
    * Employee Personnel data
      RP_PROVIDE_FROM_LAST P0002 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND NE C_ONE.
        REJECT.
      ENDIF.
    * Employee Name into output table
      INT_OUTPUT-NAME = P0002-VORNA.
    *  INT_OUTPUT-DOB  = P0002-GBDAT.
      PERFORM PU_DATE_CONVERSION USING    P0002-GBDAT
                                 CHANGING INT_OUTPUT-DOB.
      IF P0002-GESCH EQ 1.
        INT_OUTPUT-***  = 'Male'.
      ELSE.
        INT_OUTPUT-***  = 'Female'.
      ENDIF.
    * Fetching employees from employee sub goup of Non Executive
      RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND NE C_ONE.
        REJECT.
      ENDIF.
      IF P0001-PERSK  EQ '30' OR P0001-PERSK  EQ '20'.
    * Position for employee into output table
        PERFORM  PU_POSTION_TEXT.
      ELSE.
        REJECT.
      ENDIF.
    * Position for employee into output table
      PERFORM  PU_POSTION_TEXT.
    * Persoonel Sub Area text .
      READ TABLE INT_PESUB WITH KEY WERKS = P0001-WERKS
                                    BTRTL = P0001-BTRTL.
      IF SY-SUBRC EQ 0.
        INT_OUTPUT-PESUB = INT_PESUB-BTEXT.
      ENDIF.
      READ TABLE INT_COSTC WITH KEY KOSTL = P0001-KOSTL.
      IF SY-SUBRC EQ 0.
        INT_OUTPUT-COSTC = INT_COSTC-KTEXT.
      ENDIF.
    * Fetching employees from Additional Personal Data
      RP_PROVIDE_FROM_LAST P0077 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ C_ONE.
    * Ethnic origin of employee  into output table
        INT_OUTPUT-ETHIC = P0077-RACKY.
      ENDIF.
    * Selecting data from  basic pay last record with wage group
      RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND NE C_ONE.
        REJECT.
      ELSE.
        W_WAGEGRP = P0008-TRFGR.
    * Employee Pay Scale Group  into output table
        INT_OUTPUT-GRADE = P0008-TRFGR.
      ENDIF.
    * Selecting data from  Education with wage group
      SORT P0022 BY BEGDA.
      PROVIDE * FROM P0022 BETWEEN PN-BEGDA AND PN-ENDDA.
        IF SY-TABIX EQ 1.
          READ TABLE INT_QUALFI WITH KEY AUSBI = P0022-AUSBI.
          IF SY-SUBRC EQ 0.
            INT_OUTPUT-QUAL1 = INT_QUALFI-ATEXT.
          ENDIF.
        ELSEIF SY-TABIX EQ 2.
          READ TABLE INT_QUALFI WITH KEY AUSBI = P0022-AUSBI.
          IF SY-SUBRC EQ 0.
            INT_OUTPUT-QUAL2 = INT_QUALFI-ATEXT.
          ENDIF.
        ELSEIF SY-TABIX EQ 3.
          READ TABLE INT_QUALFI WITH KEY AUSBI = P0022-AUSBI.
          IF SY-SUBRC EQ 0.
            INT_OUTPUT-QUAL3 = INT_QUALFI-ATEXT.
          ENDIF.
        ELSEIF SY-TABIX EQ 4.
          READ TABLE INT_QUALFI WITH KEY AUSBI = P0022-AUSBI.
          IF SY-SUBRC EQ 0.
            INT_OUTPUT-QUAL4 = INT_QUALFI-ATEXT.
          ENDIF.
        ELSEIF SY-TABIX EQ 5.
          READ TABLE INT_QUALFI WITH KEY AUSBI = P0022-AUSBI.
          IF SY-SUBRC EQ 0.
            INT_OUTPUT-QUAL5 = INT_QUALFI-ATEXT.
          ENDIF.
        ENDIF.
      ENDPROVIDE.
    * Carrer path code for employee from Additional Personal Data.
      RP_PROVIDE_FROM_LAST P9002 SPACE PN-BEGDA PN-ENDDA.
      IF PNP-SW-FOUND EQ C_ONE.
        W_CPCODE  = P9002-CPCODE.
        INT_OUTPUT-CPCODE = P9002-CPCODE.
        IF W_CPCODE EQ '001'.
          IF W_HIREDATE < C_EARLYDT.
            CONCATENATE W_CPCODE
                        C_EARLY
                  INTO  W_CAREERCD.
          ELSE.
            CONCATENATE W_CPCODE
                        C_NEW
                  INTO  W_CAREERCD.
          ENDIF.
        ELSE.
          W_CAREERCD = W_CPCODE.
        ENDIF.
      ENDIF.
    * Detrmine Promotion by Test/Service
      READ TABLE INT_NONEXE WITH KEY CPCODE    = W_CAREERCD
                                     WAGEGROUP = W_WAGEGRP.
      IF SY-SUBRC EQ 0.
        W_PROMTYPE = INT_NONEXE-TSTYPE.
        W_NOOFYRS  = INT_NONEXE-NOYRS.
        INT_OUTPUT-PROMT = W_PROMTYPE.
        INT_OUTPUT-NOYRS = W_NOOFYRS.
      ENDIF.
    * Retriving last promotion date from actions
      DELETE INT_PROM WHERE MASSN NE 'B3'.
      SORT INT_PROM BY BEGDA DESCENDING.
    *  RP_PROVIDE_FROM_LAST INT_PROM SPACE PN-BEGDA PN-ENDDA.
      READ TABLE INT_PROM INDEX 1.
      IF SY-SUBRC EQ 0 AND INT_PROM-MASSN EQ 'B3'.
        PERFORM PU_DATE_CONVERSION USING  INT_PROM-BEGDA
                                 CHANGING W_LASTPROM.
      ELSE.
        PERFORM PU_DATE_CONVERSION USING  W_HIREDATE
                                   CHANGING W_LASTPROM.
      ENDIF.
    *  As there is no ending date for records which happen on same date
    *  for cross check to get last promotion Infotype 0302' is retived
      IF P0302[] IS NOT INITIAL.
        DELETE P0302 WHERE MASSN NE 'B3'.
        SORT  P0302 BY BEGDA DESCENDING.
        READ TABLE P0302 INDEX 1.
        IF SY-SUBRC EQ 0 AND
           INT_PROM-BEGDA IS NOT INITIAL.
          IF INT_PROM-BEGDA < P0302-BEGDA.
            PERFORM PU_DATE_CONVERSION USING  P0302-BEGDA
                                     CHANGING W_LASTPROM.
          ENDIF.
        ENDIF.
      ENDIF.
      IF W_LASTPROM+0(2) GT '01'.
        W_LASTPROM+0(2) = '01'.
        W_ONE = W_LASTPROM+3(2) + 1.
        W_LASTPROM+3(2) =  W_ONE.
      ENDIF.
    * Last promaotion date for Employee into output table
      INT_OUTPUT-LPROM =  W_LASTPROM.
    * To Find out promotion due date for employee.
    * Fetching service availabilty data
      W_YEAR     =  W_LASTPROM+6(4).
      W_YEAR     =  W_YEAR + W_NOOFYRS.
      CONCATENATE  W_YEAR
                     W_LASTPROM+3(2)
                   W_LASTPROM+0(2)
              INTO W_PROMDATE.
    * Check promotion duedate is with in input range.
      IF S_FROM-LOW IS NOT INITIAL.
        CHECK W_PROMDATE GE S_FROM-LOW.
      ENDIF.
      IF S_FROM-HIGH IS NOT INITIAL.
        CHECK W_PROMDATE LE S_FROM-HIGH.
      ENDIF.
    * Promaotion due date for Employee into output table
      PERFORM PU_DATE_CONVERSION USING    W_PROMDATE
                                 CHANGING INT_OUTPUT-PROMD.
    * Apprisal rating data.
    * If promotion month is JAN,FEB,MAR deduct 6 years
      IF W_PROMDATE+4(2) EQ C_JAN OR
         W_PROMDATE+4(2) EQ C_FEB OR
         W_PROMDATE+4(2) EQ C_MAR.
        CLEAR W_YEAR.
        W_YEAR   = W_PROMDATE+0(4).
        W_APYEAR = W_YEAR - 1.
        W_YEAR   = W_YEAR - 6.
      ELSE.
    * If promotion month is not JAN,FEB,MAR deduct 5 years
        W_YEAR   = W_PROMDATE+0(4).
        W_APYEAR = W_YEAR.
        W_YEAR   = W_YEAR - 5.
      ENDIF.
      CONCATENATE  W_YEAR
                   '0401'
              INTO W_APPRST.
      CONCATENATE  W_APYEAR
                   '0331'
              INTO W_APPREND.
      DELETE P0025 WHERE BEGDA LT W_APPRST
                      OR BEGDA GT W_APPREND.
      PROVIDE * FROM P0025 BETWEEN PN-BEGDA AND PN-ENDDA.
        IF SY-TABIX EQ 1.
          INT_OUTPUT-APPR1 = P0025-KSU01.
        ELSEIF SY-TABIX EQ 2.
          INT_OUTPUT-APPR2 = P0025-KSU01.
        ELSEIF SY-TABIX EQ 3.
          INT_OUTPUT-APPR3 = P0025-KSU01.
        ELSEIF SY-TABIX EQ 4.
          INT_OUTPUT-APPR4 = P0025-KSU01.
        ELSEIF SY-TABIX EQ 5.
          INT_OUTPUT-APPR5 = P0025-KSU01.
        ENDIF.
      ENDPROVIDE.
    * Absence data.
      IF W_PROMDATE+4(2) EQ C_JAN.
        CLEAR W_YEAR.
        W_YEAR   = W_PROMDATE+0(4).
        W_ABSYR  = W_YEAR - 1.
        W_MONTH  = '11'.
        W_YEAR   = W_YEAR - 2.
      ELSE.
    * If promotion month is not JAN,FEB,MAR deduct 5 years
        W_YEAR   = W_PROMDATE+0(4).
        W_ABSYR  = W_YEAR.
        W_MONTH  = W_PROMDATE+4(2).
        W_MONTH  = W_MONTH - 01.
        W_YEAR   = W_YEAR - 1.
      ENDIF.
      CONCATENATE W_YEAR
                  W_MONTH
                  '23'
             INTO W_ABSST.
      CONCATENATE  W_ABSYR
                   W_MONTH
                   '22'
              INTO W_ABSEND.
      SORT   P2001 BY BEGDA.
      DELETE P2001 WHERE ( AWART NE C_AWL AND
                           AWART NE C_LWP )  OR
                         ( BEGDA LT W_ABSST
                     OR    BEGDA GT W_ABSEND ).
      PROVIDE * FROM P2001 BETWEEN PN-BEGDA AND PN-ENDDA.
        IF P2001-AWART  EQ  C_AWL.
          W_AWL = W_AWL + P2001-ABWTG.
        ELSEIF P2001-AWART  EQ  C_LWP.
          W_LWP = W_LWP + P2001-ABWTG.
        ENDIF.
      ENDPROVIDE.
      INT_OUTPUT-AWL = W_AWL.
      INT_OUTPUT-LWP = W_LWP.
    * Increments dates' data.
      DELETE INT_CHGPY WHERE MASSN NE 'B7'.
      SORT   INT_CHGPY BY BEGDA DESCENDING.
      IF INT_CHGPY[] IS NOT INITIAL.
        INT_INCRE-PERNR = INT_CHGPY-PERNR.
        PROVIDE * FROM INT_CHGPY  BETWEEN PN-BEGDA
                                      AND PN-ENDDA.
          IF SY-TABIX EQ 1.
            PERFORM PU_DATE_CONVERSION USING    INT_CHGPY-BEGDA
                                       CHANGING INT_INCRE-INCR1.
          ELSEIF SY-TABIX EQ 2.
            PERFORM PU_DATE_CONVERSION USING    INT_CHGPY-BEGDA
                                       CHANGING INT_INCRE-INCR2.
          ELSEIF SY-TABIX EQ 3.
            PERFORM PU_DATE_CONVERSION USING    INT_CHGPY-BEGDA
                                       CHANGING INT_INCRE-INCR3.
          ENDIF.
        ENDPROVIDE.
        APPEND INT_INCRE.
        CLEAR  INT_INCRE.
      ENDIF.
    * Disciplinary Actions.
      CLEAR W_YEAR.
      W_YEAR = W_PROMDATE+0(4).
      W_YEAR = W_YEAR - 3.
      CONCATENATE  W_YEAR
                   W_PROMDATE+4(4)
              INTO W_DISDATE.
      SORT P9545 BY MDATE.
      DELETE P9545 WHERE MDATE LT W_DISDATE
                      OR MDATE GT W_PROMDATE.
      PROVIDE * FROM P9545 BETWEEN PN-BEGDA
                              AND  PN-ENDDA.
        READ TABLE INT_DISCIP WITH KEY MCODE = P9545-MCODE.
        IF SY-SUBRC EQ 0.
          INT_DISCACT-PERNR  = P9545-PERNR.
          INT_DISCACT-DESCRI = INT_DISCIP-DESCRI.
          PERFORM PU_DATE_CONVERSION USING    P9545-MDATE
                                     CHANGING INT_DISCACT-MDATE.
          INT_DISCACT-COMM1 = ','.
          INT_DISCACT-COMM2 = ','.
          APPEND INT_DISCACT.
          CLEAR  INT_DISCACT.
        ENDIF.
      ENDPROVIDE.
      APPEND INT_OUTPUT.
      CLEAR INT_OUTPUT.
      CLEAR : W_HIREDATE,W_WAGEGRP,W_CPCODE,W_CAREERCD,W_PROMTYPE,
              W_NOOFYRS,W_LASTPROM,W_PROMDATE,W_YEAR,W_APYEAR,
              W_APPRST,W_DISDATE,W_APPREND,W_ABSST,W_ABSEND,
              W_ABSYR,W_MONTH,W_AWL,W_LWP,W_DISCI.
    ENDFORM.                    " PU_DATA_RETRIEVAL
    *&      Form  PU_DATA_OF_JOIN
    FORM PU_DATA_OF_JOIN .
      CLEAR INT_OUTPUT.
      READ TABLE P0000 WITH KEY  MASSN = 'B1'.
      IF SY-SUBRC NE 0 OR  P0000-STAT2 NE '3'.
        REJECT.
      ELSE.
    * Personnel number into output table
        INT_OUTPUT-PERNR = P0000-PERNR.
        PERFORM PU_DATE_CONVERSION USING P0000-BEGDA
                                CHANGING INT_OUTPUT-DOJ.
        W_HIREDATE = P0000-BEGDA.
      ENDIF.
    ENDFORM.                    " PU_DATA_OF_JOIN
    *&      Form  PU_POSTION_TEXT
    FORM PU_POSTION_TEXT .
      DATA  : S_OBJECT TYPE OBJEC_T,
              PERNR_TAB  TYPE HRQUERY_PERNR_T ,
              SOBID_TAB  TYPE HRQUERY_SOBID_T ,
              WA_SOBID TYPE HRQUERY_SOBID,
              WA_PERNR TYPE HRQUERY_PERNR,
              WA_OBJECT TYPE OBJEC.
      WA_PERNR-PERNR = P0001-PERNR.
      APPEND WA_PERNR TO PERNR_TAB.
      WA_SOBID-PLVAR = '01'.
      WA_SOBID-OTYPE = P0001-OTYPE.
      WA_SOBID-SOBID = P0001-PLANS.
      APPEND WA_SOBID TO SOBID_TAB.
      WA_SOBID-PLVAR = '01'.
      WA_SOBID-OTYPE = 'O'.
      WA_SOBID-SOBID = P0001-ORGEH.
      APPEND WA_SOBID TO SOBID_TAB.
      CALL FUNCTION 'HR_GET_TEXT_FOR_OBJECTS'
        EXPORTING
          BEGDA       = PN-BEGDA
          ENDDA       = PN-ENDDA
        IMPORTING
          OBJEC_TAB   = S_OBJECT
        CHANGING
          PERNR_TAB   = PERNR_TAB
          SOBID_TAB   = SOBID_TAB
        EXCEPTIONS
          WRONG_DATES = 1
          OTHERS      = 2.
      IF SY-SUBRC EQ 0.
        LOOP AT S_OBJECT INTO WA_OBJECT.
          IF WA_OBJECT-OTYPE EQ 'O'.
            INT_OUTPUT-ORGUN = WA_OBJECT-STEXT.
          ELSEIF  WA_OBJECT-OTYPE EQ 'S'.
            INT_OUTPUT-DESIG = WA_OBJECT-STEXT.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " PU_POSTION_TEXT
    *&      Form  PU_EXEUTIVES_PROM
    FORM PU_EXEUTIVES_PROM .
      SELECT * FROM ZHRT007 INTO TABLE INT_NONEXE.
      SELECT * FROM ZHRT004 INTO TABLE INT_DISCIP.
      SELECT * FROM T001P   INTO TABLE INT_PESUB.
      SELECT * FROM CSKT    INTO TABLE INT_COSTC
                                 WHERE SPRAS EQ SY-LANGU.
      SELECT * FROM T518B   INTO TABLE INT_QUALFI
                                 WHERE LANGU EQ SY-LANGU.
    ENDFORM.                    " PU_EXEUTIVES_PROM
    *&      Form  PU_DATE_CONVERSION
    FORM PU_DATE_CONVERSION  USING    INPUT_DATE    TYPE SY-DATUM
                             CHANGING OUTPUT_DATE   TYPE CHAR10.
      CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
        EXPORTING
          DATE_INTERNAL            = INPUT_DATE
        IMPORTING
          DATE_EXTERNAL            = OUTPUT_DATE
        EXCEPTIONS
          DATE_INTERNAL_IS_INVALID = 1
          OTHERS                   = 2.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " PU_DATE_CONVERSION
    *&      Form  PU_FINAL_TABLE
    * Preparing final internal table for output to excel
    FORM PU_FINAL_TABLE .
      DATA : W_STR1(4)  TYPE N,
             W_STR2(4)  TYPE N,
             W_STR3(4)  TYPE N,
             W_EXSTR(4) TYPE N,
             W_ORSTR(4) TYPE N,
             W_INSTR(4) TYPE N,
             W_ONSTR(4) TYPE N,
             W_DISFLAG  TYPE CHAR1,
             W_INCFLAG  TYPE CHAR1.
      LOOP AT INT_OUTPUT.
        MOVE-CORRESPONDING INT_OUTPUT TO INT_EXCEL.
        LOOP AT INT_DISCACT WHERE PERNR = INT_OUTPUT-PERNR.
          IF SY-TABIX EQ 1.
            CONCATENATE INT_DISCACT-DESCRI
                         SPACE
                        INT_DISCACT-MDATE
                   INTO W_DISCI.
            INT_EXCEL-DISCI = W_DISCI.
          ELSE.
            W_DISFLAG = 1.
          ENDIF.
        ENDLOOP.
        LOOP AT INT_INCRE WHERE PERNR = INT_OUTPUT-PERNR.
          INT_EXCEL-INCR1 =  INT_INCRE-INCR1.
          INT_EXCEL-INCR2 =  INT_INCRE-INCR2.
          INT_EXCEL-INCR3 =  INT_INCRE-INCR3.
        ENDLOOP.
        APPEND INT_EXCEL.
        CLEAR  INT_EXCEL.
        CLEAR : W_STR1,W_STR2,W_STR3.
        IF W_DISFLAG EQ 1.
          W_ORSTR = W_EXSTR.
          LOOP AT INT_DISCACT WHERE PERNR = INT_OUTPUT-PERNR.
            IF SY-TABIX NE 1.
              CONCATENATE INT_DISCACT-DESCRI
                           SPACE
                          INT_DISCACT-MDATE
                     INTO W_DISCI.
              INT_EXCEL-DISCI = W_DISCI.
              APPEND INT_EXCEL.
              CLEAR  INT_EXCEL.
              CLEAR : W_STR2,W_EXSTR.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " PU_FINAL_TABLE
    *&      Form  PU_GRID_DISPLAY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM PU_GRID_DISPLAY .
      DATA W_GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
      PERFORM F_FIELDCAT_INIT USING 'IT_HEADER' W_GT_FIELDCAT[].
      IF INT_EXCEL[] IS NOT INITIAL.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM = SY-CPROG
            IT_FIELDCAT        = W_GT_FIELDCAT[]
            IT_EVENTS          = EVENT[]
          TABLES
            T_OUTTAB           = INT_EXCEL
          EXCEPTIONS
            PROGRAM_ERROR      = 1
            OTHERS             = 2.
        IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ELSE.
        MESSAGE S011(ZHR).
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " PU_GRID_DISPLAY
    *&      Form  F_FIELDCAT_INIT
    FORM F_FIELDCAT_INIT USING IT_TABLE
                               LT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'PERNR'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 14.
      LS_FIELDCAT-SELTEXT_L = 'Personnel Number'.
      LS_FIELDCAT-FIX_COLUMN = 'X'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'NAME'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 30.
      LS_FIELDCAT-SELTEXT_L    = 'Name'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'DESIG'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 25.
      LS_FIELDCAT-SELTEXT_L    = 'Desigination'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'PESUB'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 16.
      LS_FIELDCAT-SELTEXT_L    = 'Personnel Sub Area'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'ORGUN'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 25.
      LS_FIELDCAT-SELTEXT_L    = 'Organization Unit'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'COSTC'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 14.
      LS_FIELDCAT-SELTEXT_L    = 'Cost Center'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'ETHIC'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 6.
      LS_FIELDCAT-SELTEXT_L    = 'Ethic'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'CPCODE'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 7.
      LS_FIELDCAT-SELTEXT_L    = 'CPCode'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'GRADE'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    =  12.
      LS_FIELDCAT-SELTEXT_L    = 'Current Grade'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = '***'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 6.
      LS_FIELDCAT-SELTEXT_L    = 'Gender'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'DOB'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 11.
      LS_FIELDCAT-SELTEXT_L    = 'Date of Birth'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'DOJ'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 11.
      LS_FIELDCAT-SELTEXT_L    = 'Date of Join'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'QUAL1'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 13.
      LS_FIELDCAT-SELTEXT_L    = 'Qualification 1'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'QUAL2'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 13.
      LS_FIELDCAT-SELTEXT_L    = 'Qualification 2'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'QUAL3'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 13.
      LS_FIELDCAT-SELTEXT_L    = 'Qualification 3'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'QUAL4'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 13.
      LS_FIELDCAT-SELTEXT_L    = 'Qualification 4'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'QUAL5'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 13.
      LS_FIELDCAT-SELTEXT_L    = 'Qualification 5'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'LPROM'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 16.
      LS_FIELDCAT-SELTEXT_L    = 'Last Promotion Date'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'PROMD'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 16.
      LS_FIELDCAT-SELTEXT_L    = 'Promotion Due Date'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'PROMT'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 14.
      LS_FIELDCAT-SELTEXT_L    = 'Promotion Type'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'NOYRS'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = 'Number of Years'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'AWL'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 22.
      LS_FIELDCAT-SELTEXT_L    = 'Absence Without Leave'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'LWP'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 22.
      LS_FIELDCAT-SELTEXT_L    = 'Leave Without Pay'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'APPR1'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = 'Apprisal 1st'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'APPR2'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = 'Apprisal 2nd'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'APPR3'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = 'Apprisal 3rd'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'APPR4'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = 'Apprisal 4th'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'APPR5'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = 'Apprisal 5th'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'DISCI'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 60.
      LS_FIELDCAT-SELTEXT_L    = 'Disciplinary Actions - Date'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'INCR1'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = '1st Increment'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'INCR2'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = '2nd Increment'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'INCR3'.
      LS_FIELDCAT-TABNAME      = INT_EXCEL.
      LS_FIELDCAT-OUTPUTLEN    = 15.
      LS_FIELDCAT-SELTEXT_L    = '3rd Increment'.
      APPEND LS_FIELDCAT TO LT_FIELDCAT.
    ENDFORM.                    " F_FIELDCAT_INIT
    *&      Form  PU_FREE_TABLES
    FORM PU_FREE_TABLES .
      FREE :  INT_NONEXE  ,
              INT_OUTPUT  ,
              INT_DISCACT ,
              INT_QUALFI  ,
              INT_INCRE   ,
              INT_DISCIP  ,
              INT_PESUB   ,
              INT_COSTC   ,
              INT_EXCEL   ,
              EVENT       ,
              LISTHEAD    .
    ENDFORM.                    " PU_FREE_TABLES
    reward points if helpful
    Edited by: mohammed  abdul hai on Jul 25, 2008 7:21 PM

  • What is main deff  between indian payroll and us payroll in sap abap hr

    HI Experts,
    what is main deff  between indian payroll and us payroll in sap abap hr.
    Regards
    Naresh

    Hi,
    U.S payrolls:
    SAP has given country specific payrolls for more than 40countries Each country specific version is called country version.  Every country has a country specific payroll driver and pay roll schema based on modular international payroll driver and schema.  When sap says country version it includes country specific civil, tax laws, contributory and other tax laws (all these details are populated in the country specific info types).
    Some of them are:
    - Personnel data -address-6, bank details-7, personal data-2, challenges-4 etc..
    - Actions -0000 info type
    - Organizational data
    So when you run a payroll for a specific country, besides general information valid for the international pay roll, one needs to enter specific details in the particular info types for example if you are running U.S  pay roll you need enter SSN no. to uniquely identify an employee in the info type 0002-personal data.
    Besides the common infotypes these are some of the U.S pay roll specific infotypes that one has to configure in U.S pay roll.
    - Garnishment Order - Info type 019
    - Creating a Garnishment Order - Info type 0195
    Inidan PayRolls:-
    Indian pay roll besides common info types, uses specific info types from 0580 to 0590 and 0045 (loans infotype) -- these info types will capture the data related to all the major components of Indian pay roll.
    Hope this is helpful,
    Thanks
    Kalyan

  • Wht is SAP ABAP HR

    Hi all
    wht is SAP ABAP HR?

    HR deals with the INFOTYPES which are similar to Tables in General ABAP.
    There are different ways of fetching data from these infotypes.
    There are different areas in HR LIKE Personal Admn, Orgn Management, Benefits, Time amangement, Event Management, Payroll etc
    Infotypes for these areas are different from one another area.
    storing of records data in each type of area is different
    LDBS like PNP are used in HR programing.
    Instead of Select.. we use some ROUTINES and PROVIDE..ENDPROVIDE.. etc
    and in the case of Pay roll we use Clusters and we Import and Export them for data fetching.
    On the whole Normal ABAP is different from HR abap.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    sites regarding hr-abap:
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    You can see some Standard Program examples in this one ...
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    http://www.erpgenie.com/faq/hr.htm.
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    These are the FAQ's that might helps you as well.
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    http://www.atomhr.com/library_full.htm
    HR Long texts Upload
    Look at the below link
    BDC - hr maintain text
    Please refer to the following sample program for accessing PCH LDB.
    For concept to start with refer url:
    http://www.sap-press.de/download/dateien/860/sappress_mysap_hr_technical_principles2.pdf
    It contains info regarding PCH Reporting.
    REPORT zhsol010.
    TABLES: objec, gdstr.
    INFOTYPES: 0002, 0006, 1003.
    DATA: stabs LIKE p1003-stabs,
    name LIKE p0001-ename.
    INITIALIZATION.
    pchotype = 'O'.
    pchwegid = 'O-S-P'.
    GET objec.
    IF objec-otype = 'S'.
    CLEAR stabs.
    LOOP AT p1003 WHERE begda LE pc-endda
    AND endda GE pc-begda.
    IF p1003-stabs = 'X'.
    stabs = 'X'.
    WRITE : / objec-objid, objec-short, objec-stext.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF objec-otype = 'P' AND stabs = 'X'.
    PROVIDE vorna nachn FROM p0002
    subty telnr FROM p0006
    BETWEEN pc-begda and pc-endda
    WHERE p0006-subty = '1'.
    IF p0006_valid = 'X'.
    CONCATENATE p0002-vorna p0002-nachn INTO name
    SEPARATED BY space.
    WRITE: / name, p0006-telnr.
    SKIP.
    ENDIF.
    ENDPROVIDE.
    ENDIF.
    <b>sample code:</b>
    REPORT zpwtest .
    TABLES : t001 .
    TYPE-POOLS slis .
    DATA : t_t001     TYPE TABLE OF t001        ,
           t_abaplist TYPE TABLE OF abaplist    .
    DATA : w_abaplist TYPE abaplist .
    SELECT-OPTIONS : s_bukrs FOR t001-bukrs OBLIGATORY .
    PARAMETERS     : p_list  TYPE c NO-DISPLAY .
    START-OF-SELECTION .
      IF sy-batch = 'X' AND p_list IS INITIAL .
      Submit report and get list in memory
        SUBMIT zpwtest EXPORTING LIST TO MEMORY
                       WITH s_bukrs IN s_bukrs
                       WITH p_list = 'X'
                   AND RETURN.
      Get the list from memory.
        CALL FUNCTION 'LIST_FROM_MEMORY'
             TABLES
                  listobject = t_abaplist
             EXCEPTIONS
                  not_found  = 1
                  OTHERS     = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Send report to mail receipent
        PERFORM send_mail .
      ELSE.
        PERFORM select_data .
        PERFORM display_data .
      ENDIF.
    *SO_NEW_DOCUMENT_SEND_API1
    *&      Form  select_data
    FORM select_data.
      SELECT *
        INTO TABLE t_t001
        FROM t001
       WHERE bukrs IN s_bukrs .
    ENDFORM.                    " select_data
    *&      Form  display_data
    FORM display_data.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_structure_name = 'T001'
           TABLES
                t_outtab         = t_t001
           EXCEPTIONS
                program_error    = 1
                OTHERS           = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " display_data
    *&      Form  send_mail
    FORM send_mail.
      DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
            receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
            packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
            listobject LIKE abaplist OCCURS 10,
            compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
            w_object_hd_change LIKE sood1,
            compressed_size LIKE sy-index.
    Fot external email id
    receiver_list-recextnam = '[email protected]'.
    receiver_list-recesc = 'E'.
    receiver_list-sndart = 'INT'.
    receiver_list-sndpri = '1'.
    FOr internal email id
      receiver_list-recnam = sy-uname .
      receiver_list-esc_des = 'B'.
      APPEND receiver_list.
    General data
      w_object_hd_change-objla = sy-langu.
      w_object_hd_change-objnam = 'Object name'.
      w_object_hd_change-objsns = 'P'.
    Mail subject
      w_object_hd_change-objdes = 'Message subject'.
    Mail body
      APPEND 'Message content' TO message_content.
      CALL FUNCTION 'TABLE_COMPRESS'
           IMPORTING
                compressed_size = compressed_size
           TABLES
                in              = t_abaplist
                out             = compressed_attachment.
      DESCRIBE TABLE compressed_attachment.
      CLEAR packing_list.
      packing_list-transf_bin = 'X'.
      packing_list-head_start = 0.
      packing_list-head_num = 0.
      packing_list-body_start = 1.
      packing_list-body_num = sy-tfill.
      packing_list-objtp = 'ALI'.
      packing_list-objnam = 'Object name'.
      packing_list-objdes = 'Attachment description'.
      packing_list-objlen = compressed_size.
      APPEND packing_list.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                object_hd_change = w_object_hd_change
                object_type      = 'RAW'
                owner            = sy-uname
           TABLES
                objcont          = message_content
                receivers        = receiver_list
                packing_list     = packing_list
                att_cont         = compressed_attachment.
    ENDFORM.                    " send_mail
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • What is the difference between SAP HR module and SAP-ABAP-HR?

    what is the difference between SAP HR module and SAP-ABAP-HR?
    Thanks in advance..:)

    Hi,
    SAP-HR is software component like SAP-BASIS is a component.
    Its part of the CORE.
    As far as I know there is nothing like SAP-ABAP-HR.
    But ABAP offers some special syntax for HR though.
    Like INFOTYPES, PROVIDE ENDPROVDIE etc.
    Regards,
    Sesh

  • How to log in to the new installed SAP ABAP instance ?

    Dear Experts,
    In SAP ERP 2005 installation,
    I have done central system installation, Now I need to perform postinstallation steps,
    Could you please tell me,  how to log in to the new installed SAP ABAP instance and do the post installation?
    Regards,
    Madhavan K

    Hi,
    Check the list of post installation steps:
    http://www.saptechies.com/post-installation-steps-for-ecc-60/
    From my point of view basic post installation steps are:
    - Installing SAP License (from http://service.sap.com/licensekeys)
    - Setup TMS  (STMS)
    - Import profiles (RZ10)
    - Client Copy (SCC*)
    - Create users (SU01)
    However further many steps are required as per your requirements. Cehck the link for more detailed steps.
    Regards,
    Srikishan

  • Where do i find daily posted question on sap abap and sap webdynpro abap

    Hi
    where do we find Daily posted questions on sap abap and sap webdynpro abap in scn sap  so that i can go through the questions and answer them .

    Hi,
    Go to the Content tab of any space and click on discussions. Then you can sort them by date created or any other
    For ex: This link for WDA discussions: - Web Dynpro ABAP
    You can also click on Receive email notifications for any space to get updates on that space.
    hope this helps,
    Regards,
    Kiran

  • Is SAP ABAP suitable w.r.t. my qualification and experience ? If NOT, which would be a suitable alternative ?

    Hello SAP Cummunity,
    I am very much interested in take up SAP course but like everyone very much confused. Firstly let me tell a brief about myself,
    - I have graduated in Bachelor of Engineering (Biotechnology)
    - After B.E., I took up PGDM (Marketing and Finance).
    - As my interest is more inclined towards Marketing, I took up job related to Sales.
    - Presently working for FMCG Sector as Sales Executive.
    Plz suggest me is SAP ABAP suitable for me ?

    Hi Harshith,
    There´re many SAP Certifications. You can read Frequently
    Asked Questions about SAP Certification, and browse The Training
    and Certification Shop Catalog. Find a list of currently valid certifications in the
    "By
    Role". section.
    Best regards,
    S.Saleem

  • Error in ABAP Mapping (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION)

    Hi ,
      Scenario:  Manually Purchase Order is created, automatically Sales Order should be created in the Target System through PI,
                       I have used Message Mapping which is working fine for single Customer and Vendor,
                       For Multiple Customers and Vendors i am using one ZTABLE, Only Message Mapping is not  sufficient to my requirement.
                      Now i am using both Message Mapping and   ABAP Mapping  at a time in Interface Mapping. I created the class and                done  the   development., whene  i run the scenario i am getting the error as below,
    *<SAP:Stack>Error in mapping program ZCL_SD_IDTO_POSO (type SAP-ABAP, kernel error ID UNCAUGHT_EXCEPTION) An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference</SAP:Stack>*
      *<SAP:Retry>M</SAP:Retry>*
      *</SAP:Error>* 
    Please let me know.
    Best Regards
    Vamsi

    Have u seen the ABAP mapping guide?
    Refer this series to the ABAP mapping section.https:///people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii
    It will be very handy and useful.

  • Problem while fetching more records in SAP ABAP report program

    Hello Frinds,
    I have SAP ABAP report program which fetches data from usr02 table
    Now, program is working fine with less number of records, bot in production there are more than 200000 records and either report gets timed out or there is run time error like buffer area not available.
    Below is the fetch statement
    SELECT bname FROM usr02 INTO TABLE lt_user
    So, do I need to take records in small chunks, I do not think it is needed as I have worked on number of othere databases where there are number of records in single fetch statement and database itself take care of this.
    Please provide me some approach to resolve this problem.

    This will be very difficult for you.....
    Since you are getting a time out error....it looks like, you are runnning this report in foreground....................
    Try running it in background it will work...
    ELSE....you have to fetch in small chunks....but the question is how will you do it. Since the USR02 only has BNAME as primary key...
    Either put the BNAME as part of selection screen and fetch the data.....it will solve your problem....
    Only fetch for those BNAME which is entered in the selection screen...
    Hope it helps!

  • ALV and Interactive Reports in SAP ABAP?

    Hi All,
           What type of reports we can generate in SAP ABAP using ALV & Interactive in real time Scenario? Do SAP provides some Standard reports? Plz give some examples?
    Thanks in Advance.

    Hi Mohnish,
    You can refer the following  ALV sample code :
    TYPE-POOLS: slis.
    TABLES : afko,afpo .
    +-- Data declarations--+
    DATA : BEGIN OF it_afpo OCCURS 0,
           AUFNR LIKE afpo-AUFNR,
           PSMNG LIKE afpo-PSMNG,
           WEMNG LIKE afpo-WEMNG,
           PWERK LIKE afpo-PWERK,
           DAUAT LIKE afpo-DAUAT,
          END OF it_afpo.
    DATA : BEGIN OF it_afko OCCURS 0,
           AUFNR LIKE afko-AUFNR,
           GSTRP LIKE afko-GSTRP,
           GSTRS LIKE afko-GSTRS,
           GSTRI LIKE afko-GSTRI,
           GSUZI LIKE afko-GSUZI,
           PLNBEZ LIKE AFKO-PLNBEZ,
          END OF it_afko.
    DATA : BEGIN OF it_makt OCCURS 0,
            matnr TYPE matnr,
            maktx TYPE maktx,
           END   OF it_makt.
    DATA : BEGIN OF it_output OCCURS 0,
          AUFNR LIKE afpo-AUFNR,
          PSMNG LIKE afpo-PSMNG,
          WEMNG LIKE afpo-WEMNG,
          DAUAT LIKE afpo-DAUAT,
          GSTRP LIKE afko-GSTRP,
          GSTRS LIKE afko-GSTRS,
          GSTRI LIKE afko-GSTRI,
          GSUZI LIKE afko-GSUZI,
          PLNBEZ LIKE AFKO-PLNBEZ,
          matnr LIKE makt-matnr,
          maktx LIKE makt-maktx,
          END OF it_output.
    DATA: wa_output LIKE it_output,
         wa_afpo LIKE it_afpo,
         wa_afko LIKE it_afko,
         wa_makt like it_makt.
    DATA : wk_date1(10) TYPE c,
           wk_date2(10) TYPE c,
           wk_datehead TYPE string.
    +--Selection screen parameters--+
    INITIALIZATION.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
      SELECT-OPTIONS: s_matnr FOR afpo-matnr.
      PARAMETERS : p_pwerk type afpo-pwerk OBLIGATORY.
      SELECT-OPTIONS: s_dauat for afpo-dauat OBLIGATORY,
                       s_gstrp for afko-GSTRP OBLIGATORY.
      SELECTION-SCREEN END OF BLOCK b1.
    --internal tables for alv--
      DATA : gt_fieldcat TYPE slis_t_fieldcat_alv, "catalog for alv
      gt_heading TYPE slis_t_listheader, "list for header1
      gt_sort TYPE slis_t_sortinfo_alv, "Sorting of the
      gt_event TYPE slis_t_event,
      gt_selfield TYPE slis_selfield,
      gv_alv_event TYPE slis_alv_event,
      gv_repname TYPE sy-repid,
      gs_layout TYPE slis_layout_alv,
      gv_save TYPE c.
      CONSTANTS gc_forname_top_of_page TYPE slis_formname VALUE
    'TOP-OF-PAGE'.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM output_data.
      PERFORM build_comment USING gt_heading[].
      PERFORM eventstab.
      PERFORM sub_t_sort_build.
      PERFORM build_field_catalog.
      PERFORM display_data.
    --Data selection--
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data.
      select AUFNR
             PSMNG
             WEMNG
             MATNR
             PWERK
             DAUAT
             from afpo  CLIENT SPECIFIED
             INTO TABLE it_afpo
             WHERE mandt = sy-mandt
                      AND matnr IN s_matnr
                      and pwerk = p_pwerk
                      and dauat in s_dauat.
      select AUFNR
             GSTRP
             GSTRS
             GSTRI
             GSUZI
             PLNBEZ
             from afko CLIENT SPECIFIED
             INTO table it_afko
             FOR ALL ENTRIES IN it_afpo
             WHERE mandt = sy-mandt
                      AND aufnr = it_afpo-aufnr
                      and gstrp in s_gstrp.
      SELECT  matnr
                maktx
                FROM makt
                INTO  table it_makt
                FOR ALL ENTRIES IN it_afKo
                WHERE matnr = it_afKo-PLNBEZ.
    ENDFORM.                    " get_data
    *&      Form  output_data
          text
    -->  p1        text
    <--  p2        text
    FORM output_data.
      loop at it_afko into wa_afko.
        LOOP AT it_afpo into wa_afpo
        WHERE aufnr = wa_afKo-aufnr.
          wa_output-AUFNR = wa_afpo-AUFNR.
          wa_output-PSMNG = wa_afpo-PSMNG.
          wa_output-WEMNG = wa_afpo-WEMNG.
          wa_output-DAUAT = wa_afpo-DAUAT.
        ENDLOOP.
        loop at it_makt into wa_makt
        where matnr = wa_afKo-PLNBEZ.
          wa_output-matnr = wa_makt-matnr.
          wa_output-maktx = wa_makt-maktx.
        endloop.
        wa_output-GSTRP = wa_afko-GSTRP.
        wa_output-GSTRS = wa_afko-GSTRS.
        wa_output-GSTRI = wa_afko-GSTRI.
        wa_output-GSUZI = wa_afko-GSUZI.
        APPEND wa_output TO it_output.
      ENDLOOP.
      CLEAR wa_afpo.
      CLEAR wa_afko.
      CLEAR wa_output.
    SORT IT_OUTPUT BY GSTRP GSUZI.
    ENDFORM.                    " output_data
    --Header for ALV--
    *&      Form  build_comment
          text
         -->P_GT_HEADING[]  text
    FORM build_comment USING  p_heading TYPE slis_t_listheader.
      DATA : ls_header TYPE slis_listheader.
    *--poputale the report header info
      ls_header-typ = 'H'.
      MOVE : text-002 TO ls_header-info.
      APPEND ls_header TO p_heading.
      CLEAR ls_header.
      ls_header-typ  = 'S'.
      ls_header-key  = text-013 .
      "'User:'
      ls_header-info = sy-uname.
      APPEND ls_header TO p_heading.
      CLEAR: ls_header.
    ENDFORM.                    " build_comment
    *&      Form  eventstab
          text
    -->  p1        text
    <--  p2        text
    FORM eventstab.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type     = 0
           IMPORTING
                et_events       = gt_event
           EXCEPTIONS
                list_type_wrong = 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.
      READ TABLE gt_event
      WITH KEY name = slis_ev_top_of_page
      INTO gv_alv_event.
      IF sy-subrc EQ 0.
        MOVE gc_forname_top_of_page TO gv_alv_event-form.
        APPEND gv_alv_event TO gt_event.
      ENDIF.
    ENDFORM.                    " eventstab
    *&      Form  build_field_catalog
          text
    -->  p1        text
    <--  p2        text
    FORM build_field_catalog.
      DATA ls_fieldcat TYPE slis_fieldcat_alv.
      CLEAR ls_fieldcat.
      ls_fieldcat-col_pos = 1.
      ls_fieldcat-fieldname = 'DAUAT'.
      ls_fieldcat-outputlen = 12.
      ls_fieldcat-tabname = 'it_output'.
      ls_fieldcat-seltext_l = 'Order Type'.
      ls_fieldcat-KEY = 'X'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-col_pos = 2.
      ls_fieldcat-fieldname = 'AUFNR'.
      ls_fieldcat-outputlen = 10.
      ls_fieldcat-tabname = 'it_output'.
      ls_fieldcat-seltext_l = 'Order Number'.
      APPEND ls_fieldcat TO gt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-col_pos = 3.
      ls_fieldcat-fieldname = 'MATNR'.
      ls_fieldcat-outputlen = 12.
      ls_fieldcat-tabname = 'it_output'.
      ls_fieldcat-seltext_l = 'Material Number'.
      APPEND ls_fieldcat TO gt_fieldcat.
      ----you can add fields as per your requirement.*----
    ENDFORM.                    " build_field_catalog
    *-- Form top of page
    FORM top-of-page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = gt_heading.
    ENDFORM. "TOP-OF-PAGE
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    FORM display_data.
      gv_save = 'A'.
      gv_repname = sy-repid.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-zebra = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program = gv_repname
                is_layout          = gs_layout
                it_sort            = gt_sort[]
                it_fieldcat        = gt_fieldcat[]
                i_default          = 'X'
                i_save             = gv_save
                it_events          = gt_event[]
           TABLES
                t_outtab           = it_output
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " display_data
    *&      Form  sub_t_sort_build
          text
    -->  p1        text
    <--  p2        text
    FORM sub_t_sort_build.
      DATA  ls_sort TYPE slis_sortinfo_alv.
      ls_sort-spos = 1.
      ls_sort-tabname = 'it_output'.
      ls_sort-fieldname = 'DAUAT'.
      ls_sort-subtot = 'X'.
      ls_sort-up = 'X'.
      ls_sort-group = '*'.
      APPEND ls_sort TO gt_sort.
    ENDFORM.                    " sub_t_sort_build
    Reward points, if helpful
    Regards,
    Ramneet

Maybe you are looking for

  • Time Capsule with External HD

    Can anyone tell me what happens when you connect an external HD to a Time Capsule? Does the TC recognise the new drive and treat it as more capacity and therefor continue to do backups spilling over onto the new drive? Or does it just see it as anoth

  • Using '09 iMac as Target Display via Thunderbolt Cable Fail

    I have a peculiar situation that I hoping someone can decipher with certainty: I have a late 2009 iMac core i7, 27" running 10.9.1 I just received a Mac Pro - my plan was to use the iMac as a display for the Mac Pro at least for a while. I purchased

  • Migration from Sqlserver 2005 to Oracle 10g

    Hi all, does anyone know a tool good to migrate a sqlserver 2005 database to oracle 10g ? I tried Sqldeveloper and the migration of tables and datas are ok, but when I try to migrate views, functions and procedures the sqldeveloper hangs. regards,. W

  • 5 things which should be improved in the Warp Stabilizer

    1. Performance. When stabilizing any footage I always ask myself: "What the heck is he doing there?!" not even a single core is really working hard. It looks like an idle background process  The GPU is idle as well, as the analysis pass is only run o

  • HT4623 I upgraded my phone and now I can't use my App Store.

    It says "Account not in this store" Your account is not valid for use in the US store. You must switch to the Canadian store before purchasing. How do I do this??