*&---------------------------------------------------------------------*
*&  Include           ZHRO_ADP_WFN_CA_D01
*&---------------------------------------------------------------------*


TABLES: pernr, zhr_pcl2, t569v, t549a, t549q.

INFOTYPES:  0000,
            0001,
            0002,
            0006,
            0008,
            0009,
            0014,
            0019,
            0032,
            0033,
            0041,
            0105,
            0167,
            0168,
            0169,
            0185,
            0461,
            0462,
            0463,
            0464.

TYPES: BEGIN OF ts_if_results,
         seqnr(9) TYPE n,
         frper(6) TYPE n,
         frbeg    TYPE d,
         frend    TYPE d,
         rundt LIKE pc261-rundt,
         runtm LIKE pc261-runtm,
         abkrs LIKE pc261-abkrs,
       END OF ts_if_results,

       BEGIN OF ts_id_key,
         pernr LIKE pernr-pernr,
         fldid LIKE t532a-fldid,
       END OF ts_id_key,

       BEGIN OF ts_if_key,
         pernr LIKE pernr-pernr,
         seqnr(9) TYPE n,
         fldid LIKE t532a-fldid,
       END OF ts_if_key,

       BEGIN OF ts_if_version,
         cdate TYPE d,
         ctime TYPE t,
         cprog LIKE sy-repid,
         uname LIKE sy-uname,
       END OF ts_if_version.

TYPES: BEGIN OF ts_p0000,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        massn(000002) TYPE c,
        massg(000002) TYPE c,
        stat1(000001) TYPE c,
        stat2(000001) TYPE c,
        stat3(000001) TYPE c,
      END OF ts_p0000.
TYPES: BEGIN OF ts_p0001,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        bukrs(000004) TYPE c,
        werks(000004) TYPE c,
        persg(000001) TYPE c,
        persk(000002) TYPE c,
        vdsk1(000014) TYPE c,
        gsber(000004) TYPE c,
        btrtl(000004) TYPE c,
        juper(000004) TYPE c,
        abkrs(000002) TYPE c,
        ansvh(000002) TYPE c,
        kostl(000010) TYPE c,
        orgeh(000008) TYPE n,
        plans(000008) TYPE n,
        stell(000008) TYPE n,
        mstbr(000008) TYPE c,
        sacha(000003) TYPE c,
        sachp(000003) TYPE c,
        sachz(000003) TYPE c,
        sname(000030) TYPE c,
        ename(000040) TYPE c,
        otype(000002) TYPE c,
        sbmod(000004) TYPE c,
        kokrs(000004) TYPE c,
        fistl(000016) TYPE c,
        geber(000010) TYPE c,
        fkber(000016) TYPE c,
        grant_nbr(000020) TYPE c,
        sgmnt(000010) TYPE c,
        yysupervisor_id(000008) TYPE n,
        yymanager_flag(000001) TYPE c,
        yywork_location(000008) TYPE c,
      END OF ts_p0001.
TYPES: BEGIN OF ts_p0002,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        inits(000010) TYPE c,
        nachn(000040) TYPE c,
        name2(000040) TYPE c,
        nach2(000040) TYPE c,
        vorna(000040) TYPE c,
        cname(000080) TYPE c,
        titel(000015) TYPE c,
        titl2(000015) TYPE c,
        namzu(000015) TYPE c,
        vorsw(000015) TYPE c,
        vors2(000015) TYPE c,
        rufnm(000040) TYPE c,
        midnm(000040) TYPE c,
        knznm(000002) TYPE n,
        anred(000001) TYPE c,
        gesch(000001) TYPE c,
        gbdat TYPE d,
        gblnd(000003) TYPE c,
        gbdep(000003) TYPE c,
        gbort(000040) TYPE c,
        natio(000003) TYPE c,
        nati2(000003) TYPE c,
        nati3(000003) TYPE c,
        sprsl(000001) TYPE c,
        konfe(000002) TYPE c,
        famst(000001) TYPE c,
        famdt TYPE d,
        anzkd(000002) TYPE p DECIMALS 000000,
        nacon(000001) TYPE c,
        permo(000002) TYPE c,
        perid(000020) TYPE c,
        gbpas TYPE d,
        fnamk(000040) TYPE c,
        lnamk(000040) TYPE c,
        fnamr(000040) TYPE c,
        lnamr(000040) TYPE c,
        nabik(000040) TYPE c,
        nabir(000040) TYPE c,
        nickk(000040) TYPE c,
        nickr(000040) TYPE c,
        gbjhr(000004) TYPE n,
        gbmon(000002) TYPE n,
        gbtag(000002) TYPE n,
        nchmc(000025) TYPE c,
        vnamc(000025) TYPE c,
        namz2(000015) TYPE c,
      END OF ts_p0002.
TYPES: BEGIN OF ts_p0006,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        anssa(000004) TYPE c,
        name2(000040) TYPE c,
        stras(000060) TYPE c,
        ort01(000040) TYPE c,
        ort02(000040) TYPE c,
        pstlz(000010) TYPE c,
        land1(000003) TYPE c,
        telnr(000014) TYPE c,
        entkm(000002) TYPE p DECIMALS 000000,
        wkwng(000001) TYPE c,
        busrt(000003) TYPE c,
        locat(000040) TYPE c,
        adr03(000040) TYPE c,
        adr04(000040) TYPE c,
        state(000003) TYPE c,
        hsnmr(000010) TYPE c,
        posta(000010) TYPE c,
        bldng(000010) TYPE c,
        floor(000010) TYPE c,
        strds(000002) TYPE c,
        entk2(000002) TYPE p DECIMALS 000000,
        com01(000004) TYPE c,
        num01(000020) TYPE c,
        com02(000004) TYPE c,
        num02(000020) TYPE c,
        com03(000004) TYPE c,
        num03(000020) TYPE c,
        com04(000004) TYPE c,
        num04(000020) TYPE c,
        com05(000004) TYPE c,
        num05(000020) TYPE c,
        com06(000004) TYPE c,
        num06(000020) TYPE c,
        indrl(000002) TYPE c,
        counc(000003) TYPE c,
        rctvc(000006) TYPE c,
        or2kk(000040) TYPE c,
        conkk(000040) TYPE c,
        or1kk(000040) TYPE c,
        railw(000001) TYPE n,
      END OF ts_p0006.
