Replace CR with CRLF

hi all,
I have a simple problem, I would like to replace CR with CRLF but I never found any routine... anyone could help me? Thanks.

I have to replace CR to CRLF in a file. I try to explain my problem: I read a file from a ZOS machine via FTP
and I write it on a server. But the output file has CR and I would like CRLF, during the write process (I read a byte buffer) I tried to replace char 10 to 13, 10, it seems work but...
(I apologize for my poor english!)
Thanks

Similar Messages

  • My 5th gen. ipod died and they replaced it with a new one, but I'm having problems getting the music. An error message says that its not authorized on this computer. The ipod is synced but it wont let me add what music I want.

    My 5th gen ipod died and apple replaced it with a new one. I synced it up to the itunes that I already have on my computer but an error message keeps coming up telling me that its not authorized on this computer. What do I do?

    About iTunes Store authorization and deauthorization
    iPod: Troubleshooting songs and audiobooks that won't play
    iPod does not play content purchased from the iTunes Store

  • I not so recently changed my email adress I associated with my Apple ID and my iCloud ID. My old email still shows up for iCloud, and won't let me change it to my new email. When I try to delete it and replace it with the proper email, it wants my passwor

    I not so recently changed my email adress I associated with my Apple ID and my iCloud ID. My old email still shows up for iCloud, and won't let me change it to my new email. When I try to delete it and replace it with the proper email, it wants my password, which it won't accept because it's an invalid username.

    I had this same issue and got it resolved very simply when I contacted Apple SUpport
    Go to https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/ and sign into your infomation
    > Go to Manage apple id and primary email address
    > Change it to the old apple id that your device is asking for
    > Save changes
    > Go to Settings > iCloud and sign out of the infomation
    > Go back to https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    > Change it back to the correct apple id
    > Go to the email address adn reverify the apple id
    > Sign back into iCloud on your device
    > Smile
    Article to back up my statement http://support.apple.com/kb/TS5223

  • After soak test update, I get error messages repeatedly. The majority are "unfortunately, messaging has stopped", but you can replace messaging with "android os", or any other process, as it happens with more than just messaging. I have had numerous peopl

    After soak test update, I get error messages repeatedly. The majority are "unfortunately, messaging has stopped", but you can replace messaging with "android os", or any other process, as it happens with more than just messaging. I have had numerous people call and ask why I didn't reply to their texts...and I look, but have not received any new texts. YES, I have restarted phone. I have cleared data as well as cache on all apps. I have downloaded the vzw messaging app, which seems silly, since it happens with several different processes and apps, but all to no avail. I am missing texts from my employer, from my family. This did happen, but rarely, before this "soak test". It is now Kitkat version 19.6.3.obake_verizon.en.US. THIS is when I started having problems...like 50 times a day kind of problems! I have seen hundreds of posts all over the internet over the past 3 days. Does no one know how to fix this??? Shouldn't there be a way to revert phone to a pre-update state? and no, hard reset did NOT work!!!! I have been with verizon for well over 15 years, but I have not upgraded my lines and will not in July either. This is ridiculous. It's not like my games aren't working, it is my messaging and "android os"...my lifeline at work!

    kristinaf333,
    Oh no, I am sorry to hear your messages are not working since the software update. I greatlly appreciate doing all that troubleshooting to try and get the messaging application back in business. I know how much I rely on my messages so I can understand the urgency to get this resolved. Have you had a resolution ticket opened since you started experiencing issues with your messages? Does this happen with all contacts or just some? Please provide additional information to ensure we get to the bottom of this for you.
    KarenC_VZW
    Follow us on Twitter @VZWSupport

  • I have a MacBook Pro 15.4" 2.53GHz Core 2 Duo (A1286) - Mid 2009 MC118LL/A and I think the MATSHITA DVD-R   UJ-868 is going out. Should I replace it with the exact same drive or is there a better one that is compatible?

    I have a MacBook Pro 15.4" 2.53GHz Core 2 Duo (A1286) - Mid 2009 MC118LL/A and I think the MATSHITA DVD-R   UJ-868 is going out. Should I replace it with the exact same drive or is there a better one that is compatible?

    I went to my local Apple store last weekend with a similar issue on my 2007 C2D MBP and they quoted me a price of around £60 (excluding VAT) to replace the optical drive. That's about the same price as the external optical drive a bought for my RMBP.
    Alternatively you could just buy a 3rd party external drive if you want to save cash but note that the external Apple superdrive is not compatible with MacBooks with built in optical drives.

  • I have changed computers and installed iTunes on my new computer. I want to sync my iphone now but the "sync" program indicates that it will remove all data on my phone and replace it with the newly installed itunes that does not have my information.

    I have a new computer and have installed iTunes on it.
    Now I want to sync my iphone but the new itunes on the new computer wants to remove everything on my niphone and replace it with what's on the newly installed itunes data but it does not have my data.
    How can I sync the new itunes with my iphone and not have my phone data wiped out?
    Thanks,
    hscllc

    hscllc wrote:
     How can I sync the new itunes with my iphone and not have my phone data wiped out?
    There is no way to stop iTunes from doing exactly what it is designed to do.
    The iPhone is designed to sync with one and only one computer.
    If you have moved/copied your iTunes library from your old computer to your new one, then iTunes wiping your device is no problem.  You would simply sync and iTunes will put all the content back.

  • Required replace BSEG with BSAK BSIK BSIS BSAS for report performance

    Hi Experts
    i m optimizing a report in which data is extracting from BSEG , 5 time so i reduses the performance of report
    so i want replace BSEG with BSAK BSIK BSIS BSAS for the same data what I am getting now . this is report of Purchase of item. code is here.
    REPORT  zmm_pur_reg_kanhe LINE-SIZE 1023.
    *& Des         :Purchase Tax Register Report for KANHE
    *& Created on  :12-07-07
    *& Suggested by:Paresh Saini(MM)
    *& Changes By: Lailu Philip
    *& Changed On: 24.09.2007
    *& Changes: New columns for G/L Code Description,VAT Amt,VAT Perc,CST Perc
    *&                         ,SHCESS Amounts,WCT G/L Acc., WCT Amt,Tax Code
    *&                          for Purchase Order,WCT tax code & Percentage.
    *& Request No:  S6DK921577
    Data Declaration
    *& changes: by Vincy on 12.01.2007
    *& changes: display purchase order with vendor type zpsr(get_zpsr)
    *& Request No:  S6DK930821
    TABLES:ekbe, lfa1, faglflexa.",j_1iexcdtl,lfa1,bkpf,bseg.
    TYPE-POOLS: slis.                                 "ALV Declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           gd_layout    TYPE slis_layout_alv,
           gd_repid     LIKE sy-repid.
    DATA: it_sortcat   TYPE slis_sortinfo_alv OCCURS 1,
           col_pos LIKE fieldcatalog-col_pos .
    TYPES :BEGIN OF wa1_ekbe,
            belnr         TYPE ekbe-belnr,
            budat         TYPE ekbe-budat,
            menge         TYPE ekbe-menge,
            matnr         TYPE ekbe-matnr,
            ebelp         TYPE j_1iexcdtl-ritem1,
            ebeln         TYPE ekbe-ebeln,
            gjahr         TYPE ekbe-gjahr,
            lfbnr         TYPE ekbe-lfbnr,
            lfpos         TYPE ekbe-lfpos,
            bldat         TYPE ekbe-bldat,
            REEWR         TYPE REEWR,
            END OF wa1_ekbe.
    TYPES :BEGIN OF wa2_ekbe,
            belnr         TYPE ekbe-belnr,
            budat         TYPE ekbe-budat,
            menge         TYPE ekbe-menge,
            ebelp         TYPE ekbe-ebelp,
            ebeln         TYPE ekbe-ebeln,
            gjahr         TYPE ekbe-gjahr,
            lfbnr         TYPE ekbe-lfbnr,
            lfpos         TYPE ekbe-lfpos,
            bldat         TYPE ekbe-bldat,
            REEWR         TYPE REEWR,
            awkey(20)         TYPE c,
            MATNR         TYPE MATNR,
            MWSKZ         TYPE EKBE-MWSKZ,
            END OF wa2_ekbe.
    TYPES :BEGIN OF wa1_j_1iexcdtl,
            exnum         TYPE j_1iexcdtl-exnum,
            exdat         TYPE j_1iexcdtl-exdat,
            lifnr         TYPE j_1iexcdtl-lifnr,
            matnr         TYPE j_1iexcdtl-matnr ,
          maktx         TYPE j_1iexcdtl-maktx ,
          capind      TYPE j_1iexcdtl-capind,
            exbas         TYPE j_1iexcdtl-exbas,
            exbed             TYPE j_1iexcdtl-exbed,
            ecs            TYPE j_1iexcdtl-ecs,
            werks             TYPE j_1iexcdtl-werks,
            ritem1        TYPE j_1iexcdtl-ritem1,
            rdoc1             TYPE j_1iexcdtl-rdoc1,
            docyr         TYPE j_1iexcdtl-docyr,
            bedinv        type J_1IBEDINV,
            ecsinv        type J_1IECSINV,
            EXADDINV1     type J_1IEXADDINV1,
            exaddtax1    TYPE j_1iexcdtl-exaddtax1,
            rdoc2         TYPE j_1iexcdtl-rdoc2,
            ritem2        TYPE j_1iexcdtl-ritem2,
            menge         TYPE j_1iexcdtl-menge,
    ADDED FOR RUDRAPUR ON 08.03.2008 BY ASHOK.CH
    *ENDED ON 08.02.2008
            END OF wa1_j_1iexcdtl.
    TYPES :BEGIN OF wa1_lfa1,
            name1         TYPE lfa1-name1,
            ktokk         TYPE lfa1-ktokk,
            werks         TYPE lfa1-werks,
            lifnr         TYPE lfa1-lifnr,
            END OF wa1_lfa1.
    TYPES :BEGIN OF wa1_ekexclf,
            belnr         TYPE ekbe-belnr,
            budat         TYPE ekbe-budat,
            menge         TYPE ekbe-menge,
            ebelp         TYPE ekbe-ebelp,
            ebeln         TYPE ekbe-ebeln,
            gjahr         TYPE ekbe-gjahr,
            awkey(20)     TYPE c,
            exnum         TYPE j_1iexcdtl-exnum,
            exdat         TYPE j_1iexcdtl-exdat,
            lifnr         TYPE j_1iexcdtl-lifnr,
            matnr         TYPE j_1iexcdtl-matnr ,
          maktx         TYPE j_1iexcdtl-maktx ,
          capind      TYPE j_1iexcdtl-capind,
            exbas         TYPE j_1iexcdtl-exbas,
            exbed             TYPE j_1iexcdtl-exbed,
            ecs            TYPE j_1iexcdtl-ecs,
            werks             TYPE j_1iexcdtl-werks,
            ritem1        TYPE j_1iexcdtl-ritem1,
            rdoc1             TYPE j_1iexcdtl-rdoc1,
            docyr         TYPE j_1iexcdtl-docyr,
            name1         TYPE lfa1-name1,
            ktokk         TYPE lfa1-ktokk,
            exaddtax1     TYPE j_1iexcdtl-exaddtax1,
    added for rudrapur on 08.03.2008 by ASHOK.CH
            bedinv        type J_1IBEDINV,
            ecsinv        type J_1IECSINV,
            EXADDINV1     type J_1IEXADDINV1,
    END OF MODIFICATION ON 08.02.2008
            END OF  wa1_ekexclf.
    TYPES :BEGIN OF wa1_bkpf,
            bukrs TYPE bkpf-bukrs,
            belnr TYPE bkpf-belnr,
            gjahr TYPE bkpf-gjahr,
            budat TYPE bkpf-budat,
            tcode TYPE bkpf-tcode,
            awkey TYPE bkpf-awkey,
            END OF wa1_bkpf.
    TYPES :BEGIN OF wa1_bseg,
            bukrs     TYPE bseg-bukrs,
            belnr     TYPE bseg-belnr,     
            gjahr         TYPE bseg-gjahr,
            buzei     TYPE bseg-buzei,
            bschl     TYPE bseg-bschl,
            fwbas     TYPE bseg-fwbas ,     
            pswbt         TYPE bseg-pswbt,
            hkont         TYPE bseg-hkont,
            wrbtr     TYPE bseg-wrbtr,
            ktosl     TYPE bseg-ktosl,
            koart     TYPE bseg-koart,
            shkzg     TYPE bseg-shkzg,
            mwskz     TYPE bseg-mwskz,
            qsskz     TYPE bsis-qsskz,
            dmbtr     TYPE bseg-dmbtr,
            lifnr     TYPE bseg-lifnr,
            matnr     TYPE bseg-matnr,
            flag      TYPE C,
            flag_21   TYPE C,
            END OF wa1_bseg.
    TYPES :BEGIN OF wa1_tax,
            belnr         TYPE bseg-belnr,
            fi_docno      TYPE bseg-belnr,
            gjahr             TYPE bseg-gjahr,
            bukrs         TYPE bseg-bukrs,
            awkey         TYPE bkpf-awkey,
            fwbas         TYPE bseg-fwbas ,
            cst_amt       TYPE bseg-pswbt,
            vat_amt       TYPE bseg-pswbt,
            shcess_amt    TYPE bseg-pswbt,
            gl_accnt      TYPE bseg-hkont,
            gl_desc       TYPE skat-txt50,
            wctglacc      TYPE bseg-hkont,
            wctamt        TYPE bseg-dmbtr,
            taxcode       TYPE t059z-wt_withcd,
            taxperc       TYPE t059z-qsatz,
            total_value   TYPE bseg-wrbtr,
            set_off       TYPE bseg-wrbtr,
            cond_type     TYPE konv-kschl,
            description(20)   TYPE c,
            service_tax       TYPE bseg-wrbtr,
            service_ecess     TYPE bseg-wrbtr,
            service_shcess     TYPE bseg-wrbtr,      "vincy on 31.01.08
            ebelp         TYPE ekbe-ebelp,           "      on 15.04.08
            flag          TYPE c,
            mwskz     TYPE bseg-mwskz,
            END OF wa1_tax.
    DATA:BEGIN OF itab_skat,
           saknr TYPE skat-saknr,
           spras TYPE skat-spras,
           txt50 TYPE skat-txt50,
           END OF itab_skat.
    DATA: iskat LIKE itab_skat OCCURS 0,
           wa_skat LIKE itab_skat.
    DATA : BEGIN OF zbsis OCCURS 0,
             bukrs TYPE bsis-bukrs,
             hkont TYPE bsis-hkont,
             augdt TYPE bsis-augdt,
             augbl TYPE bsis-augbl,
             zuonr TYPE bsis-zuonr,
             gjahr TYPE bsis-gjahr,
             belnr TYPE bsis-belnr,
             buzei TYPE bsis-buzei,
             budat TYPE bsis-budat,
             qsskz TYPE bsis-qsskz,
            END OF zbsis.
    DATA: BEGIN OF zt059z OCCURS 0,
           land1 TYPE t059z-land1,
           witht TYPE t059z-witht,
           wt_withcd TYPE t059z-wt_withcd,
           qscod TYPE t059z-qscod,
           qsatz TYPE t059z-qsatz,
           hkont TYPE bsis-hkont,
           belnr TYPE bsis-belnr,
           END OF zt059z.
    DATA: BEGIN OF it_faglflexa OCCURS 0,      "added by vincy
          ryear TYPE faglflexa-ryear,
          docnr TYPE faglflexa-docnr,
          rldnr TYPE faglflexa-rldnr,
          rbukrs TYPE faglflexa-rbukrs,
          docln TYPE faglflexa-docln,
          prctr TYPE faglflexa-prctr,
          END OF it_faglflexa.
    Final Table***
    TYPES :BEGIN OF wa1_final,
             belnr         TYPE ekbe-belnr,
             fi_docno      TYPE bseg-belnr,
             budat         TYPE ekbe-budat,
             menge         TYPE ekbe-menge,
             rate          TYPE konv-kbetr,
             ebelp         TYPE ekbe-ebelp,
             ebeln         TYPE ekbe-ebeln,
             mwskz         TYPE bseg-mwskz,
             gjahr         TYPE ekbe-gjahr,
             awkey(20)     TYPE c,
             exnum         TYPE j_1iexcdtl-exnum,
             exdat         TYPE j_1iexcdtl-exdat,
             lifnr         TYPE j_1iexcdtl-lifnr,
             matnr         TYPE j_1iexcdtl-matnr ,
           maktx         TYPE j_1iexcdtl-maktx ,
             capind       TYPE string,
             exbas         TYPE j_1iexcdtl-exbas,
             exbed       TYPE j_1iexcdtl-exbed,
             ecs             TYPE j_1iexcdtl-ecs,
             werks       TYPE j_1iexcdtl-werks,
             ritem1        TYPE j_1iexcdtl-ritem1,
             rdoc1       TYPE j_1iexcdtl-rdoc1,
             docyr         TYPE j_1iexcdtl-docyr,
             name1         TYPE lfa1-name1,
             ktokk         TYPE lfa1-ktokk,
             fwbas         TYPE bseg-fwbas ,
             vat_per       TYPE konv-kbetr,
             vat_amt       TYPE bseg-pswbt,
             cst_per       TYPE konv-kbetr,
             cst_amt       TYPE bseg-pswbt,
             shcess_amt    TYPE bseg-pswbt,
             gl_accnt      TYPE bseg-hkont,
             gl_desc       TYPE skat-txt50,
             wctglacc      TYPE bseg-hkont,
             wctamt        TYPE bseg-dmbtr,
             taxcode       TYPE t059z-wt_withcd,
             taxperc       TYPE t059z-qsatz,
             total_value   TYPE bseg-wrbtr,
             total_value1 TYPE bseg-wrbtr,
             excise_tax    TYPE bseg-wrbtr,
             excise  TYPE bseg-wrbtr,
             set_off       TYPE bseg-wrbtr,
             inventorised  TYPE konv-kawrt,
             cond_type     TYPE konv-kschl,
             cond_type2    TYPE konv-kschl,
             description(20)   TYPE c,
             service_tax       TYPE bseg-wrbtr,
             service_ecess     TYPE bseg-wrbtr,
             service_shcess    TYPE bseg-wrbtr,            "vincy on 31.01.08
            END OF wa1_final.
    DATA :it2_ekbe        TYPE TABLE OF wa1_ekbe WITH HEADER LINE,
           it_ekbe        TYPE TABLE OF wa1_ekbe WITH HEADER LINE,
           it1_ekbe       TYPE TABLE OF wa2_ekbe WITH HEADER LINE WITH KEY ebelp ebeln,
           it_j_1iexcdtl  TYPE TABLE OF wa1_j_1iexcdtl WITH HEADER LINE WITH KEY rdoc1 ritem1,
           it_lfa1        TYPE TABLE OF wa1_lfa1 WITH HEADER LINE WITH KEY lifnr,
           it_lfa2        TYPE TABLE OF wa1_lfa1 WITH HEADER LINE WITH KEY lifnr,
           it_bkpf        TYPE TABLE OF wa1_bkpf WITH HEADER LINE,
           it_bseg        TYPE TABLE OF wa1_bseg WITH HEADER LINE WITH  KEY
                                        bukrs belnr gjahr ktosl shkzg koart,
           it1_bseg        TYPE TABLE OF wa1_bseg WITH HEADER LINE WITH  KEY
                                        bukrs belnr gjahr ktosl shkzg koart,
           it_tax         TYPE TABLE OF wa1_tax WITH HEADER LINE WITH KEY awkey ,
           it_ekexclf     TYPE TABLE OF wa1_ekexclf WITH HEADER LINE,
           it_final       TYPE TABLE OF wa1_final WITH HEADER LINE,
           it_final1      TYPE TABLE OF wa1_final WITH HEADER LINE,         "vincy
           wa_ekbe       TYPE wa1_ekbe,
           wa1_ekbe      TYPE wa2_ekbe,
           wa_j_1iexcdtl TYPE wa1_j_1iexcdtl,
           wa_lfa1       TYPE wa1_lfa1,
           wa_lfa2       TYPE wa1_lfa1,
           wa_bkpf       TYPE wa1_bkpf,
           wa_bseg       TYPE wa1_bseg,
           wa_tax        TYPE wa1_tax,
           wa_ekexclf    TYPE wa1_ekexclf,
           PLANT TYPE WERKS_D,
           wa_final      TYPE wa1_final.
    DATA: it_konv TYPE konv OCCURS 0 WITH HEADER LINE ,
           wa_konv TYPE konv,
           invent TYPE p DECIMALS 4,
           invent1 TYPE konv-kawrt.
    DATA:d1 TYPE konv-kposn,
          d2 TYPE ekbe-ebelp.
    DATA: v_belnr TYPE ekbe-belnr,
           v_gjahr TYPE ekbe-gjahr,
           v_awkey(20) TYPE c,
           idx TYPE sy-tabix.
    **********by vincy on 12.01.07***********
    DATA: BEGIN  OF it_ekko OCCURS 0,
           ebeln LIKE ekko-ebeln,
           bukrs LIKE ekko-bukrs,
           bsart LIKE ekko-bsart,
           lifnr LIKE ekko-lifnr,
           belnr LIKE ekbe-belnr,
           END OF it_ekko.
    DATA: BEGIN  OF it_ekpo OCCURS 0,
           ebeln LIKE ekpo-ebeln,
           ebelp LIKE ekpo-ebelp,
           txz01 LIKE ekpo-txz01,
           END OF it_ekpo.
    DATA: BEGIN  OF it_lfa1v OCCURS 0,
           lifnr LIKE lfa1-lifnr,
           name1 LIKE lfa1-name1,
           END OF it_lfa1v.
    DATA: BEGIN  OF s_prctr OCCURS 0,
           low LIKE faglflexa-prctr,
           END OF s_prctr.
    DATA: it_bsegv TYPE TABLE OF wa1_bseg WITH HEADER LINE.
    DATA: it_konv1 LIKE konv OCCURS 0 WITH HEADER LINE.
    DATA:cnt TYPE i,
          awkey1(250).
    DATA: LIFNR TYPE LIFNR,
          NAME TYPE NAME1_GP,
          MTART TYPE MARA-MTART,
          MAKTX TYPE MAKTX,
          TAX_TOT TYPE KWERT.
    ***********end of changes by vincy ************
    Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_werks1 FOR ekbe-werks,
                     s_budat1 FOR ekbe-budat,
                     s_fiscal FOR  ekbe-gjahr,
                     s_lifnr FOR lfa1-lifnr.
    SELECTION-SCREEN END OF BLOCK b1.
    **"changes being by nahid on 16.04.2008
    PARAMETERS : excel AS CHECKBOX DEFAULT 'X'.
    PARAMETERS: infile LIKE rlgrap-filename.
    DATA : zfile TYPE string.
    **"changes ended by nahid on 16.04.2008
    AT SELECTION-SCREEN.
       IF s_werks1 IS INITIAL.
         MESSAGE 'Please Enter Plant details' TYPE 'E'.
       ENDIF.
       IF s_budat1 IS INITIAL.
         MESSAGE 'Please Enter Posting date' TYPE 'E'.
       ENDIF.
       IF s_fiscal IS INITIAL.
         MESSAGE 'Please Enter Fiscal Year' TYPE 'E'.
       ENDIF.
    *start change by nahid on 16.4.08
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR infile.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          file_name     = infile
        EXCEPTIONS
          mask_too_long = 1
          OTHERS        = 2.
    zfile = infile.
    *end change by nahid on 16.4.08
    START-OF-SELECTION.
    plant = s_werks1-low.
    MODIFIED FOR RUDRAPUR BY ASHOK.CH ON 13.03.2008
    IF PLANT NE 'RD01'.
       PERFORM get_data.
       PERFORM get_zpsr.                        "vincy
    ENDIF.
    IF PLANT EQ 'RD01'.
        PERFORM get_data1.
    ENDIF.
    *END OF MODIFICATION ON 13.03.2008
       PERFORM build_fieldcatalog.
       PERFORM build_layout.
       PERFORM display_alv_report.
    *start chng by nahid on 16.4.08
    IF excel = 'X'.
        IF NOT infile IS INITIAL.
          PERFORM excel_data.
        ELSE.
          MESSAGE e000(0) WITH 'Please Enter the File Path'.
        ENDIF.
      ENDIF.
    *end by nahid on 16.4.08
    *&      Form  get_data
    FORM get_data .
       SELECT belnr budat menge matnr ebelp ebeln gjahr lfbnr lfpos bldat  REEWR FROM ekbe INTO
       TABLE it_ekbe
       WHERE werks IN s_werks1 AND
            (bewtp EQ 'Q' OR bewtp EQ 'N')     AND
             bewtp IN ('Q' , 'N') AND                 "added N  by vincy on 6.07.2008
             budat IN s_budat1 AND
             gjahr IN s_fiscal .
       IF sy-subrc = 0.               "for 1st ekbe
         IF it_ekbe[] IS NOT INITIAL.
         SELECT exnum exdat lifnr matnr maktx capind exbas exbed ecs werks
         ritem1 rdoc1 docyr bedinv ecsinv EXADDINV1 exaddtax1  rdoc2 ritem2 menge
                FROM j_1iexcdtl INTO TABLE it_j_1iexcdtl FOR ALL ENTRIES IN it_ekbe
                WHERE rdoc1  = it_ekbe-ebeln
                AND ritem1 =  it_ekbe-ebelp AND
                lifnr IN s_lifnr.
         ENDIF.
           IF it_j_1iexcdtl[] IS NOT INITIAL.
           SELECT name1 ktokk werks lifnr FROM lfa1 INTO
                            TABLE it_lfa1 FOR ALL ENTRIES IN it_j_1iexcdtl
                             WHERE lifnr = it_j_1iexcdtl-lifnr.
          ENDIF.
           LOOP AT it_ekbe INTO wa_ekbe.
             wa1_ekbe-belnr        = wa_ekbe-belnr.
             wa1_ekbe-budat        = wa_ekbe-budat.
             wa1_ekbe-menge        = wa_ekbe-menge.
             wa1_ekbe-ebelp        = wa_ekbe-ebelp.
             wa1_ekbe-ebeln        = wa_ekbe-ebeln.
             wa1_ekbe-gjahr        = wa_ekbe-gjahr.
             wa1_ekbe-matnr        = wa_ekbe-matnr.
             wa1_ekbe-lfbnr        = wa_ekbe-lfbnr.
             wa1_ekbe-lfpos        = wa_ekbe-lfpos.
             wa1_ekbe-bldat        = wa_ekbe-bldat.
             v_belnr = wa_ekbe-belnr.
             v_gjahr = wa_ekbe-gjahr.
             CONCATENATE v_belnr v_gjahr INTO v_awkey.
             wa1_ekbe-awkey        = v_awkey.
             APPEND wa1_ekbe TO it1_ekbe.
             CLEAR :wa_ekbe.
           ENDLOOP.
    ************changes by vincy on 29.05.08 for 'FB08' and 'FB60'**************
           LOOP AT s_werks1.
             IF s_werks1-low = 'KN01'.
                s_prctr-low  = 'MUKNHSTM'.
             ELSEIF
              s_werks1-low = 'NS01'.
                s_prctr-low  = 'MUNSKSTM'.
             ELSEIF
              s_werks1-low = 'RD01'.
                s_prctr-low  = 'MURDPSTM'.
             ENDIF.
             APPEND s_prctr.
           ENDLOOP.
           SELECT bukrs belnr gjahr budat tcode awkey FROM bkpf INTO TABLE it_bkpf
                          WHERE bukrs = 'MU51'    AND
                          gjahr IN s_fiscal       AND
                          budat IN s_budat1       AND
                          ( tcode = 'FB60' OR  tcode = 'FB08' ).
          IF it_bkpf[] IS NOT INITIAL.
          SELECT ryear docnr rldnr rbukrs docln prctr FROM faglflexa INTO TABLE it_faglflexa
          FOR ALL ENTRIES IN it_bkpf WHERE rbukrs = 'MU51'   AND
                                           ryear  = it_bkpf-gjahr AND
                                           docnr  = it_bkpf-belnr.
          ENDIF.
          LOOP AT it_faglflexa.
            READ TABLE s_prctr WITH KEY low = it_faglflexa-prctr.
            IF sy-subrc <> 0.
            DELETE it_faglflexa.
            ENDIF.
            CLEAR: it_faglflexa, s_prctr.
          ENDLOOP.
    **************************end of change*************************************
           IF it1_ekbe[] IS NOT INITIAL.
           SELECT bukrs belnr gjahr budat tcode awkey FROM bkpf APPENDING
           TABLE it_bkpf FOR ALL ENTRIES IN it1_ekbe
                          WHERE bukrs = 'MU51'    AND
                          gjahr IN s_fiscal AND
                          awkey = it1_ekbe-awkey.
           ENDIF.
           IF sy-subrc = 0.       "bkpf
             IF it_bkpf[] IS NOT INITIAL.
             SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg INTO TABLE it1_bseg FOR ALL ENTRIES IN it_bkpf
                           WHERE belnr = it_bkpf-belnr AND
                                 gjahr = it_bkpf-gjahr AND
                                 bukrs = it_bkpf-bukrs AND
                                 ( bschl = '21' ) AND
                                 lifnr IN s_lifnr.                      "added 21 for miro cancelation
              IF it1_bseg[] IS NOT INITIAL.
              SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg INTO TABLE it_bseg FOR ALL ENTRIES IN it1_bseg
                           WHERE belnr = it1_bseg-belnr AND
                                 gjahr = it1_bseg-gjahr AND                    "changed it_bkpf to it1_bseg
                                 bukrs = it1_bseg-bukrs .
              LOOP AT it_bseg.
              it_bseg-wrbtr = it_bseg-wrbtr * -1.
              it_bseg-fwbas = it_bseg-fwbas * -1.
              it_bseg-pswbt = it_bseg-pswbt * -1.
              it_bseg-flag_21 = 'X'.
              MODIFY it_bseg.
              CLEAR it_bseg.
              ENDLOOP.
             SELECT name1 ktokk werks lifnr FROM lfa1 INTO
             TABLE it_lfa2 FOR ALL ENTRIES IN it1_bseg
                          WHERE lifnr = it1_bseg-lifnr.
             ENDIF.
             REFRESH it1_bseg.
             SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg INTO TABLE it1_bseg FOR ALL ENTRIES IN it_bkpf
                           WHERE belnr = it_bkpf-belnr AND
                                 gjahr = it_bkpf-gjahr AND
                                 bukrs = it_bkpf-bukrs AND
                                 ( bschl = '31' ) AND                      "added bschl and lifnr by vincy
                                 lifnr IN s_lifnr.
             IF it1_bseg[] IS NOT INITIAL.
             SELECT name1 ktokk werks lifnr FROM lfa1 APPENDING
             TABLE it_lfa2 FOR ALL ENTRIES IN it1_bseg
                          WHERE lifnr = it1_bseg-lifnr.
             SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg mwskz qsskz dmbtr lifnr matnr
                          FROM bseg APPENDING TABLE it_bseg FOR ALL ENTRIES IN it1_bseg
                           WHERE belnr = it1_bseg-belnr AND
                                 gjahr = it1_bseg-gjahr AND                    "changed it_bkpf to it1_bseg
                                 bukrs = it1_bseg-bukrs AND
                                 bschl <> '35'.                                "added bschl to avoid vendor paymnt
            ENDIF.
            SELECT bukrs belnr gjahr buzei bschl fwbas pswbt hkont wrbtr  ktosl koart shkzg  mwskz qsskz dmbtr lifnr
                          FROM bseg APPENDING CORRESPONDING FIELDS OF TABLE it_bseg
                          FOR ALL ENTRIES IN it_bkpf
                          WHERE belnr = it_bkpf-belnr AND
                          gjahr = it_bkpf-gjahr AND
                          lifnr IN s_lifnr AND
                          bukrs = it_bkpf-bukrs AND qsskz IN ('WI', 'WJ').
            ENDIF.
          ENDIF.
           SORT it_bseg BY belnr buzei.
           IF NOT it_bseg[] IS INITIAL.
             SELECT saknr spras txt50 FROM skat
                              INTO TABLE iskat
                              FOR ALL ENTRIES IN it_bseg
                              WHERE saknr = it_bseg-hkont AND spras = 'EN'.
             SELECT  bukrs hkont augdt augbl zuonr gjahr belnr buzei budat qsskz FROM bsis
                               INTO TABLE zbsis
                               FOR ALL ENTRIES IN it_bseg
                               WHERE bukrs = 'MU51' AND hkont = it_bseg-hkont
                               AND belnr = it_bseg-belnr AND gjahr = s_fiscal
                               AND budat IN s_budat1.
           ENDIF.
           LOOP AT it_bseg.
             READ TABLE zbsis WITH KEY hkont = it_bseg-hkont.
             IF sy-subrc = 0.
               it_bseg-qsskz = zbsis-qsskz.
               MODIFY it_bseg.
             ENDIF.
             CLEAR: it_bseg,zbsis.
           ENDLOOP.
           LOOP AT zt059z.
             LOOP AT it_bseg WHERE qsskz = zt059z-wt_withcd.
               zt059z-hkont = it_bseg-hkont.
               zt059z-belnr = it_bseg-belnr.
               MODIFY zt059z.
               CLEAR: it_bseg,zt059z.
             ENDLOOP.
           ENDLOOP.
           CLEAR: wa_bkpf.
    *******Filling Wa.
          LOOP AT it_bkpf INTO wa_bkpf.                     "changes by vincy on 14.04.2008
            LOOP AT it1_ekbe INTO wa1_ekbe .
            READ TABLE it_bkpf INTO wa_bkpf
            WITH KEY awkey = wa1_ekbe-awkey.
             wa_tax-belnr     =    wa_bkpf-belnr.
             wa_tax-gjahr     =    wa_bkpf-gjahr.     
             wa_tax-bukrs     =    wa_bkpf-bukrs.
             wa_tax-awkey     =    wa_bkpf-awkey.
             wa_tax-ebelp     =    wa1_ekbe-ebelp.
             CLEAR: wa_bseg,wa_skat.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                         belnr = wa_bkpf-belnr
                                         gjahr = wa_bkpf-gjahr  INTO wa_bseg.
             IF sy-subrc = 0.
               wa_tax-fi_docno  =    wa_bseg-belnr.
               wa_tax-mwskz     =    wa_bseg-mwskz.
             CLEAR: wa_bseg.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                           belnr = wa_bkpf-belnr
                                           gjahr = wa_bkpf-gjahr
                                           flag = ''
                                           ktosl = 'JP4' INTO wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt    =  wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-set_off     =  wa_bseg-wrbtr.
               wa_tax-fwbas       =  wa_bseg-fwbas.
               wa_tax-cst_amt     =  wa_bseg-pswbt.
               wa_tax-description = 'CST CG Sett off'.
               wa_tax-cond_type   =  'JVCS'.
             ENDIF.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                           belnr = wa_bkpf-belnr
                                           gjahr = wa_bkpf-gjahr
                                           flag = ''
                                           ktosl = 'VS1' INTO wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-fwbas       =  wa_bseg-fwbas.
             ENDIF.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                            belnr = wa_bkpf-belnr
                                            gjahr = wa_bkpf-gjahr
                                            flag = ''
                                            ktosl = 'JP7' INTO wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt    =  wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-set_off     =  wa_bseg-wrbtr.
               wa_tax-fwbas       =  wa_bseg-fwbas.
               wa_tax-vat_amt     =  wa_bseg-pswbt.
               wa_tax-description = 'VAT CG Sett off'.
               wa_tax-cond_type   =  'JVCD'.
             ENDIF.
             CLEAR wa_bseg.
            READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                       belnr = wa_bkpf-belnr
                                       gjahr = wa_bkpf-gjahr
                                       flag = ''
                                       ktosl = 'JP5' INTO wa_bseg.
              READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        hkont = '0002868001' INTO     wa_bseg.       "vat changed for V0 tax code
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt  =  wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-vat_amt   =  wa_bseg-pswbt.
               wa_tax-set_off   =  wa_bseg-wrbtr.
               wa_tax-cond_type =  'JVRD'.
               wa_tax-fwbas     =  wa_bseg-fwbas.
               wa_tax-description        = 'VAT RM Set off'.
             ENDIF.
             CLEAR: wa_bseg,wa_skat.
             READ TABLE it_bseg WITH KEY     bukrs = wa_bkpf-bukrs
                                             belnr = wa_bkpf-belnr
                                             gjahr = wa_bkpf-gjahr
                                             shkzg = 'H'
                                             koart = 'K'
                                             INTO     wa_bseg.
             IF sy-subrc = 0.
               wa_tax-total_value =  wa_bseg-wrbtr.
             ENDIF.
          START OF MODIFICATION BY ASHOK.CH ON 08.02.2008
            service_tax
             CLEAR wa_bseg.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        flag = ''
                                        ktosl = 'VS8'  INTO     wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-gl_accnt  =    wa_bseg-hkont.
               READ TABLE iskat INTO wa_skat WITH KEY saknr = wa_bseg-hkont.
               IF sy-subrc = 0.
                 wa_tax-gl_desc = wa_skat-txt50.
               ENDIF.
               wa_tax-service_tax =  wa_bseg-wrbtr.
               wa_tax-description = 'Service Tax'.
               wa_tax-cond_type =  'JSRT'.
             ENDIF.
         service_ecess
             CLEAR: wa_bseg,wa_skat.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        flag = ''
                                        ktosl = 'VS9'  INTO  wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-service_ecess =  wa_bseg-wrbtr.
             ENDIF.
    **********changes by vincy on 31.01.08*********************
        service_shcess
             CLEAR: wa_bseg.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr
                                        flag = ''
                                        ktosl = 'VSE'  INTO  wa_bseg.
             IF sy-subrc = 0.
               wa_bseg-flag = 'X'.
               MODIFY it_bseg INDEX sy-tabix FROM wa_bseg.
               wa_tax-service_shcess =  wa_bseg-wrbtr.
             ENDIF.
    *************************end of changes***********************
    END OF MODIFICATION ON 08.02.2008
             APPEND wa_tax TO it_tax.
             ENDIF.
             CLEAR :wa_tax,wa_bseg,wa_bkpf,wa_skat.
           ENDLOOP.
           CLEAR wa1_ekbe.
           LOOP AT it1_ekbe INTO wa1_ekbe.
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                    WITH KEY  rdoc1  = wa1_ekbe-ebeln
                                    ritem1 = wa1_ekbe-ebelp.
    *New query added by Nilesh
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                    WITH KEY  rdoc1  = wa1_ekbe-lfbnr
                                    ritem2 = wa1_ekbe-lfpos.
             READ TABLE it_bkpf INTO wa_bkpf
             WITH KEY awkey = wa1_ekbe-awkey.
             IF sy-subrc = 0.
             READ TABLE it_bseg WITH KEY bukrs = wa_bkpf-bukrs
                                        belnr = wa_bkpf-belnr
                                        gjahr = wa_bkpf-gjahr.
              IF sy-subrc = 0.
               wa_ekexclf-belnr  =       wa1_ekbe-belnr.
               wa_ekexclf-budat  =       wa1_ekbe-budat.
               wa_ekexclf-menge  =       wa1_ekbe-menge.
               wa_ekexclf-ebelp  =       wa1_ekbe-ebelp.
               wa_ekexclf-ebeln  =       wa1_ekbe-ebeln.
               wa_ekexclf-gjahr  =       wa1_ekbe-gjahr.
               wa_ekexclf-awkey  =       wa1_ekbe-awkey.
               wa_ekexclf-lifnr  =       it_bseg-lifnr.
               wa_ekexclf-matnr  =       it_bseg-matnr .
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl                 "for records for which either rdoc1 or matnr
                                    WITH KEY  rdoc2  = wa1_ekbe-lfbnr   "not maintained in ekbe by vincy on 16.06.08
                                              menge  = wa1_ekbe-menge.
            IF sy-subrc <> 0 .
            READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                    WITH KEY  rdoc1  = wa1_ekbe-ebeln
                                              exdat  = wa1_ekbe-bldat
                                              matnr  = wa1_ekbe-matnr
                                              menge  = wa1_ekbe-menge.
            ENDIF.
             READ TABLE it_j_1iexcdtl INTO wa_j_1iexcdtl
                                     WITH KEY  rdoc1  = wa1_ekbe-ebeln
                                               ritem1 = wa1_ekbe-ebelp.
             IF sy-subrc = 0.
              wa_ekexclf-belnr  =       wa1_ekbe-belnr.
              wa_ekexclf-budat  =       wa1_ekbe-budat.
              wa_ekexclf-menge  =       wa1_ekbe-menge.
              wa_ekexclf-ebelp  =       wa1_ekbe-ebelp.
              wa_ekexclf-ebeln  =       wa1_ekbe-ebeln.
              wa_ekexclf-gjahr  =       wa1_ekbe-gjahr.
              wa_ekexclf-awkey  =       wa1_ekbe-awkey.
               wa_ekexclf-exnum  =       wa_j_1iexcdtl-exnum.
               wa_ekexclf-exdat  =       wa_j_1iexcdtl-exdat.
               wa_ekexclf-lifnr  =       wa_j_1iexcdtl-lifnr.
               wa_ekexclf-matnr  =       wa_j_1iexcdtl-matnr .
               wa_ekexclf-maktx  =       wa_j_1iexcdtl-maktx .
               wa_ekexclf-capind =        wa_j_1iexcdtl-capind.
               wa_ekexclf-exbas  =        wa_j_1iexcdtl-exbas.
              wa_ekexclf-exbed  =        wa_j_1iexcdtl-exbed.
              wa_ekexclf-ecs    =        wa_j_1iexcdtl-ecs.
               wa_ekexclf-werks  =        wa_j_1iexcdtl-werks.
               wa_ekexclf-ritem1 =       wa_j_1iexcdtl-ritem1.
               wa_ekexclf-rdoc1  =         wa_j_1iexcdtl-rdoc1.
               wa_ekexclf-docyr  =       wa_j_1iexcdtl-docyr.
              wa_ekexclf-exaddtax1  = wa_j_1iexcdtl-exaddtax1.
               IF it_bseg-flag_21 = 'X'.
               wa_ekexclf-exbas  = wa_ekexclf-exbas * -1.
               ENDIF.
    MODIFIED BY ASHOK.CH ON 08.03.2008
          IF wa_j_1iexcdtl-WERKS NE 'RD01' .
               wa_ekexclf-exbed  =        wa_j_1iexcdtl-exbed.
               wa_ekexclf-ecs    =        wa_j_1iexcdtl-ecs.
               wa_ekexclf-exaddtax1  = wa_j_1iexcdtl-exaddtax1.
               IF it_bseg-flag_21 = 'X'.
                 wa_ekexclf-exbed  =        wa_ekexclf-exbed * -1.
                 wa_ekexclf-ecs    =        wa_ekexclf-ecs * -1.
                 wa_ekexclf-exaddtax1  = wa_ekexclf-exaddtax1 * -1.
               ENDIF.
         ELSE.
               wa_ekexclf-exbed  =        wa_j_1iexcdtl-BEDINV.
               wa_ekexclf-ecs    =        wa_j_1iexcdtl-ecsINV.
               wa_ekexclf-exaddtax1  = wa_j_1iexcdtl-exaddINV1.
         ENDIF.
    END IF MODIFICATION ON 08.03.2008
              APPEND wa_ekexclf TO it_ekexclf.
              CLEAR :wa_lfa1,wa_j_1iexcdtl,wa1_ekbe.
             ENDIF.
               READ TABLE it_lfa2 INTO wa_lfa2
               WITH KEY lifnr = wa_ekexclf-lifnr.
               IF sy-subrc = 0.
                 wa_ekexclf-name1  =        wa_lfa2-name1.
                 wa_ekexclf-ktokk  =        wa_lfa2-ktokk.
               ENDIF.
               APPEND wa_ekexclf TO it_ekexclf.
             ENDIF.
             ENDIF.
               CLEAR :wa_lfa1,wa_j_1iexcdtl,wa1_ekbe,wa_lfa2,wa_ekexclf.
           ENDLOOP.
           CLEAR wa_ekexclf.
           LOOP AT it_ekexclf INTO wa_ekexclf.
             wa_final-belnr     =       wa_ekexclf-belnr.
             wa_final-budat     =       wa_ekexclf-budat.
             wa_final-menge     =       wa_ekexclf-menge.
             wa_final-ebelp     =       wa_ekexclf-ebelp.
             wa_final-ebeln     =       wa_ekexclf-ebeln.
             wa_final-gjahr     =       wa_ekexclf-gjahr.
             wa_final-awkey     =       wa_ekexclf-awkey.
             wa_final-exnum     =       wa_ekexclf-exnum.
             wa_final-exdat     =       wa_ekexclf-exdat.
             wa_final-lifnr     =       wa_ekexclf-lifnr.
             wa_final-matnr     =       wa_ekexclf-matnr .
             wa_final-maktx     =       wa_ekexclf-maktx .
             wa_final-shcess_amt = wa_ekexclf-exaddtax1.
             IF  wa_ekexclf-capind = 'C'.
               wa_final-capind    =  'Consumables'.
             ENDIF.
             IF  wa_ekexclf-capind = 'A'.
               wa_final-capind    =  'Assets'.
             ENDIF.
             IF  wa_ekexclf-capind = 'T'.
               wa_final-capind    =   'Tools'.
             ENDIF.
             IF  wa_ekexclf-capind = ''.
               wa_final-capind    =   'Raw Material'.
             ENDIF.
             IF  wa_ekexclf-capind = 'N'.
               wa_final-capind    =  'Non Cenvatable'.
             ENDIF.
             IF  wa_ekexclf-capind NE 'C' AND wa_ekexclf-capind NE 'A' AND
                 wa_ekexclf-capind NE '' AND wa_ekexclf-capind NE 'N'.
               wa_final-capind    = wa_ekexclf-capind.
             ENDIF.
             wa_final-exbas     =       wa_ekexclf-exbas.
             wa_final-exbed     =       wa_ekexclf-exbed.
             wa_final-ecs       =       wa_ekexclf-ecs.
             wa_final-werks     =       wa_ekexclf-werks.
             wa_final-ritem1    =       wa_ekexclf-ritem1.
             wa_final-rdoc1     =       wa_ekexclf-rdoc1.
             wa_final-docyr     =       wa_ekexclf-docyr.
             wa_final-name1     =       wa_ekexclf-name1.
             wa_final-ktokk     =       wa_ekexclf-ktokk.
             wa_final-excise    =       wa_final-exbas + wa_final-exbed + wa_final-ecs + wa_final-shcess_amt.
             CLEAR :wa_tax.

    Hi ,
    I think you are using the redundant selects to fetch the data from BSEG.
    First select all the data into an internal table based on  bkpf.
    Now you can distribute the data into whatever tables you want using the loop,read-binary search and append statements..
    Loop at it_bseg.
    read it_bseg where
                        xxxxx
                        xxxxx
                        binary search.
    append wa to it2_bseg.
    endloop              
    This avoid several database fetches..
    Thank you..

  • Backup DC past tombstone and need help replacing it with another DC with the same name and IP

    Hey Everyone
    We have a single domain in a forest with 2 DCs with AD integrated DNS configured. The primary DC with all the FSMO roles is a VM (Server 2008 R2) and the backup DC is a physical server (Server 2008 non-R2).
    The backup DC's hardware is very old and has been giving us a lot of issues where the system would intermittently BSOD, freeze, black screen only etc. and as a result, the server was turned off for a very long time, definitely beyond the default tombstone
    lifetime of either 60 or 180 days.
    We want to replace this bad backup DC with another physical server which became available as a spare and is much newer and in a working condition hardware wise. We also wish to ultimately give it the same name (FQDN) and IP to basically make it an outright
    replacement for the current bad backup DC.
    My questions are:
    1.) If we are in a position where the bad server could possibly physically boot and start the operating system and have network connectivity, will we be able to use DCPROMO as one would normally do to demote this DC, or will it have to be done forcefully,
    while keeping in mind as I said that the DC is way past the tombstone lifetime period?
    2.) If it has to be done forcefully, I am aware that the meta data needs to be cleaned up in AD on the working primary DC, although I have never performed such a process before. If this is done, are there any other things I need to look out for or do
    before I attempt to replace it with the other server which I will set up wit the same name (FQDN) and IP, then add to the domain, and then lastly promote as per normal using DCPROMO?
    I know we will have to upgrade the scema to 2012RM as the replacement backup DC will be running this newer operating system.
    Anything else you wish to add or point out to me would be highly appreciated. Thank you in advance.
    Regards,
    CTV

    Hi,
    I would suggest please do the metadata cleanup using the script and then remove object from below DNS console and then run the repadmin /syncall /Aed
    https://gallery.technet.microsoft.com/scriptcenter/d31f091f-2642-4ede-9f97-0e1cc4d577f3
    Repeat running the vbs script till the wrong/unnecessary dc’s are removed.
             Cross check the removal – dsa.msc [ad users and computers] > Domain Controllers OU
     Adsiedit.msc
     Expand domain partition, select OU=Domain Controllers, make sure only the necessary domain controllers are listed.
     Delete the incorrect domain controllers.
    Dnsmgmt.msc [Dns Management]
          Expand the forward lookup zones\_msdcs folder
    i.      Make sure only the actual domain controllers are listed, delete wrong Alias recordsremove wrong name server records
    ii.      Select the container [forward lookup zones\_msdcs.domain.com\dc\_sites_\sitename\_tcp] > delete incorrect _ldap and _kerberos records are listed.
    iii.      Select the container [forward lookup zones\_msdcs.domain.com\dc\_tcp] and delete incorrect _ldap and _kerberos records
    iv.      Expand the [forward lookup zones\_msdcs.domain.com\domains\guid\_tcp] and delete incorrect _ldap entries
    v.      Select [forward lookup zones\_msdcs.domain.com\gc] – delete incorrect HostA records
    vi.      Expand the [forward lookup zones\_msdcs.domain.com\gc\_sites\sitename\_tcp] – delete incorrect _ldap entries
    vii.      Select the [forward lookup zones\_msdcs.domain.com\gc\_tcp] – delete incorrect _ldap entries
    viii.      Select the [forward lookup zones\_msdcs.domain.com\pdc\_tcp] – delete incorrect _ldap entries
          Expand the forward lookup zones\domain.com folder
    i.           
    Delete Host(A) records of dc’s which are non-existant.
    ii.           
    Correct the NameServer (NS) records
    iii.           
    Follow steps similar to ’ A ii ‘ >> ‘ A viii’
             Dssite.msc [Sites and Services]
          Expand the [Sites\Sitename\Servers] – delete incorrect server’s
    B.      Delete incorrect subnet configurations [Sites\Subnets]
          Delete incorrect site links [Sites\IP]

  • My iphone / mac no longer recognize they are the same Itunes library.  When I try to sync my phone now, it wants to erase everything and replace it with the computers itunes library.  I have purchased items on the phone I don't want to erase

    My iphone / mac no longer recognize they are the same Itunes library.  When I try to sync my phone now, it wants to erase everything and replace it with the computers itunes library.  I have purchased items on the phone I don't want to erase them from the phone.  The phone backs up fine, but won't sync. 

    File>Devices>Transfer Purchases from "iPhone" and then sync.

  • HT5925 I have an iCloud email on my iPhone that is now old as hacked and unused. I can't access anything as it asks for that account info and I don't remember the password etc. How do I delete it and replace it with my new iPad email? ! Help..

    I have an iCloud email and Yahoo email on my iPhone that is now old as hacked and unused. I can't access anything as it asks for that account info and I don't remember the password etc. How do I delete and replace it with my new iPad email? ! Help..

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact AppleCare(or Apple ID Support), upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.

  • Hi,I have made a new Apple ID and logged in on my phone, on settings, but the app store is still using my old one. How do I get rid of the old ID and replace it with the new one?

    Hi, I have made a new Apple ID and logged in on my phone, settings > iTunes & app stores, but the app store is still using my old Apple ID. How do I get rid of the old ID and replace it with the new one?

    HAYDONISRAD wrote:
    ...  Maybe I'll stick with hers for now :-)
    OR...
    You could use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?

  • How do I remove an incorrect apple ID from an iPad and replace it with the correct one?

    How can I remove an incorrect Apple ID from my ipad and replace it with the correct one?

    Hello Shy guy,
    You can try this:
    1. Go to the iTunes Store or App Store
    2. Scroll down, there you will see Apple ID: "your email" (below Redeem and Send Gift)
    3. Tap on that button
    4. Tap on Sign Out
    Now you should be able to use another Apple ID.
    Cedric

  • My Macbook Pro was stolen, and I have replaced it with a Macbook Air. New hard drive is too small for a Time Machine restore. How do I restore my more-expensive apps (ie iWorks) on my new Macbook without repurchasing them?

    My Macbook Pro was recently stolen, and I have replaced it with a Macbook Air. I attempted to simply do a restore from the Macbook Pro's Time Machine backup, but since the new Macbook Air's hard drive is significantly smaller, a Time Machine restore was not possible. I even tried to choose only settings or only my User Profile (option) when restoring, but the backup was still too large to do a restore onto the new machine. How do I restore my more-expensive apps (ie iWorks) onto my new Macbook without repurchasing them? Also, I reaad somewhere that if you went to the Mac App Store and attempted to repurchase the app and clicked BUY, it would simply alert you that you have already purchased the app (and trigger a re-download)... NOT THE CASE... So I just dropped another $19.99 for a second copy of Pages... Not my intention....
    Any help would be greatly appreciated.
    LM

    you should get a usb backup drive as well.  time machine has limited use in my eyes. it saves things. but older things can be errased ad space drops without telling you
    nothing beats data redundancy.  2 saves is. 1.    and 1 is none
    im personally not fond of time machne though i use it only for a recovery parameter for a mac
    id never ever myself consider time machine a genuine data backup tool.  though most do consider it as such
    drive clones such as superduper and carbon copy cloner can clone your entire drive for emergency recovery.  and you can boot from them as well o. another mac

  • I'm battling to change my primary iCloud account on my mac, please help? I want to replace it with my secondary account by can't find a way to do this?

    I'm battling to change my primary iCloud account on my mac, please help? I want to replace it with my secondary account by can't find a way to do this? Tony

    System Preferences/iCloud - log out and then log in with your other ID.
    https://discussions.apple.com/thread/3390335?tstart=0
    Set up iCloud
    Set up iCloud (2)