TYPES: BEGIN OF ts_p0008,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        trfar(000002) TYPE c,
        trfgb(000002) TYPE c,
        trfgr(000008) TYPE c,
        trfst(000002) TYPE c,
        stvor TYPE d,
        orzst(000002) TYPE c,
        partn(000002) TYPE c,
        waers(000005) TYPE c,
        vglta(000002) TYPE c,
        vglgb(000002) TYPE c,
        vglgr(000008) TYPE c,
        vglst(000002) TYPE c,
        vglsv TYPE d,
        bsgrd(000003) TYPE p DECIMALS 000002,
        divgv(000003) TYPE p DECIMALS 000002,
        ansal(000008) TYPE p DECIMALS 000002,
        falgk(000010) TYPE c,
        falgr(000006) TYPE c,
        lga01(000004) TYPE c,
        bet01(000007) TYPE p DECIMALS 000002,
        anz01(000004) TYPE p DECIMALS 000002,
        ein01(000003) TYPE c,
        opk01(000001) TYPE c,
        lga02(000004) TYPE c,
        bet02(000007) TYPE p DECIMALS 000002,
        anz02(000004) TYPE p DECIMALS 000002,
        ein02(000003) TYPE c,
        opk02(000001) TYPE c,
        lga03(000004) TYPE c,
        bet03(000007) TYPE p DECIMALS 000002,
        anz03(000004) TYPE p DECIMALS 000002,
        ein03(000003) TYPE c,
        opk03(000001) TYPE c,
        lga04(000004) TYPE c,
        bet04(000007) TYPE p DECIMALS 000002,
        anz04(000004) TYPE p DECIMALS 000002,
        ein04(000003) TYPE c,
        opk04(000001) TYPE c,
        lga05(000004) TYPE c,
        bet05(000007) TYPE p DECIMALS 000002,
        anz05(000004) TYPE p DECIMALS 000002,
        ein05(000003) TYPE c,
        opk05(000001) TYPE c,
        lga06(000004) TYPE c,
        bet06(000007) TYPE p DECIMALS 000002,
        anz06(000004) TYPE p DECIMALS 000002,
        ein06(000003) TYPE c,
        opk06(000001) TYPE c,
        lga07(000004) TYPE c,
        bet07(000007) TYPE p DECIMALS 000002,
        anz07(000004) TYPE p DECIMALS 000002,
        ein07(000003) TYPE c,
        opk07(000001) TYPE c,
        lga08(000004) TYPE c,
        bet08(000007) TYPE p DECIMALS 000002,
        anz08(000004) TYPE p DECIMALS 000002,
        ein08(000003) TYPE c,
        opk08(000001) TYPE c,
        lga09(000004) TYPE c,
        bet09(000007) TYPE p DECIMALS 000002,
        anz09(000004) TYPE p DECIMALS 000002,
        ein09(000003) TYPE c,
        opk09(000001) TYPE c,
        lga10(000004) TYPE c,
        bet10(000007) TYPE p DECIMALS 000002,
        anz10(000004) TYPE p DECIMALS 000002,
        ein10(000003) TYPE c,
        opk10(000001) TYPE c,
        lga11(000004) TYPE c,
        bet11(000007) TYPE p DECIMALS 000002,
        anz11(000004) TYPE p DECIMALS 000002,
        ein11(000003) TYPE c,
        opk11(000001) TYPE c,
        lga12(000004) TYPE c,
        bet12(000007) TYPE p DECIMALS 000002,
        anz12(000004) TYPE p DECIMALS 000002,
        ein12(000003) TYPE c,
        opk12(000001) TYPE c,
        lga13(000004) TYPE c,
        bet13(000007) TYPE p DECIMALS 000002,
        anz13(000004) TYPE p DECIMALS 000002,
        ein13(000003) TYPE c,
        opk13(000001) TYPE c,
        lga14(000004) TYPE c,
        bet14(000007) TYPE p DECIMALS 000002,
        anz14(000004) TYPE p DECIMALS 000002,
        ein14(000003) TYPE c,
        opk14(000001) TYPE c,
        lga15(000004) TYPE c,
        bet15(000007) TYPE p DECIMALS 000002,
        anz15(000004) TYPE p DECIMALS 000002,
        ein15(000003) TYPE c,
        opk15(000001) TYPE c,
        lga16(000004) TYPE c,
        bet16(000007) TYPE p DECIMALS 000002,
        anz16(000004) TYPE p DECIMALS 000002,
        ein16(000003) TYPE c,
        opk16(000001) TYPE c,
        lga17(000004) TYPE c,
        bet17(000007) TYPE p DECIMALS 000002,
        anz17(000004) TYPE p DECIMALS 000002,
        ein17(000003) TYPE c,
        opk17(000001) TYPE c,
        lga18(000004) TYPE c,
        bet18(000007) TYPE p DECIMALS 000002,
        anz18(000004) TYPE p DECIMALS 000002,
        ein18(000003) TYPE c,
        opk18(000001) TYPE c,
        lga19(000004) TYPE c,
        bet19(000007) TYPE p DECIMALS 000002,
        anz19(000004) TYPE p DECIMALS 000002,
        ein19(000003) TYPE c,
        opk19(000001) TYPE c,
        lga20(000004) TYPE c,
        bet20(000007) TYPE p DECIMALS 000002,
        anz20(000004) TYPE p DECIMALS 000002,
        ein20(000003) TYPE c,
        opk20(000001) TYPE c,
        lga21(000004) TYPE c,
        bet21(000007) TYPE p DECIMALS 000002,
        anz21(000004) TYPE p DECIMALS 000002,
        ein21(000003) TYPE c,
        opk21(000001) TYPE c,
        lga22(000004) TYPE c,
        bet22(000007) TYPE p DECIMALS 000002,
        anz22(000004) TYPE p DECIMALS 000002,
        ein22(000003) TYPE c,
        opk22(000001) TYPE c,
        lga23(000004) TYPE c,
        bet23(000007) TYPE p DECIMALS 000002,
        anz23(000004) TYPE p DECIMALS 000002,
        ein23(000003) TYPE c,
        opk23(000001) TYPE c,
        lga24(000004) TYPE c,
        bet24(000007) TYPE p DECIMALS 000002,
        anz24(000004) TYPE p DECIMALS 000002,
        ein24(000003) TYPE c,
        opk24(000001) TYPE c,
        lga25(000004) TYPE c,
        bet25(000007) TYPE p DECIMALS 000002,
        anz25(000004) TYPE p DECIMALS 000002,
        ein25(000003) TYPE c,
        opk25(000001) TYPE c,
        lga26(000004) TYPE c,
        bet26(000007) TYPE p DECIMALS 000002,
        anz26(000004) TYPE p DECIMALS 000002,
        ein26(000003) TYPE c,
        opk26(000001) TYPE c,
        lga27(000004) TYPE c,
        bet27(000007) TYPE p DECIMALS 000002,
        anz27(000004) TYPE p DECIMALS 000002,
        ein27(000003) TYPE c,
        opk27(000001) TYPE c,
        lga28(000004) TYPE c,
        bet28(000007) TYPE p DECIMALS 000002,
        anz28(000004) TYPE p DECIMALS 000002,
        ein28(000003) TYPE c,
        opk28(000001) TYPE c,
        lga29(000004) TYPE c,
        bet29(000007) TYPE p DECIMALS 000002,
        anz29(000004) TYPE p DECIMALS 000002,
        ein29(000003) TYPE c,
        opk29(000001) TYPE c,
        lga30(000004) TYPE c,
        bet30(000007) TYPE p DECIMALS 000002,
        anz30(000004) TYPE p DECIMALS 000002,
        ein30(000003) TYPE c,
        opk30(000001) TYPE c,
        lga31(000004) TYPE c,
        bet31(000007) TYPE p DECIMALS 000002,
        anz31(000004) TYPE p DECIMALS 000002,
        ein31(000003) TYPE c,
        opk31(000001) TYPE c,
        lga32(000004) TYPE c,
        bet32(000007) TYPE p DECIMALS 000002,
        anz32(000004) TYPE p DECIMALS 000002,
        ein32(000003) TYPE c,
        opk32(000001) TYPE c,
        lga33(000004) TYPE c,
        bet33(000007) TYPE p DECIMALS 000002,
        anz33(000004) TYPE p DECIMALS 000002,
        ein33(000003) TYPE c,
        opk33(000001) TYPE c,
        lga34(000004) TYPE c,
        bet34(000007) TYPE p DECIMALS 000002,
        anz34(000004) TYPE p DECIMALS 000002,
        ein34(000003) TYPE c,
        opk34(000001) TYPE c,
        lga35(000004) TYPE c,
        bet35(000007) TYPE p DECIMALS 000002,
        anz35(000004) TYPE p DECIMALS 000002,
        ein35(000003) TYPE c,
        opk35(000001) TYPE c,
        lga36(000004) TYPE c,
        bet36(000007) TYPE p DECIMALS 000002,
        anz36(000004) TYPE p DECIMALS 000002,
        ein36(000003) TYPE c,
        opk36(000001) TYPE c,
        lga37(000004) TYPE c,
        bet37(000007) TYPE p DECIMALS 000002,
        anz37(000004) TYPE p DECIMALS 000002,
        ein37(000003) TYPE c,
        opk37(000001) TYPE c,
        lga38(000004) TYPE c,
        bet38(000007) TYPE p DECIMALS 000002,
        anz38(000004) TYPE p DECIMALS 000002,
        ein38(000003) TYPE c,
        opk38(000001) TYPE c,
        lga39(000004) TYPE c,
        bet39(000007) TYPE p DECIMALS 000002,
        anz39(000004) TYPE p DECIMALS 000002,
        ein39(000003) TYPE c,
        opk39(000001) TYPE c,
        lga40(000004) TYPE c,
        bet40(000007) TYPE p DECIMALS 000002,
        anz40(000004) TYPE p DECIMALS 000002,
        ein40(000003) TYPE c,
        opk40(000001) TYPE c,
        ind01(000001) TYPE c,
        ind02(000001) TYPE c,
        ind03(000001) TYPE c,
        ind04(000001) TYPE c,
        ind05(000001) TYPE c,
        ind06(000001) TYPE c,
        ind07(000001) TYPE c,
        ind08(000001) TYPE c,
        ind09(000001) TYPE c,
        ind10(000001) TYPE c,
        ind11(000001) TYPE c,
        ind12(000001) TYPE c,
        ind13(000001) TYPE c,
        ind14(000001) TYPE c,
        ind15(000001) TYPE c,
        ind16(000001) TYPE c,
        ind17(000001) TYPE c,
        ind18(000001) TYPE c,
        ind19(000001) TYPE c,
        ind20(000001) TYPE c,
        ind21(000001) TYPE c,
        ind22(000001) TYPE c,
        ind23(000001) TYPE c,
        ind24(000001) TYPE c,
        ind25(000001) TYPE c,
        ind26(000001) TYPE c,
        ind27(000001) TYPE c,
        ind28(000001) TYPE c,
        ind29(000001) TYPE c,
        ind30(000001) TYPE c,
        ind31(000001) TYPE c,
        ind32(000001) TYPE c,
        ind33(000001) TYPE c,
        ind34(000001) TYPE c,
        ind35(000001) TYPE c,
        ind36(000001) TYPE c,
        ind37(000001) TYPE c,
        ind38(000001) TYPE c,
        ind39(000001) TYPE c,
        ind40(000001) TYPE c,
        ancur(000005) TYPE c,
        cpind(000001) TYPE c,
        flaga(000001) TYPE c,
      END OF ts_p0008.
TYPES: BEGIN OF ts_p0009,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        opken(000001) TYPE c,
        betrg(000007) TYPE p DECIMALS 000002,
        waers(000005) TYPE c,
        anzhl(000003) TYPE p DECIMALS 000002,
        zeinh(000003) TYPE c,
        bnksa(000004) TYPE c,
        zlsch(000001) TYPE c,
        emftx(000040) TYPE c,
        bkplz(000010) TYPE c,
        bkort(000025) TYPE c,
        banks(000003) TYPE c,
        bankl(000015) TYPE c,
        bankn(000018) TYPE c,
        bankp(000002) TYPE c,
        bkont(000002) TYPE c,
        swift(000011) TYPE c,
        dtaws(000002) TYPE c,
        dtams(000001) TYPE c,
        stcd1(000016) TYPE c,
        stcd2(000011) TYPE c,
        pskto(000016) TYPE c,
        esrnr(000011) TYPE c,
        esrre(000027) TYPE c,
        esrpz(000002) TYPE c,
        emfsl(000008) TYPE c,
        zweck(000040) TYPE c,
        bttyp(000002) TYPE n,
        payty(000001) TYPE c,
        payid(000001) TYPE c,
        ocrsn(000004) TYPE c,
        bondt TYPE d,
        bkref(000020) TYPE c,
        stras(000030) TYPE c,
        state(000003) TYPE c,
        debit(000001) TYPE c,
        iban(000034) TYPE c,
      END OF ts_p0009.
TYPES: BEGIN OF ts_p0014,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        lgart(000004) TYPE c,
        opken(000001) TYPE c,
        betrg(000007) TYPE p DECIMALS 000002,
        waers(000005) TYPE c,
        anzhl(000004) TYPE p DECIMALS 000002,
        zeinh(000003) TYPE c,
        indbw(000001) TYPE c,
        zdate TYPE d,
        zfper(000002) TYPE n,
        zanzl(000002) TYPE p DECIMALS 000000,
        zeinz(000003) TYPE c,
        zuord(000020) TYPE c,
        uwdat TYPE d,
        model(000004) TYPE c,
      END OF ts_p0014.
TYPES: BEGIN OF ts_p0019,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        tmart(000002) TYPE c,
        termn TYPE d,
        mndat TYPE d,
        bvmrk(000001) TYPE c,
        tmjhr(000004) TYPE n,
        tmmon(000002) TYPE n,
        tmtag(000002) TYPE n,
        mnjhr(000004) TYPE n,
        mnmon(000002) TYPE n,
        mntag(000002) TYPE n,
      END OF ts_p0019.
TYPES: BEGIN OF ts_p0032,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        pnalt(000012) TYPE c,
        wausw(000012) TYPE c,
        pkwrg(000001) TYPE c,
        pkwwr(000005) TYPE p DECIMALS 000002,
        kfzkz(000020) TYPE c,
        waers(000005) TYPE c,
        anlnr(000020) TYPE c,
        gebnr(000006) TYPE c,
        zimnr(000006) TYPE c,
        tel01(000005) TYPE c,
        tel02(000005) TYPE c,
        com01(000004) TYPE c,
        num01(000020) TYPE c,
        com02(000004) TYPE c,
        num02(000020) TYPE c,
        com03(000004) TYPE c,
        num03(000020) TYPE c,
        com04(000004) TYPE c,
        num04(000020) TYPE c,
        com05(000004) TYPE c,
        num05(000020) TYPE c,
        com06(000004) TYPE c,
        num06(000020) TYPE c,
        zzort01(000040) TYPE c,
      END OF ts_p0032.
TYPES: BEGIN OF ts_p0033,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        aus01(000004) TYPE c,
        aus02(000004) TYPE c,
        aus03(000004) TYPE c,
        aus04(000004) TYPE c,
        aus05(000004) TYPE c,
        aus06(000004) TYPE c,
        aus07(000004) TYPE c,
        aus08(000004) TYPE c,
        aus09(000004) TYPE c,
        aus10(000004) TYPE c,
        aus11(000004) TYPE c,
        aus12(000004) TYPE c,
        aus13(000004) TYPE c,
        aus14(000004) TYPE c,
        aus15(000004) TYPE c,
        aus16(000004) TYPE c,
        aus17(000004) TYPE c,
        aus18(000004) TYPE c,
        aus19(000004) TYPE c,
        aus20(000004) TYPE c,
      END OF ts_p0033.
TYPES: BEGIN OF ts_p0041,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        dar01(000002) TYPE c,
        dat01 TYPE d,
        dar02(000002) TYPE c,
        dat02 TYPE d,
        dar03(000002) TYPE c,
        dat03 TYPE d,
        dar04(000002) TYPE c,
        dat04 TYPE d,
        dar05(000002) TYPE c,
        dat05 TYPE d,
        dar06(000002) TYPE c,
        dat06 TYPE d,
        dar07(000002) TYPE c,
        dat07 TYPE d,
        dar08(000002) TYPE c,
        dat08 TYPE d,
        dar09(000002) TYPE c,
        dat09 TYPE d,
        dar10(000002) TYPE c,
        dat10 TYPE d,
        dar11(000002) TYPE c,
        dat11 TYPE d,
        dar12(000002) TYPE c,
        dat12 TYPE d,
      END OF ts_p0041.
TYPES: BEGIN OF ts_p0105,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        usrty(000004) TYPE c,
        usrid(000030) TYPE c,
        usrid_long(000241) TYPE c,
      END OF ts_p0105.