Maybe you are looking for

  • Acrobat 9 Pro Slow opening and closing pdf files - "Not Responding"

    I was responsible for pushing to get and keep 25 enterprises licenses for Adobe Acrobat Pro Vers 9. Corporate is pushing Blue Beam! We are on Acrobat Pro Vers. 9.3.1. Windows XP Pro 32 bit OS.  (PCs and laptops 1 - 3 years old, min 2 GB RAM, 2.1 GHz

  • How to Use a boolean function in a process

    Hi, I created a boolean function named change_pwd with 3 varchar2 parameters : login_name, old-pwd and new_pwd. I would like to use it in a process but I can't, this is how I do it :<br><br> select change_pwd ( v('P12_Login'),v('P12_Old_Pwd'),v('P12_

  • Queries available in Production vs Query been used

    Dear All, We had collected the statistical data from ST03N and found that only 523 queries are been used,and when we seen in Metadatarepository there are 2000 queries active in our system, pls suggest what should we do wether we delete the queries wh

  • Adding More InfoObjects into  a  Dimension

    Hi Team,     I  have  enhanced  2lis_11_vahdr  with  5  partner  functions (in 7.0). In order  to  load  the  data  into 2sd_c03 , Would  it  be OK to add  these 5 infoobjects  into the CUSTOMER dimension  which already  has 10  info  objects.? Is  t

  • Cannot read pre-view cache

    At startup I get failure message "cannot read from pre-view cache (förhandsvisningscache in Swedish)" every time. According to the message, the failure is supposed to be rectified at next start-up, but this has not happened. I simply cannot start Lig