TYPES: BEGIN OF ts_p0167,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        barea(000002) TYPE c,
        pltyp(000004) TYPE c,
        bplan(000004) TYPE c,
        bengr(000004) TYPE c,
        bstat(000004) TYPE c,
        elidt TYPE d,
        eldto TYPE d,
        pardt TYPE d,
        bopti(000004) TYPE c,
        depcv(000004) TYPE c,
        coord(000001) TYPE c,
        provi(000030) TYPE c,
        polnr(000020) TYPE c,
        enrty(000001) TYPE c,
        event(000004) TYPE c,
        eogrp TYPE d,
        eoirq(000001) TYPE c,
        eoipr(000001) TYPE c,
        pretx(000001) TYPE c,
        cstov(000007) TYPE p DECIMALS 000002,
        bncst(000007) TYPE p DECIMALS 000002,
        perio(000002) TYPE n,
        curre(000005) TYPE c,
        dty01(000004) TYPE c,
        did01(000002) TYPE c,
        dty02(000004) TYPE c,
        did02(000002) TYPE c,
        dty03(000004) TYPE c,
        did03(000002) TYPE c,
        dty04(000004) TYPE c,
        did04(000002) TYPE c,
        dty05(000004) TYPE c,
        did05(000002) TYPE c,
        dty06(000004) TYPE c,
        did06(000002) TYPE c,
        dty07(000004) TYPE c,
        did07(000002) TYPE c,
        dty08(000004) TYPE c,
        did08(000002) TYPE c,
        dty09(000004) TYPE c,
        did09(000002) TYPE c,
        dty10(000004) TYPE c,
        did10(000002) TYPE c,
        dty11(000004) TYPE c,
        did11(000002) TYPE c,
        dty12(000004) TYPE c,
        did12(000002) TYPE c,
        dty13(000004) TYPE c,
        did13(000002) TYPE c,
        dty14(000004) TYPE c,
        did14(000002) TYPE c,
        dty15(000004) TYPE c,
        did15(000002) TYPE c,
        dty16(000004) TYPE c,
        did16(000002) TYPE c,
        dty17(000004) TYPE c,
        did17(000002) TYPE c,
        dty18(000004) TYPE c,
        did18(000002) TYPE c,
        dty19(000004) TYPE c,
        did19(000002) TYPE c,
        dty20(000004) TYPE c,
        did20(000002) TYPE c,
        eecst(000007) TYPE p DECIMALS 000002,
      END OF ts_p0167.
TYPES: BEGIN OF ts_p0168,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        barea(000002) TYPE c,
        pltyp(000004) TYPE c,
        bplan(000004) TYPE c,
        bengr(000004) TYPE c,
        bstat(000004) TYPE c,
        elidt TYPE d,
        eldto TYPE d,
        pardt TYPE d,
        bcovr(000004) TYPE c,
        salov(000008) TYPE p DECIMALS 000002,
        covov(000008) TYPE p DECIMALS 000002,
        addno(000005) TYPE p DECIMALS 000000,
        curre(000005) TYPE c,
        enrty(000001) TYPE c,
        event(000004) TYPE c,
        eogrp TYPE d,
        eoirq(000001) TYPE c,
        eoipr(000001) TYPE c,
        pretx(000001) TYPE c,
        cstov(000007) TYPE p DECIMALS 000002,
        bncst(000007) TYPE p DECIMALS 000002,
        perio(000002) TYPE n,
        its01(000001) TYPE n,
        dty01(000004) TYPE c,
        did01(000002) TYPE c,
        bpt01(000002) TYPE p DECIMALS 000000,
        its02(000001) TYPE n,
        dty02(000004) TYPE c,
        did02(000002) TYPE c,
        bpt02(000002) TYPE p DECIMALS 000000,
        its03(000001) TYPE n,
        dty03(000004) TYPE c,
        did03(000002) TYPE c,
        bpt03(000002) TYPE p DECIMALS 000000,
        its04(000001) TYPE n,
        dty04(000004) TYPE c,
        did04(000002) TYPE c,
        bpt04(000002) TYPE p DECIMALS 000000,
        its05(000001) TYPE n,
        dty05(000004) TYPE c,
        did05(000002) TYPE c,
        bpt05(000002) TYPE p DECIMALS 000000,
        its06(000001) TYPE n,
        dty06(000004) TYPE c,
        did06(000002) TYPE c,
        bpt06(000002) TYPE p DECIMALS 000000,
        its07(000001) TYPE n,
        dty07(000004) TYPE c,
        did07(000002) TYPE c,
        bpt07(000002) TYPE p DECIMALS 000000,
        its08(000001) TYPE n,
        dty08(000004) TYPE c,
        did08(000002) TYPE c,
        bpt08(000002) TYPE p DECIMALS 000000,
        its09(000001) TYPE n,
        dty09(000004) TYPE c,
        did09(000002) TYPE c,
        bpt09(000002) TYPE p DECIMALS 000000,
        its10(000001) TYPE n,
        dty10(000004) TYPE c,
        did10(000002) TYPE c,
        bpt10(000002) TYPE p DECIMALS 000000,
        its11(000001) TYPE n,
        dty11(000004) TYPE c,
        did11(000002) TYPE c,
        bpt11(000002) TYPE p DECIMALS 000000,
        its12(000001) TYPE n,
        dty12(000004) TYPE c,
        did12(000002) TYPE c,
        bpt12(000002) TYPE p DECIMALS 000000,
        its13(000001) TYPE n,
        dty13(000004) TYPE c,
        did13(000002) TYPE c,
        bpt13(000002) TYPE p DECIMALS 000000,
        its14(000001) TYPE n,
        dty14(000004) TYPE c,
        did14(000002) TYPE c,
        bpt14(000002) TYPE p DECIMALS 000000,
        its15(000001) TYPE n,
        dty15(000004) TYPE c,
        did15(000002) TYPE c,
        bpt15(000002) TYPE p DECIMALS 000000,
        its16(000001) TYPE n,
        dty16(000004) TYPE c,
        did16(000002) TYPE c,
        bpt16(000002) TYPE p DECIMALS 000000,
        its17(000001) TYPE n,
        dty17(000004) TYPE c,
        did17(000002) TYPE c,
        bpt17(000002) TYPE p DECIMALS 000000,
        its18(000001) TYPE n,
        dty18(000004) TYPE c,
        did18(000002) TYPE c,
        bpt18(000002) TYPE p DECIMALS 000000,
        its19(000001) TYPE n,
        dty19(000004) TYPE c,
        did19(000002) TYPE c,
        bpt19(000002) TYPE p DECIMALS 000000,
        its20(000001) TYPE n,
        dty20(000004) TYPE c,
        did20(000002) TYPE c,
        bpt20(000002) TYPE p DECIMALS 000000,
        cis01(000001) TYPE n,
        cty01(000004) TYPE c,
        cid01(000002) TYPE c,
        cpt01(000002) TYPE p DECIMALS 000000,
        cis02(000001) TYPE n,
        cty02(000004) TYPE c,
        cid02(000002) TYPE c,
        cpt02(000002) TYPE p DECIMALS 000000,
        cis03(000001) TYPE n,
        cty03(000004) TYPE c,
        cid03(000002) TYPE c,
        cpt03(000002) TYPE p DECIMALS 000000,
        cis04(000001) TYPE n,
        cty04(000004) TYPE c,
        cid04(000002) TYPE c,
        cpt04(000002) TYPE p DECIMALS 000000,
        cis05(000001) TYPE n,
        cty05(000004) TYPE c,
        cid05(000002) TYPE c,
        cpt05(000002) TYPE p DECIMALS 000000,
        cis06(000001) TYPE n,
        cty06(000004) TYPE c,
        cid06(000002) TYPE c,
        cpt06(000002) TYPE p DECIMALS 000000,
        cis07(000001) TYPE n,
        cty07(000004) TYPE c,
        cid07(000002) TYPE c,
        cpt07(000002) TYPE p DECIMALS 000000,
        cis08(000001) TYPE n,
        cty08(000004) TYPE c,
        cid08(000002) TYPE c,
        cpt08(000002) TYPE p DECIMALS 000000,
        cis09(000001) TYPE n,
        cty09(000004) TYPE c,
        cid09(000002) TYPE c,
        cpt09(000002) TYPE p DECIMALS 000000,
        cis10(000001) TYPE n,
        cty10(000004) TYPE c,
        cid10(000002) TYPE c,
        cpt10(000002) TYPE p DECIMALS 000000,
        eecst(000007) TYPE p DECIMALS 000002,
      END OF ts_p0168.
TYPES: BEGIN OF ts_p0169,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        barea(000002) TYPE c,
        pltyp(000004) TYPE c,
        bplan(000004) TYPE c,
        bengr(000004) TYPE c,
        bstat(000004) TYPE c,
        elidt TYPE d,
        eldto TYPE d,
        pardt TYPE d,
        enrty(000001) TYPE c,
        event(000004) TYPE c,
        perio(000002) TYPE n,
        eeamt(000007) TYPE p DECIMALS 000002,
        eepct(000003) TYPE p DECIMALS 000002,
        eeunt(000005) TYPE p DECIMALS 000000,
        ptamt(000007) TYPE p DECIMALS 000002,
        ptpct(000003) TYPE p DECIMALS 000002,
        ptunt(000005) TYPE p DECIMALS 000000,
        psttx(000001) TYPE c,
        rollo(000001) TYPE c,
        bcamt(000007) TYPE p DECIMALS 000002,
        bcpct(000003) TYPE p DECIMALS 000002,
        bcunt(000005) TYPE p DECIMALS 000000,
        bpamt(000007) TYPE p DECIMALS 000002,
        bppct(000003) TYPE p DECIMALS 000002,
        bpunt(000005) TYPE p DECIMALS 000000,
        bpttx(000001) TYPE c,
        broll(000001) TYPE c,
        spadt TYPE d,
        paamt(000007) TYPE p DECIMALS 000002,
        acctn(000020) TYPE c,
        lifel(000008) TYPE p DECIMALS 000002,
        its01(000001) TYPE n,
        dty01(000004) TYPE c,
        did01(000002) TYPE c,
        bpt01(000002) TYPE p DECIMALS 000000,
        its02(000001) TYPE n,
        dty02(000004) TYPE c,
        did02(000002) TYPE c,
        bpt02(000002) TYPE p DECIMALS 000000,
        its03(000001) TYPE n,
        dty03(000004) TYPE c,
        did03(000002) TYPE c,
        bpt03(000002) TYPE p DECIMALS 000000,
        its04(000001) TYPE n,
        dty04(000004) TYPE c,
        did04(000002) TYPE c,
        bpt04(000002) TYPE p DECIMALS 000000,
        its05(000001) TYPE n,
        dty05(000004) TYPE c,
        did05(000002) TYPE c,
        bpt05(000002) TYPE p DECIMALS 000000,
        its06(000001) TYPE n,
        dty06(000004) TYPE c,
        did06(000002) TYPE c,
        bpt06(000002) TYPE p DECIMALS 000000,
        its07(000001) TYPE n,
        dty07(000004) TYPE c,
        did07(000002) TYPE c,
        bpt07(000002) TYPE p DECIMALS 000000,
        its08(000001) TYPE n,
        dty08(000004) TYPE c,
        did08(000002) TYPE c,
        bpt08(000002) TYPE p DECIMALS 000000,
        its09(000001) TYPE n,
        dty09(000004) TYPE c,
        did09(000002) TYPE c,
        bpt09(000002) TYPE p DECIMALS 000000,
        its10(000001) TYPE n,
        dty10(000004) TYPE c,
        did10(000002) TYPE c,
        bpt10(000002) TYPE p DECIMALS 000000,
        its11(000001) TYPE n,
        dty11(000004) TYPE c,
        did11(000002) TYPE c,
        bpt11(000002) TYPE p DECIMALS 000000,
        its12(000001) TYPE n,
        dty12(000004) TYPE c,
        did12(000002) TYPE c,
        bpt12(000002) TYPE p DECIMALS 000000,
        its13(000001) TYPE n,
        dty13(000004) TYPE c,
        did13(000002) TYPE c,
        bpt13(000002) TYPE p DECIMALS 000000,
        its14(000001) TYPE n,
        dty14(000004) TYPE c,
        did14(000002) TYPE c,
        bpt14(000002) TYPE p DECIMALS 000000,
        its15(000001) TYPE n,
        dty15(000004) TYPE c,
        did15(000002) TYPE c,
        bpt15(000002) TYPE p DECIMALS 000000,
        its16(000001) TYPE n,
        dty16(000004) TYPE c,
        did16(000002) TYPE c,
        bpt16(000002) TYPE p DECIMALS 000000,
        its17(000001) TYPE n,
        dty17(000004) TYPE c,
        did17(000002) TYPE c,
        bpt17(000002) TYPE p DECIMALS 000000,
        its18(000001) TYPE n,
        dty18(000004) TYPE c,
        did18(000002) TYPE c,
        bpt18(000002) TYPE p DECIMALS 000000,
        its19(000001) TYPE n,
        dty19(000004) TYPE c,
        did19(000002) TYPE c,
        bpt19(000002) TYPE p DECIMALS 000000,
        its20(000001) TYPE n,
        dty20(000004) TYPE c,
        did20(000002) TYPE c,
        bpt20(000002) TYPE p DECIMALS 000000,
        cis01(000001) TYPE n,
        cty01(000004) TYPE c,
        cid01(000002) TYPE c,
        cpt01(000002) TYPE p DECIMALS 000000,
        cis02(000001) TYPE n,
        cty02(000004) TYPE c,
        cid02(000002) TYPE c,
        cpt02(000002) TYPE p DECIMALS 000000,
        cis03(000001) TYPE n,
        cty03(000004) TYPE c,
        cid03(000002) TYPE c,
        cpt03(000002) TYPE p DECIMALS 000000,
        cis04(000001) TYPE n,
        cty04(000004) TYPE c,
        cid04(000002) TYPE c,
        cpt04(000002) TYPE p DECIMALS 000000,
        cis05(000001) TYPE n,
        cty05(000004) TYPE c,
        cid05(000002) TYPE c,
        cpt05(000002) TYPE p DECIMALS 000000,
        cis06(000001) TYPE n,
        cty06(000004) TYPE c,
        cid06(000002) TYPE c,
        cpt06(000002) TYPE p DECIMALS 000000,
        cis07(000001) TYPE n,
        cty07(000004) TYPE c,
        cid07(000002) TYPE c,
        cpt07(000002) TYPE p DECIMALS 000000,
        cis08(000001) TYPE n,
        cty08(000004) TYPE c,
        cid08(000002) TYPE c,
        cpt08(000002) TYPE p DECIMALS 000000,
        cis09(000001) TYPE n,
        cty09(000004) TYPE c,
        cid09(000002) TYPE c,
        cpt09(000002) TYPE p DECIMALS 000000,
        cis10(000001) TYPE n,
        cty10(000004) TYPE c,
        cid10(000002) TYPE c,
        cpt10(000002) TYPE p DECIMALS 000000,
        curre(000005) TYPE c,
        inv01(000004) TYPE c,
        ipt01(000002) TYPE p DECIMALS 000000,
        iam01(000007) TYPE p DECIMALS 000002,
        inv02(000004) TYPE c,
        ipt02(000002) TYPE p DECIMALS 000000,
        iam02(000007) TYPE p DECIMALS 000002,
        inv03(000004) TYPE c,
        ipt03(000002) TYPE p DECIMALS 000000,
        iam03(000007) TYPE p DECIMALS 000002,
        inv04(000004) TYPE c,
        ipt04(000002) TYPE p DECIMALS 000000,
        iam04(000007) TYPE p DECIMALS 000002,
        inv05(000004) TYPE c,
        ipt05(000002) TYPE p DECIMALS 000000,
        iam05(000007) TYPE p DECIMALS 000002,
        inv06(000004) TYPE c,
        ipt06(000002) TYPE p DECIMALS 000000,
        iam06(000007) TYPE p DECIMALS 000002,
        inv07(000004) TYPE c,
        ipt07(000002) TYPE p DECIMALS 000000,
        iam07(000007) TYPE p DECIMALS 000002,
        inv08(000004) TYPE c,
        ipt08(000002) TYPE p DECIMALS 000000,
        iam08(000007) TYPE p DECIMALS 000002,
        inv09(000004) TYPE c,
        ipt09(000002) TYPE p DECIMALS 000000,
        iam09(000007) TYPE p DECIMALS 000002,
        inv10(000004) TYPE c,
        ipt10(000002) TYPE p DECIMALS 000000,
        iam10(000007) TYPE p DECIMALS 000002,
        inv11(000004) TYPE c,
        ipt11(000002) TYPE p DECIMALS 000000,
        iam11(000007) TYPE p DECIMALS 000002,
        inv12(000004) TYPE c,
        ipt12(000002) TYPE p DECIMALS 000000,
        iam12(000007) TYPE p DECIMALS 000002,
        inv13(000004) TYPE c,
        ipt13(000002) TYPE p DECIMALS 000000,
        iam13(000007) TYPE p DECIMALS 000002,
        inv14(000004) TYPE c,
        ipt14(000002) TYPE p DECIMALS 000000,
        iam14(000007) TYPE p DECIMALS 000002,
        inv15(000004) TYPE c,
        ipt15(000002) TYPE p DECIMALS 000000,
        iam15(000007) TYPE p DECIMALS 000002,
        inv16(000004) TYPE c,
        ipt16(000002) TYPE p DECIMALS 000000,
        iam16(000007) TYPE p DECIMALS 000002,
        inv17(000004) TYPE c,
        ipt17(000002) TYPE p DECIMALS 000000,
        iam17(000007) TYPE p DECIMALS 000002,
        inv18(000004) TYPE c,
        ipt18(000002) TYPE p DECIMALS 000000,
        iam18(000007) TYPE p DECIMALS 000002,
        inv19(000004) TYPE c,
        ipt19(000002) TYPE p DECIMALS 000000,
        iam19(000007) TYPE p DECIMALS 000002,
        inv20(000004) TYPE c,
        ipt20(000002) TYPE p DECIMALS 000000,
        iam20(000007) TYPE p DECIMALS 000002,
      END OF ts_p0169.
TYPES: BEGIN OF ts_p0185,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        ictyp(000002) TYPE c,
        icnum(000030) TYPE c,
        icold(000020) TYPE c,
        auth1(000030) TYPE c,
        docn1(000020) TYPE c,
        fpdat TYPE d,
        expid TYPE d,
        isspl(000030) TYPE c,
        iscot(000003) TYPE c,
        idcot(000003) TYPE c,
        ovchk(000001) TYPE c,
        astat(000001) TYPE c,
        akind(000001) TYPE c,
        rejec(000020) TYPE c,
        usefr TYPE d,
        useto TYPE d,
        daten(000002) TYPE p DECIMALS 000000,
        dateu(000003) TYPE c,
        times TYPE d,
      END OF ts_p0185.
TYPES: BEGIN OF ts_p0461,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        wrkar(000004) TYPE c,
        resar(000004) TYPE c,
        provr(000004) TYPE c,
        phlth(000004) TYPE c,
      END OF ts_p0461.
TYPES: BEGIN OF ts_p0462,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        wrkar(000004) TYPE c,
        totcq(000005) TYPE p DECIMALS 000002,
        othde(000005) TYPE p DECIMALS 000002,
        addtq(000005) TYPE p DECIMALS 000002,
        otxcq(000005) TYPE p DECIMALS 000002,
        otade(000005) TYPE p DECIMALS 000002,
        comeq(000005) TYPE p DECIMALS 000002,
        totcp(000005) TYPE p DECIMALS 000002,
        tninp(000005) TYPE p DECIMALS 000002,
        otxdp(000005) TYPE p DECIMALS 000002,
        otxcp(000005) TYPE p DECIMALS 000002,
        lbtcp(000005) TYPE p DECIMALS 000002,
        marrd(000001) TYPE c,
        nodep(000002) TYPE n,
        nodis(000002) TYPE n,
      END OF ts_p0462.
TYPES: BEGIN OF ts_p0463,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        totcr(000005) TYPE p DECIMALS 000002,
        tnind(000005) TYPE p DECIMALS 000002,
        addtx(000005) TYPE p DECIMALS 000002,
        texhd(000005) TYPE p DECIMALS 000002,
        mntde(000005) TYPE p DECIMALS 000002,
        otxcr(000005) TYPE p DECIMALS 000002,
        lbtcr(000005) TYPE p DECIMALS 000002,
        comre(000005) TYPE p DECIMALS 000002,
        comex(000005) TYPE p DECIMALS 000002,
        optio(000001) TYPE c,
      END OF ts_p0463.
TYPES: BEGIN OF ts_p0464,
        pernr(000008) TYPE n,
        infty(000004) TYPE c,
        subty(000004) TYPE c,
        objps(000002) TYPE c,
        sprps(000001) TYPE c,
        endda TYPE d,
        begda TYPE d,
        seqnr(000003) TYPE n,
        aedtm TYPE d,
        uname(000012) TYPE c,
        histo(000001) TYPE c,
        itxex(000001) TYPE c,
        refex(000001) TYPE c,
        ordex(000001) TYPE c,
        itbld(000002) TYPE c,
        preas(000002) TYPE c,
        flag1(000001) TYPE c,
        flag2(000001) TYPE c,
        flag3(000001) TYPE c,
        flag4(000001) TYPE c,
        rese1(000002) TYPE c,
        rese2(000002) TYPE c,
        grpvl(000004) TYPE c,
        wrkar(000004) TYPE c,
        tax01(000004) TYPE c,
        exi01(000001) TYPE c,
        tax02(000004) TYPE c,
        exi02(000001) TYPE c,
        tax03(000004) TYPE c,
        exi03(000001) TYPE c,
        tax04(000004) TYPE c,
        exi04(000001) TYPE c,
        tax05(000004) TYPE c,
        exi05(000001) TYPE c,
        tax06(000004) TYPE c,
        exi06(000001) TYPE c,
        tax07(000004) TYPE c,
        exi07(000001) TYPE c,
        tax08(000004) TYPE c,
        exi08(000001) TYPE c,
        tax09(000004) TYPE c,
        exi09(000001) TYPE c,
        tax10(000004) TYPE c,
        exi10(000001) TYPE c,
        tax11(000004) TYPE c,
        exi11(000001) TYPE c,
        tax12(000004) TYPE c,
        exi12(000001) TYPE c,
        tax13(000004) TYPE c,
        exi13(000001) TYPE c,
        tax14(000004) TYPE c,
        exi14(000001) TYPE c,
        tax15(000004) TYPE c,
        exi15(000001) TYPE c,
      END OF ts_p0464.

TYPES: BEGIN OF ts_employee_data,
         position_id(013),
         change_effective(010),
         is_paid_by_wfn(001),
         pos_uses_time(001),
         co_code(004),
         file_number(012),
         hire_date(010),
         seniority_date(010),
         credited_service_date(010),
         adjusted_service_date(010),
         employee_status(001),
         termination_date(010),
         term_reason(003),
         rehire_date(010),
         rehire_reason(003),
         loa_start_date(010),
         loa_exp_ret_date(010),
         loa_return_date(010),
         loa_reason(003),
         pos_start_date(010),
         reports_to_id(013),
         home_cost_number(010),
         home_department(006),
         location_code(005),
         pay_group(001),
         last_name(040),
         first_name(040),
         actual_mar_sta(001),
         tax_id_number(009),
         tax_id_expy_date(010),
         birth_date(010),
         corresp_lang(001),
         gender(001),
         addr1_use_as_leg(001),
         address_line_1(030),
         address_line_2(030),
         address_1_prov(002),
         address_1_city(040),
         address_1_pstlcd(007),
         address_1_cntry(002),
         work_email(100),
         receive_schd_pay(001),
         standard_hours(006),
         rate_type(001),
         rate_amount(012),
         comp_chnge_reasn(006),
         same_tax_form(001),
         transfer_date(010),
         payment_method(001),
         primary_bank(003),
         primary_branch(005),
         primary_accnt_no(012),
         secondary_bank(003),
         secondary_branch(005),
         second_accnt_no(012),
         second_dep_amnt(012),
         prov_of_emplymnt(002),
         cra_pa_rq_id(003),
         fedtax_crdt_type(001),
*         fedtax_crdt_oamt(012),
         prvtax_crdt_type(001),
*         prvtax_crdt_oamt(012),
*         dont_calc_fedtax(001),
*         dont_calc_c_qpp(001),
*         do_not_calc_ei(001),
*         reason_for_issue(003),
*         comments_on_roe(001),
*         employee_occup(016),
         first_day_worked(010),
         last_day_paid(010),
         expected_recall(001),
         expd_recall_date(010),
         ready_to_issue(001),
         badge(015),
         payclass(025),
         begda_track_time(010),
*         endda_track_time(010),
         supervisorflag(001),
         supervisorid(013),
         timezone(008),
         xfertopayroll(001),
*         to_policy_name(030),
*         to_plcyass_begda(010),
         union_code(003),
         worker_category(003),
      END OF ts_employee_data,

      BEGIN OF ts_bank,
        payment_method     TYPE ts_employee_data-payment_method,
        effective_date_p   TYPE d,
        primary_bank       TYPE ts_employee_data-primary_bank,
        primary_branch     TYPE ts_employee_data-primary_branch,
        primary_accnt_no   TYPE ts_employee_data-primary_accnt_no,
        effective_date_s   TYPE d,
        secondary_bank     TYPE ts_employee_data-secondary_bank,
        secondary_branch   TYPE ts_employee_data-secondary_branch,
        second_accnt_no    TYPE ts_employee_data-second_accnt_no,
        second_dep_amnt    TYPE ts_employee_data-second_dep_amnt,
      END OF ts_bank,

      BEGIN OF ts_exemptions,
        fed TYPE c LENGTH 1,   "E = exempt, <null> = non-exempt
        cpp TYPE c LENGTH 1,   "E = exempt, <null> = non-exempt
        ei  TYPE c LENGTH 1,   "E = exempt, <null> = non-exempt
      END OF ts_exemptions,

      BEGIN OF ts_export_flags,
        ed_export TYPE c LENGTH 1, "Employee data export flag; 1 = export, 0 = don't export
      END OF ts_export_flags,

      BEGIN OF ts_change_blocks,
        cb_1  TYPE c LENGTH 1,   "X = Export Change Block 1
        cb_2  TYPE c LENGTH 1,   "X = Export Change Block 2
        cb_3  TYPE c LENGTH 1,   "X = Export Change Block 3
        cb_4  TYPE c LENGTH 1,   "X = Export Change Block 4
        cb_5  TYPE c LENGTH 1,   "X = Export Change Block 5
        cb_6  TYPE c LENGTH 1,   "X = Export Change Block 6
        cb_7  TYPE c LENGTH 1,   "X = Export Change Block 7
        cb_8  TYPE c LENGTH 1,   "X = Export Change Block 8
        cb_9  TYPE c LENGTH 1,   "X = Export Change Block 9
        cb_10 TYPE c LENGTH 1,   "X = Export Change Block 10
        cb_11 TYPE c LENGTH 1,   "X = Export Change Block 11
        cb_12 TYPE c LENGTH 1,   "X = Export Change Block 12
        cb_13 TYPE c LENGTH 1,   "X = Export Change Block 13
        cb_14 TYPE c LENGTH 1,   "X = Export Change Block 14
        cb_15 TYPE c LENGTH 1,   "X = Export Change Block 15
        cb_16 TYPE c LENGTH 1,   "X = Export Change Block 16
        cb_17 TYPE c LENGTH 1,   "X = Export Change Block 17
        cb_18 TYPE c LENGTH 1,   "X = Export Change Block 18
        cb_19 TYPE c LENGTH 1,   "X = Export Change Block 19
        cb_20 TYPE c LENGTH 1,   "X = Export Change Block 20
        cb_21 TYPE c LENGTH 1,   "X = Export Change Block 21
        cb_22 TYPE c LENGTH 1,   "X = Export Change Block 22
        cb_23 TYPE c LENGTH 1,   "X = Export Change Block 23
        cb_24 TYPE c LENGTH 1,   "X = Export Change Block 24
        cb_25 TYPE c LENGTH 1,   "X = Export Change Block 25
        cb_26 TYPE c LENGTH 1,   "X = Export Change Block 26
        cb_27 TYPE c LENGTH 1,   "X = Export Change Block 27 - Time Bundle
        cb_28 TYPE c LENGTH 1,   "X = Export Change Block 28 - Work email
*        cb_29 TYPE c LENGTH 1,   "X = Export Change Block 29 - Time Off Policy Bundle
        cb_30 TYPE c LENGTH 1,   "X = Export Change Block 28 - Location Code
        cb_31 TYPE c LENGTH 1,
        cb_32 TYPE c LENGTH 1,
      END OF ts_change_blocks,

      BEGIN OF ts_column_names,
        field TYPE c LENGTH 25,
        name  TYPE c LENGTH 40,
      END OF ts_column_names.

TYPES: tt_if_results    TYPE STANDARD TABLE OF ts_if_results,
       tt_p0000         TYPE STANDARD TABLE OF ts_p0000,
       tt_p0001         TYPE STANDARD TABLE OF ts_p0001,
       tt_p0002         TYPE STANDARD TABLE OF ts_p0002,
       tt_p0006         TYPE STANDARD TABLE OF ts_p0006,
       tt_p0008         TYPE STANDARD TABLE OF ts_p0008,
       tt_p0009         TYPE STANDARD TABLE OF ts_p0009,
       tt_p0014         TYPE STANDARD TABLE OF ts_p0014,
       tt_p0019         TYPE STANDARD TABLE OF ts_p0019,
       tt_p0032         TYPE STANDARD TABLE OF ts_p0032,
       tt_p0033         TYPE STANDARD TABLE OF ts_p0033,
       tt_p0041         TYPE STANDARD TABLE OF ts_p0041,
       tt_p0105         TYPE STANDARD TABLE OF ts_p0105,
       tt_p0167         TYPE STANDARD TABLE OF ts_p0167,
       tt_p0168         TYPE STANDARD TABLE OF ts_p0168,
       tt_p0169         TYPE STANDARD TABLE OF ts_p0169,
       tt_p0185         TYPE STANDARD TABLE OF ts_p0185,
       tt_p0461         TYPE STANDARD TABLE OF ts_p0461,
       tt_p0462         TYPE STANDARD TABLE OF ts_p0462,
       tt_p0463         TYPE STANDARD TABLE OF ts_p0463,
       tt_p0464         TYPE STANDARD TABLE OF ts_p0464.

TYPES: tt_employee_data TYPE STANDARD TABLE OF ts_employee_data,
       tt_column_names  TYPE STANDARD TABLE OF ts_column_names.

TYPES  tv_raw_length TYPE i.
CONSTANTS gc_raw_length TYPE tv_raw_length VALUE 2000.
TYPES ts_raw_line TYPE c LENGTH gc_raw_length.

CONSTANTS: gc_if_version LIKE zhr_pcl2-versn VALUE '01',
           gc_if_name    LIKE t532a-fldid    VALUE 'ADPK'.

CONSTANTS: gc_permanent_address LIKE p0006-anssa VALUE '1',
           gc_end_of_leave      LIKE p0019-tmart VALUE '7G',
           gc_wfn_stats         LIKE p0033-subty VALUE '9011',
           gc_email_address     LIKE p0105-usrty VALUE '0010',
           gc_wfn_payroll_id    LIKE p0185-ictyp VALUE 'Z3'.

CONSTANTS: gc_part TYPE c LENGTH 1 VALUE space,
           gc_all  TYPE c LENGTH 1 VALUE '1'.

CONSTANTS: gc_ca_path   TYPE c LENGTH 34  VALUE '\\scvmerpfs\HCM\ADP WFN Interface\',
           gc_archive   TYPE c LENGTH 7   VALUE 'Archive',
           gc_filename  TYPE c LENGTH 6   VALUE 'ADPWFN'.

CONSTANTS: gc_ext TYPE c LENGTH 3 VALUE 'CSV'.


FIELD-SYMBOLS: <gs_p0000> TYPE ts_p0000,
               <gs_p0001> TYPE ts_p0001,
               <gs_p0002> TYPE ts_p0002,
               <gs_p0006> TYPE ts_p0006,
               <gs_p0008> TYPE ts_p0008,
               <gs_p0009> TYPE ts_p0009,
               <gt_p0009> TYPE tt_p0009,
               <gs_p0019> TYPE ts_p0019,
               <gs_p0032> TYPE ts_p0032,
               <gs_p0033> TYPE ts_p0033,
               <gt_p0033> TYPE tt_p0033,
               <gs_p0041> TYPE ts_p0041,
               <gs_p0105> TYPE ts_p0105,
               <gs_p0185> TYPE ts_p0185,
               <gs_p0461> TYPE ts_p0461,
               <gs_p0462> TYPE ts_p0462,
               <gs_p0463> TYPE ts_p0463,
               <gs_p0464> TYPE ts_p0464,

               <gs_employee_data> TYPE ts_employee_data.

DATA: gt_old_p0000 TYPE tt_p0000,
      gt_old_p0001 TYPE tt_p0001,
      gt_old_p0002 TYPE tt_p0002,
      gt_old_p0006 TYPE tt_p0006,
      gt_old_p0008 TYPE tt_p0008,
      gt_old_p0009 TYPE tt_p0009,
      gt_old_p0014 TYPE tt_p0014,
      gt_old_p0019 TYPE tt_p0019,
      gt_old_p0032 TYPE tt_p0032,
      gt_old_p0033 TYPE tt_p0033,
      gt_old_p0041 TYPE tt_p0041,
      gt_old_p0105 TYPE tt_p0105,
      gt_old_p0167 TYPE tt_p0167,
      gt_old_p0168 TYPE tt_p0168,
      gt_old_p0169 TYPE tt_p0169,
      gt_old_p0185 TYPE tt_p0185,
      gt_old_p0461 TYPE tt_p0461,
      gt_old_p0462 TYPE tt_p0462,
      gt_old_p0463 TYPE tt_p0463,
      gt_old_p0464 TYPE tt_p0464.

DATA: gt_new_p0000 TYPE tt_p0000,
      gt_new_p0001 TYPE tt_p0001,
      gt_new_p0002 TYPE tt_p0002,
      gt_new_p0006 TYPE tt_p0006,
      gt_new_p0008 TYPE tt_p0008,
      gt_new_p0009 TYPE tt_p0009,
      gt_new_p0014 TYPE tt_p0014,
      gt_new_p0019 TYPE tt_p0019,
      gt_new_p0032 TYPE tt_p0032,
      gt_new_p0033 TYPE tt_p0033,
      gt_new_p0041 TYPE tt_p0041,
      gt_new_p0105 TYPE tt_p0105,
      gt_new_p0167 TYPE tt_p0167,
      gt_new_p0168 TYPE tt_p0168,
      gt_new_p0169 TYPE tt_p0169,
      gt_new_p0185 TYPE tt_p0185,
      gt_new_p0461 TYPE tt_p0461,
      gt_new_p0462 TYPE tt_p0462,
      gt_new_p0463 TYPE tt_p0463,
      gt_new_p0464 TYPE tt_p0464.

DATA: gs_old_p0000 TYPE ts_p0000,
      gs_old_p0001 TYPE ts_p0001,
      gs_old_p0002 TYPE ts_p0002,
      gs_old_p0006 TYPE ts_p0006,
      gs_old_p0008 TYPE ts_p0008,
      gs_old_p0009 TYPE ts_p0009,
      gs_old_p0014 TYPE ts_p0014,
      gs_old_p0019 TYPE ts_p0019,
      gs_old_p0032 TYPE ts_p0032,
      gs_old_p0033 TYPE ts_p0033,
      gs_old_p0041 TYPE ts_p0041,
      gs_old_p0105 TYPE ts_p0105,
      gs_old_p0167 TYPE ts_p0167,
      gs_old_p0168 TYPE ts_p0168,
      gs_old_p0169 TYPE ts_p0169,
      gs_old_p0185 TYPE ts_p0185,
      gs_old_p0461 TYPE ts_p0461,
      gs_old_p0462 TYPE ts_p0462,
      gs_old_p0463 TYPE ts_p0463,
      gs_old_p0464 TYPE ts_p0464.

DATA: gs_new_p0000 TYPE ts_p0000,
      gs_new_p0001 TYPE ts_p0001,
      gs_new_p0002 TYPE ts_p0002,
      gs_new_p0006 TYPE ts_p0006,
      gs_new_p0008 TYPE ts_p0008,
      gs_new_p0009 TYPE ts_p0009,
      gs_new_p0014 TYPE ts_p0014,
      gs_new_p0019 TYPE ts_p0019,
      gs_new_p0032 TYPE ts_p0032,
      gs_new_p0033 TYPE ts_p0033,
      gs_new_p0041 TYPE ts_p0041,
      gs_new_p0105 TYPE ts_p0105,
      gs_new_p0167 TYPE ts_p0167,
      gs_new_p0168 TYPE ts_p0168,
      gs_new_p0169 TYPE ts_p0169,
      gs_new_p0185 TYPE ts_p0185,
      gs_new_p0461 TYPE ts_p0461,
      gs_new_p0462 TYPE ts_p0462,
      gs_new_p0463 TYPE ts_p0463,
      gs_new_p0464 TYPE ts_p0464.

DATA: gs_header   TYPE ts_raw_line,
      gs_line_out TYPE ts_raw_line,
      gt_file_out TYPE STANDARD TABLE OF ts_raw_line,
      gt_file_1   TYPE STANDARD TABLE OF ts_raw_line, "Active EEs whose manager flag changes to Yes
      gt_file_2   TYPE STANDARD TABLE OF ts_raw_line, "Rest of the employees
      gt_file_3   TYPE STANDARD TABLE OF ts_raw_line, "Active EEs whose manger flag changes to No
      gt_file_4   TYPE STANDARD TABLE OF ts_raw_line, "Terminated employee that is not a manager
      gt_file_5   TYPE STANDARD TABLE OF ts_raw_line. "Terminated employee that is a manager

DATA: gv_frper TYPE n LENGTH 6,   "Payroll period
      gv_frbeg TYPE d,            "Payroll period begin date
      gv_frend TYPE d.            "Payroll period end date

DATA: gs_component      TYPE         abap_compdescr,
      go_structdescr_ed TYPE REF TO  cl_abap_structdescr.  "Structure description for Employee Data

DATA: gv_date_01            TYPE dardt,       "Original Hire Date
      gv_date_06            TYPE dardt,       "Ajusted Service Date
      gv_date_07            TYPE dardt,       "Last Day Worked
      gv_date_08            TYPE dardt,       "Last Day Paid
      gv_date_09            TYPE dardt,       "Rehire Date
      gv_date_11            TYPE dardt,       "Tax ID Expiry Date
      gv_date_12            TYPE dardt,       "Seniority Date
      gv_date_98            TYPE dardt,       "Hire Date
      gv_date_99            TYPE dardt.       "Termination Date

DATA: gv_abart              TYPE t503-abart,  "1 = Hourly, 3 = Salaried
      gv_trfkz              TYPE t503-trfkz,  "For getting the payroll frequency
      gv_zeinh              TYPE t549r-zeinh. "Payroll frequency

DATA: gt_employee_data      TYPE tt_employee_data,
      gs_employee_data      TYPE ts_employee_data,
      gs_old_employee_data  TYPE ts_employee_data,
      gs_new_employee_data  TYPE ts_employee_data,
      gt_column_names       TYPE tt_column_names.

DATA: gv_effective_date     TYPE d,
      gv_transfer_date      TYPE d,
      gv_comp_change_date   TYPE d.

DATA: gv_same_tax_form      TYPE ts_employee_data-same_tax_form,
      gs_bank               TYPE ts_bank,
      gs_exemptions         TYPE ts_exemptions.

DATA: gs_change_blocks      TYPE ts_change_blocks,
      gs_export_flags       TYPE ts_export_flags.

*DATA: gv_time_iteration     TYPE n LENGTH 1.  "Iteration number of the time structure loop

DATA: gv_num_exported_pernr  TYPE n LENGTH 6,
      gv_num_selected_pernr  LIKE gv_num_exported_pernr,
      gv_num_rejected_pernr  LIKE gv_num_exported_pernr,
      gv_number_of_records   TYPE i.