The Performance Of KT600 & Barton 2500++

i run the test of 3d mark 2001 se on my amd pc is got 10560 mark???
AMD Athlon Barton [email protected]
MSI KT6 Delta KT600 VIA
MSI 128MB Ge-Force4 Ti 4200 AGP-8X (250mhz core / 513mhz ramdac)
Maxtor 80GB SATA150
Kingston 256MB DDR400 PC3200 x 2Piece=512MB Total
Win XP Pro SP1
Direct X 9.0b
VIA Hyperion 4in 1 version 4.51
Nvidia Graphic Detonator FX 53.03
The setting of 3d mark 2001se is default........
Any problem with my pc system??

ti4200 should beable to hit the 13000mark without overclocking, and close to 14000 with OC.
There is one in my older PC (KT3 Ultra!!!!) that my bro uses, (its his vid card)
Its a Pixelview 8X, nice little vid card. I think we hit 275/275 for the OC in a terribly unventilated case. Default is 250/250.
So maybe some bios adjustments like;
AGP aperture 256MB
AGP read/write timings to 1clk
Change DRAM settings in bios perhaps, with all the DRAM settings to these below in this order for v5.4 bios;
Fast or Turbo (Ultra might result in no windows loadup)
200mhz
User (Auto for stability problems depending on quality of RAM)
400mhz
2
2
6
3
1T
4-Way
8 QW
Enabled
Fast (dont use Ultra, PC wont boot)
Enabled
If those settings are flaky, change just the timings back to auto, but leave the extra settings as is.
That should give quite a huge boost.

Similar Messages

  • Overclock the K7N2G-L w/ Barton 2500+

    I need help with the BIOS in able to overclock my CPU.  I have W6570MS V.3.7 BIOS the most up-to-date version.  I need to know exactly what option in the BIOS that I need to change to get my CPU over 2GHz.  I am trying to aim for 2.5GHZ if possible.  Is there a way to get step-by-step instructions that are for my board and processor?
    Any and all help are greatly appreciated!!!
    Thanks!

    Quote
    Originally posted by foshizzle
    I know but exactly how???? I am new to overclocking and need to know what exactly do I need to change in BIOS to get to those speeds.  Thanks
    Hi,
       If you're new to overclocking I would suggest you do a lot of reading on the subject. If you don't have proper cooling and know exactly what you're doing you had better have a deep wallet. I've had many people come to me with fried components because they were overclocking without having proper knowledge and experience. I have seen people come to these forums looking for help in overclocking only to get irate when things didn't go right. If you still want to go ahead with it their are plenty of sights on the subject, just do a search.
    Good Luck  
    Rob

  • What have you got out of the barton 2500?

    Lets find out what the barton 2500 can do.
    So far i've got 2326 out of it
    But what have you done?
    Please join in and show what you have done.

    You can see my numbers in my sig too.  
    Take Care,
    Richard

  • Msi Kt333 woes with barton 2500

    Hi,
    I just got this new processor, the barton 2500 and my computer is very instable.
    I have a Kt333 ultra 2 with bios 5.7 and it worked fine with an athlon xp1800+
    I set up fsb 166 and everything else in auto and It will crash at random in winxp.
    The culprit seems to be accessing the hard disk which is a Maxtor ATA133 7200rpm 60gb.
    In one of the BSOD the file that caused the crash was ntfs.sys
    I am now running the board at fsb 133 just so I can use the computer.
    I have currently installed 1G ram, two sticks of 256m pc2700 and a newly acquired stick of 512 pc3300.
    I have a Gf3 ti 200 128m at default settings.
    What can I do to fix this without having to go out buy more hardware?
    Thanks.

    I don't think the KT333 suports ddr400(3200), the Bios 5.7 you have was to fix the 3200+ barton NOT the 3200 ram, So you can only run the DDR333 (2700) ram
     and should never mix your ram it will cause nothen but trouble

  • Powers off above FSB of 133 (barton 2500)

    Ok here we go....
    K7N2 Delta ILSR
    AMD (Barton) 2500
    Mushkin 512MB 3200 In the Light green slot
    Enhance 300W PSU
    Fresh Install of XP Pro SP1
    Copper cooler CPU Fan and heat sink
    120MM Case fan
    Big Ass Problem
    First of all when I was installing XP from CD it would get to the starting windows screen and then just power off. The only way to start back up was to unplug the power supply and it would power back up.
    I changed to the Bios to defaults and was able to get XP loaded. (Only running at 1100 on the processor)
    Now when I change the FSB to 166 it will run for about 5 to 30 min and the power of issue is back. I change the FSB to 100 or 133 and it will stay on and I can even use it.
    Could this be a memory issue or a heat issue? It has even powered of in the BIOS screen when I had the FSB on 166.
    Any ideas?

    Afternoon
    Depends what else you've got on your system. My system runs fine with a generic 350W PSU - people will tell you that you need 500w beasts, but hey - Kingmax Memory is supposed to be stroppy with Deltas, but mine's fine The only thing I'd say is that if you've got more than 1 HDD and 1 CD/DVD, then you could do with pepping up the PSU.
    Mine's been running non-stop since I got it, night and day, never hit more than 35C with stock cooling and no case fan, and never locked up. Yippee

  • KT4 Ultra-SR (MS-6590) dont work with AMD Barton 2500+

     ;( Please help me any1.
    I have MBO KT4 Ultra-SR (MS-6590) with CPU AMD Barton 2500+ and i have a big problem. System corectly boot only if a select CPU FSB Clock = 100 MHz (CPU Ration/CPU Vcore/DDR Voltage=all AUTO). When a select CPU FSB Clock 133 or 166 MHz, system begin run corectly and after few second turned OFF. I selecting SDRAM Frequency on=AUTO/266/333/400 MHz but not working. My old CPU is AMD XP Palomino 2100 MHz and work fine with KT4 Ultra MBO. I upgrade BIOS with 1.4 version. I change memory module with PQI (PC 2700/256 MB) and JETRAM (PC 2700/256 MB) but is same ":censored: ". System dont work. Bad CPU Barton 2500+? I dont no. Please help me any1.
    My System:
    MBO KT4 Ultra-SR (MS-6590)
    CPU AMD Barton 2500+ (FSB 333)
    Memory DDR Samsung 2x256 MB (PC 3200) K4H56083D-TCC4
    Cooler SPIRE WhisperRock IV+Artic Silver 3
    HDD Seagate Baracuda 120 GB SATA
    PSU Enermax 300W EG301P-VE(FMA)
    VGA Saphire ATI Radeon 9100 (64 MB+TV/DVI-out)
    DVD-ROM Pioneer 120S (16x speed)
    CD-RW MSI CR52-A2 (52/24/52, Atapi)
    FDD Teac 1.44 MB
    Creative SoundBlaster Live! 5.1

    Most of the time, this sort of problems arise because of power suppliy issues.. U have a enamax 300W PSU which is a VERY GOOD PSU but might just be on the line...
    If u can, try swapping the PSu for a good 400 or a 420W PSU.. this might solve your enigma.. I really dont think this is your processor...
    Read this two articles on PSu wrtten by one moderater which will aid in solve in fixing your problem (PSU1 , PSU2 , Troubleshooting Guide )
    Best of luck
    RAsika

  • Overclock Barton 2500 with PC2700 memory

    Using MSI K7N2 Delta L MB.
    Want to overclock Barton 2500 [without and CPU mod].  But, memory is not overclockable.
    Is there a way to overclock the CPU while keeping the memory running at 166/333?
    When I've tried to raise the FSB of the CPU, I can't get the memory clock to stay at 166/333.
    Thanks

    dont run a fsb higher then the memory as its most likely to be slower.
    you can try to increase the speed 3-4mhz at a time until it starts to crash and then you back off 5mhz.
    or buy faster memory.
    you can always raise multiplier.
    im not sure but i think the highest you can go is 12.5 and if you chose higher it goes back to lower numbers.

  • Barton 2500+ K7N2G-L How to overclock?

    Hi
    Im completely new to overclocking and I dont understand the jargon here and at overclockers.com.
    Could anyone explain in simple words how I could speed up the system?
    Ive heard there are some windows programs which do it, could this be that simple?

    It would be best not to overclock untill you understand every thing about it and the terms.  
    1st if your running stock cooling i would not even try
    2nd If you have the newer barton 2500+ then the CPU is locked and the wire trick does not even work, But older models are unlocked with the motherboard you bought.  esay way to tell if you change the settings im going to mention its unlocked.
    Over clock in the bios chage the FSB up in small increasements it should be default at 166 (333 CPU bus speed) and you can also change the multiplier it kind of works like this.
    166FSB X 11multiplier = 1830MHz roughly (your CPU)
    If you change something like this:
    180FSB X 12multiplier = 2160MHz
    but if you cant change these settings then your CPU is locked and you cant overclock unless you want to go some major altering your CPU.

  • MSI 6712 (KT4V) Problem AMD Ath Barton 2500+

    Hi guys , im wondering if u can help me
    ive got a AMD Barton 2500+ running @ 1498 instead of 18XX , ive tried the following,
    Setting Vcore standard to 1.65
    FSB 166 , System does not boot
    FSB 133 , System thinks its a AMD 1900+
    FSB 150 , System does not boot
    FSB 100 , System thinks its AMD 1100
    so now im running 1498mhz instead of 18XX mhz  
    every time i have to reset the bios to make it boot again ,
    My memory = Whitelike 333 DDR 2x 256mb Pc 2700 (single sided)
    My GFX = Chaintech Gf4 64mb AGP 4X
    Running XP sp1a Professional
    Any ideas setting it to 18XX ??
    ive tried all the ratios 11 , 10 , 4 , 12.5 , 11.5 , 13.0 14 , 15 nothing seems to work
    even setted the memory to 200mhz , that didn't work ...
    Any ideas?

    Well Mate - If the temperature in safe mode at the lower CPU Speed is that high then it means at the proper speed the temperature would be high enough to prevent the system from booting.
    And according to what you wrote about the white paste I suspect that your installation of the heatsink is the cause of the problem - which brings us back to the point - have you tried re-installing the heatsink with a thermal pad - not the silicon paste as per AMD instructions?
    Anf if after following AMD's installation instructions to the letter you still have the problem you may have a faulty CPU - but unfortunately you will find that you have voided your warranty if you have used any paste instead / as well as the original Thermal pad.

  • Hi apple team.. Am really disappointed by the performance of iOS7.. First of all the UI is soo cartoonish as a high school students have designed it..

    Hi apple team.. Am really disappointed by the performance of iOS7.. First of all the UI is soo cartoonish as a high school students have designed it.. Secondly after upgrading my phone started to lag badly.. All my frnds r facing same problm.. Plz release a fix for this or let me knw how to downgrade to iOS6 i was very happy with that.. Even while typing this msg the keyboard is lagging badly.. Plz help..

    Sorry, Apple has no approved method to downgrade the version of iOS on your iDevice. You can voice your displeasure with the iOS by leaving feedback at the appropriate subsection from the link below.
    http://www.apple.com/feedback/

  • Re: How to Improve the performance on Rollup of Aggregates for PCA Infocube

    Hi BW Guru's,
    I have unresolved issue and our team is still working on it.
    I have already posted several questions on this but not clear on how to reduce the time on Rollup of Aggregates process.
    I have requested for OSS note and searching myself but still could not found.
    Finally i have executed one of the cube in RSRV with the database selection
    "Database indexes of an InfoCube and its aggregates"  and got warning messages i was tried to correct the error and executed once again but still i found warning message. and the error message are as follows: (this is only for one info cube we got 6 info cubes i am executing one by one).
    ORACLE: Index /BI0/IACCOUNT~0 has possibly degenerated
    ORACLE: Index /BI0/IPROFIT_CTR~0 has possibly degenerated     
    ORACLE: Index /BI0/SREQUID~0 has possibly degenerated
    ORACLE: Index /BIC/D1001072~010 has possibly degenerated
    ORACLE: Index /BIC/D1001132~010 has possibly degenerated
    ORACLE: Index /BIC/D1001212~010 has possibly degenerated
    ORACLE: Index /BIC/DGPCOGC062~01 has possibly degenerated
    ORACLE: Index /BIC/IGGRA_CODE~0 has possibly degenerated
    ORACLE: Index /BIC/QGMAPGP1~0 has possibly degenerated
    ORACLE: Index /BIC/QGMAPPC2~0 has possibly degenerated
    ORACLE: Index /BIC/SGMAPGP1~0 has possibly degenerated
    i don't know how to move further on this can any one tell me how to tackle this problem to increase the performance on Rollup of Aggregates (PCA Info cubes).
    every time i use to create index and statistics regularly to improve the performance it will work for couple of days and again the performance of the rollup of aggregates come down gradually.
    Thanks and Regards,
    Venkat

    hi,
    check in a sql client the sql created by Bi and the query that you use directy from your physical layer...
    The time between these 2 must be 2-3 seconds,otherwise you have problems.(these seconds are for scripts that needed by Bi)
    If you use "like" in your sql then forget indexes....
    For more informations about indexes check google or your Dba .
    Last, i mentioned that materialize view is not perfect,it help a lot..so why not try to split it to smaller ones....
    ex...
    logiacal dimensions
    year-half-day
    company-department
    fact
    quantity
    instead of making one...make 3,
    year - department - quantity
    half - department - quantity
    day - department - quantity
    and add them as datasource and assign them the appropriate logical level at bussiness layer in administrator...
    Do you use partioning functionality???
    i hope i helped....
    http://greekoraclebi.blogspot.com/
    ///////////////////////////////////////

  • Hi sap gurus can u plz improve the performance of my code --sneha

    // for the below program i have performance issue can any sap gurus can modify my code to improve the performance ,its very urgent  plz help me -
    sneha
    REPORT  ZFIR_GRIR_IPV
            NO STANDARD PAGE HEADING
            LINE-SIZE 120
            MESSAGE-ID ZFI02.
    TABLES: BSEG,BKPF.
    TYPES: BEGIN OF A_FINAL,
            BUKRS   TYPE CHAR12,
            HKONT_P TYPE CHAR18,
            GJAHR   TYPE CHAR11,
            BELNR   TYPE CHAR19,
            BUDAT   TYPE CHAR12,
            WAERS   TYPE CHAR8,
            XBLNR   TYPE CHAR20,
            BLART   TYPE CHAR13,
            MONAT   TYPE CHAR13,
            DMBTR_P TYPE CHAR13,
            KOSTL   TYPE CHAR11,
            PRCTR_P TYPE CHAR13,
            HKONT_G TYPE CHAR18,
            DMBTR_G TYPE CHAR13,
            PRCTR_G TYPE CHAR13,
            BUZID_G TYPE CHAR15,
            END OF A_FINAL.
    changes on 30 th may by dileep
    TYPES: BEGIN OF IT_FINAL,
            BUKRS   TYPE BUKRS ,
            HKONT TYPE HKONT,
            BELNR   TYPE BELNR_D,
            DMBTR TYPE DMBTR ,
            KOSTL   TYPE KOSTL,
            PRCTR TYPE PRCTR,
            END OF IT_FINAL.
    TYPES: BEGIN OF IT_FINAL1,
            BUKRS   TYPE BUKRS,
            HKONT TYPE HKONT,
            GJAHR   TYPE GJAHR ,
            BELNR   TYPE  BELNR_D,
            BUDAT   TYPE BUDAT,
            WAERS   TYPE WAERS ,
            XBLNR   TYPE XBLNR1,
            BLART   TYPE BLART,
            MONAT   TYPE MONAT,
            DMBTR TYPE DMBTR,
            KOSTL   TYPE KOSTL,
            PRCTR TYPE PRCTR,
             END OF IT_FINAL1.
    end of changes on 30 th may by dileep
    TYPES: BEGIN OF P_FINAL,
            BUKRS   TYPE CHAR12,
            DELIMITER_1         TYPE CHAR1,
            HKONT_P TYPE CHAR18,
             DELIMITER_2         TYPE CHAR1,
            GJAHR   TYPE CHAR11,
            DELIMITER_3         TYPE CHAR1,
            BELNR   TYPE CHAR19,
            DELIMITER_4         TYPE CHAR1,
            BUDAT   TYPE CHAR12,
            DELIMITER_5        TYPE CHAR1,
            WAERS   TYPE CHAR8,
            DELIMITER_6         TYPE CHAR1,
            XBLNR   TYPE CHAR20,
            DELIMITER_7         TYPE CHAR1,
            BLART   TYPE CHAR13,
            DELIMITER_8         TYPE CHAR1,
            MONAT   TYPE CHAR13,
            DELIMITER_9         TYPE CHAR1,
            DMBTR_P TYPE CHAR13,
            DELIMITER_10         TYPE CHAR1,
            KOSTL   TYPE CHAR11,
            DELIMITER_11         TYPE CHAR1,
            PRCTR_P TYPE CHAR13,
            DELIMITER_12         TYPE CHAR1,
            HKONT_G TYPE CHAR18,
            DELIMITER_13         TYPE CHAR1,
            DMBTR_G TYPE CHAR13,
            DELIMITER_14         TYPE CHAR1,
            PRCTR_G TYPE CHAR13,
            DELIMITER_15        TYPE CHAR1,
            BUZID_G TYPE CHAR15,
            END OF P_FINAL.
    DATA: IT_BSEG TYPE STANDARD TABLE OF IT_FINAL INITIAL SIZE 0,
          I_BSEG TYPE STANDARD TABLE OF IT_FINAL1 INITIAL SIZE 0,
          I_FINAL TYPE STANDARD TABLE OF A_FINAL INITIAL SIZE 0 WITH HEADER LINE,
          I_FINAL_P TYPE STANDARD TABLE OF P_FINAL INITIAL SIZE 0 WITH HEADER LINE,
          W_FINAL_P TYPE P_FINAL,
          W_BSEG1 TYPE BSEG,
          WA_BSEG TYPE IT_FINAL OCCURS 0 WITH HEADER LINE,
          W_BSEG TYPE IT_FINAL1 OCCURS 0 WITH HEADER LINE,
          T_BSEG TYPE STANDARD TABLE OF BSEG INITIAL SIZE 0 WITH HEADER LINE,
          W_FINAL TYPE A_FINAL,
          F_YEAR  TYPE  BAPI0002_4-FISCAL_YEAR,
          F_PERIOD  TYPE  BAPI0002_4-FISCAL_PERIOD,
          RETURN1 TYPE BAPIRETURN1,
          V_DATE        TYPE  CHAR8,               " Date in YYYYMMDD format
          V_PRESPATH    TYPE  STRING,              " Path
          V_APPPATH     TYPE  STRING,               " Path
          V_FILENAME(25) TYPE C,                    " File Name
          V_PERIOD      TYPE  CHAR3,                " Date for Posting Period
          V_FSYEAR      TYPE  BDATJ,                " Fiscal Year
          L_TEXT        TYPE  CHAR1.                " Hypen
    CONSTANTS:   C_TXT       TYPE    CHAR4    VALUE  '.txt',          " File Extension
                 C_TXT1      TYPE    STRING   VALUE  'txt',           " File Type
                 C_FLAG_X    TYPE    CHAR1    VALUE  'X',             " Flag
                 C_ASC       TYPE    FILETYPE VALUE  'ASC',           " File type
                 C_DAT       TYPE    CHAR4    VALUE  '.dat',          " File Type
                 C_FLAG_1    TYPE    CHAR1    VALUE  '1',             " Constant value
                 C_ZERO      TYPE    CHAR1    VALUE  '0',             " Constant
                 C_GLD(10)    TYPE    C        VALUE  'GRIR021S',       " Constant in file Path
                 C_DIR       TYPE    CHAR3    VALUE  'C:\',           " Presentation Server path
                 C_FLAG_12   TYPE    CHAR2    VALUE  '12',            " Constant value
                 C_PCFILE    TYPE    STRING   VALUE  'PC File',
                 C_DELIMITER TYPE    C        VALUE  '|'.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
    *--- Selection Criteria
    SELECT-OPTIONS: S_BUKRS  FOR    BSEG-BUKRS   DEFAULT '012T',       " Company Code
                    S_HKONT  FOR    BSEG-HKONT OBLIGATORY DEFAULT '4505001',
                    S_GJAHR  FOR    BKPF-GJAHR   DEFAULT SY-DATUM+0(4),
                    S_MONAT  FOR    BKPF-MONAT   DEFAULT SY-DATUM+4(2),
                    S_BELNR  FOR    BSEG-BELNR ,
                    S_BUDAT  FOR    BKPF-BUDAT ,
                    S_PRCTR  FOR    BSEG-PRCTR OBLIGATORY DEFAULT '12TOTH00',
                    S_BLART  FOR    BKPF-BLART   OBLIGATORY DEFAULT 'RE'.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    *--- Radio Buttons for chose the PC Path or App.. Server Path
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS:
      RB_PFILE  RADIOBUTTON  GROUP RAD2 DEFAULT 'X' USER-COMMAND UCOMM1.
    SELECTION-SCREEN COMMENT 5(27) TEXT-002 FOR FIELD RB_PFILE.
    PARAMETERS:
      P_PFILE   LIKE     RLGRAP-FILENAME LOWER CASE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS:
      RB_AFILE  RADIOBUTTON  GROUP RAD2.
    SELECTION-SCREEN COMMENT 5(27) TEXT-003 FOR FIELD RB_AFILE.
    PARAMETERS:
      P_AFILE   LIKE     RLGRAP-FILENAME LOWER CASE.  " Path for AS
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PFILE.
    *-- Select File name with Dialog Box
      PERFORM SUB_GET_FILENAME CHANGING P_PFILE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_AFILE.
    *--- Attach F4 HELP CORRESPONDING TO THE FIELD
      PERFORM  SUB_AP_F4.
    AT SELECTION-SCREEN OUTPUT.
    *--Modify screen parameters
      PERFORM SUB_MODIFY_SCREEN.
    AT SELECTION-SCREEN.
    *--- Selection Screen validations for Company Code
      PERFORM SUB_VALIDATION_BUKRS.
    *--- Selection Screen validations for Chart of Accounts
      PERFORM SUB_VALIDATION_HKONT.
    *--- Selection Screen validations Fiscal Year
      PERFORM SUB_VALIDATION_GJAHR.
    *--- Selection Screen validations for Peiod
      PERFORM SUB_VALIDATION_MONAT.
    *--- Selection Screen validations for Company Code
      PERFORM SUB_VALIDATION_BELNR.
    *--- Selection Screen validations for Chart of Accounts
      PERFORM SUB_VALIDATION_BUDAT.
    *--- Selection Screen validations Fiscal Year
      PERFORM SUB_VALIDATION_PRCTR.
    *--- Selection Screen validations for Peiod
      PERFORM SUB_VALIDATION_BLART.
                            START-OF-SELECTION
    START-OF-SELECTION.
    *--- Check whether filepath/name have been entered in the sel screen
      PERFORM SUB_CHECK_FILEPATH.
    *--- Prepare Final Internal Table.
      PERFORM SUB_PREPARE_FINAL.
    *---  Download data.
      PERFORM SUB_DOWNLOAD_DATA .
    *&      Form  sub_get_filename
          text
         <--P_PFILE  Presentation server File name
    FORM SUB_GET_FILENAME  CHANGING P_FILE TYPE C.
      DATA :  L_FILENAME   TYPE STRING,                " For File Name
              L_PATH       TYPE STRING,                " For Directory
              L_FULLPATH   TYPE STRING.                " Full path
    *--- For File Open Dialog Box
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
        EXPORTING
          WINDOW_TITLE         = C_PCFILE              " Window Title
          DEFAULT_EXTENSION    = C_TXT1                " File Extn
          PROMPT_ON_OVERWRITE  = C_FLAG_X              " Over write
        CHANGING
          FILENAME             = L_FILENAME            " File Name
          PATH                 = L_PATH                " File Path
          FULLPATH             = L_FULLPATH            " Full Path
        EXCEPTIONS
          CNTL_ERROR           = 1
          ERROR_NO_GUI         = 2
          NOT_SUPPORTED_BY_GUI = 3
          OTHERS               = 4.
      IF SY-SUBRC NE 0.
    *--- Error in opening the file
        MESSAGE E000.
      ELSE.
        CONCATENATE L_PATH
                    L_FILENAME
               INTO P_FILE.
        V_PRESPATH  = L_PATH.
      ENDIF.
    ENDFORM.                    " sub_get_filename
    *&      Form  sub_ap_f4
          f4 help attched with application server
    FORM SUB_AP_F4 .
    *--- FM for to get the Application Server Path
      IF RB_AFILE = C_FLAG_X.
        CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
         EXPORTING
         DIRECTORY              =
           FILEMASK               = C_ASC                 " File Extn
        IMPORTING
           SERVERFILE             = P_AFILE               " File Path
        EXCEPTIONS
           CANCELED_BY_USER       = 1
           OTHERS                 = 2.
        IF SY-SUBRC NE 0.
    *--- Error in opening the file
          MESSAGE E000.
        ENDIF.
      ENDIF.
    ENDFORM.                                                    " sub_ap_f4
    *&      Form  sub_modify_screen
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_MODIFY_SCREEN .
    *--- Selection screen Modifications
      IF RB_PFILE = C_FLAG_X.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'P_PFILE' OR
             SCREEN-NAME = '%_P_PFILE_%_APP_%-TEXT'.
            SCREEN-ACTIVE = C_FLAG_1.
            CONCATENATE C_DIR C_GLD V_DATE SY-UZEIT(4) C_TXT INTO P_PFILE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'P_PFILE' OR
             SCREEN-NAME = '%_P_PFILE_%_APP_%-TEXT'.
            SCREEN-ACTIVE = C_ZERO.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF RB_AFILE = C_FLAG_X.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'P_AFILE' OR
             SCREEN-NAME = '%_P_AFILE_%_APP_%-TEXT'.
            SCREEN-ACTIVE = C_FLAG_1.
            CONCATENATE '/Solectron/Data/' C_GLD V_DATE SY-UZEIT(4) C_DAT
                          INTO P_AFILE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'P_AFILE' OR
             SCREEN-NAME = '%_P_AFILE_%_APP_%-TEXT'.
            SCREEN-ACTIVE = C_ZERO.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF RB_PFILE = C_FLAG_X.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'P_PFILE'.
            SCREEN-ACTIVE = C_FLAG_1.
          ENDIF.
          IF SCREEN-NAME = 'P_AFILE'.
            SCREEN-ACTIVE = C_ZERO.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF RB_AFILE = C_FLAG_X.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'P_PFILE'.
            SCREEN-ACTIVE = C_ZERO.
          ENDIF.
          IF SCREEN-NAME = 'P_AFILE'.
            SCREEN-ACTIVE = C_FLAG_1.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sub_modify_screen
    *&      Form  sub_validation_bukrs
          Validation For Company Code
    FORM SUB_VALIDATION_BUKRS .
      DATA: L_BUKRS  TYPE  BUKRS.                " Company Code
      IF S_BUKRS IS NOT INITIAL.
        IF S_BUKRS-HIGH IS NOT INITIAL AND S_BUKRS-LOW IS INITIAL.
          MESSAGE E006.
        ELSE.
    *--- Validation for chart of accounts
          SELECT BUKRS                              " Company Code
          FROM T001 UP TO 1 ROWS
          INTO L_BUKRS
          WHERE BUKRS IN S_BUKRS.
          ENDSELECT.
          IF SY-SUBRC  NE  0.
    *--- Invalid Company code
            MESSAGE E001.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_bukrs
    *&      Form  sub_validation_hkont
          Validation For General Ledger Account
    FORM SUB_VALIDATION_HKONT .
      DATA: L_HKONT  TYPE HKONT.                " General Ledger Account
      IF S_HKONT IS INITIAL.
        MESSAGE E002.
      ELSE.
        IF S_HKONT-HIGH IS NOT INITIAL AND S_HKONT-LOW IS INITIAL.
          MESSAGE E006.
        ELSE.
    *--- Validation for chart of accounts
          SELECT SAKNR                             " General Ledger Account
          FROM SKA1 UP TO 1 ROWS
          INTO L_HKONT
          WHERE SAKNR IN S_HKONT AND KTOPL = '1SLR'.
          ENDSELECT.
          IF SY-SUBRC  NE  0.
    *--- Invalid General Ledger Account
            MESSAGE E003.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_hkont
    *&      Form  sub_validation_gjahr
          Validation For Fiscal Year
    FORM SUB_VALIDATION_GJAHR .
      DATA: L_GJAHR  TYPE  GJAHR.                " Fiscal Year
      IF S_GJAHR IS NOT INITIAL.
        IF S_GJAHR-HIGH IS NOT INITIAL AND S_GJAHR-LOW IS INITIAL.
          MESSAGE E006.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_gjahr
    *&      Form  sub_validation_monat
          Validation For Fiscal period
    FORM SUB_VALIDATION_MONAT .
      DATA: L_MONAT  TYPE  MONAT.                " Fiscal period
      IF S_MONAT IS NOT INITIAL.
        IF S_MONAT-LOW LE C_ZERO.
    *--- Invalid Fiscal Period
          MESSAGE E006.
        ENDIF.
        IF S_MONAT-HIGH GT C_FLAG_12.
    *--- Invalid Fiscal Period
          MESSAGE E007.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_monat
    *&      Form  sub_validation_belnr
          Validation For Accounting Document Number
    FORM SUB_VALIDATION_BELNR .
      DATA: L_BELNR  TYPE BELNR_D.                " Accounting Document Number
      IF S_BELNR IS NOT INITIAL.
        IF S_BELNR-HIGH IS NOT INITIAL AND S_BELNR-LOW IS INITIAL.
          MESSAGE E006.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_belnr
    *&      Form  sub_validation_budat
          Validation For Posting Date
    FORM SUB_VALIDATION_BUDAT .
      DATA: L_BUDAT  TYPE  BUDAT.                " Posting Date
      IF S_BUDAT IS NOT INITIAL.
        IF S_BUDAT-HIGH IS NOT INITIAL AND S_BUDAT-LOW IS INITIAL.
          MESSAGE E006.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_budat
    *&      Form  sub_validation_prctr
          Validation For Profit Center
    FORM SUB_VALIDATION_PRCTR .
      DATA: L_PRCTR  TYPE  PRCTR.                " Profit Center
      IF S_PRCTR IS INITIAL.
        MESSAGE E010.
      ELSE.
        IF S_PRCTR-HIGH IS NOT INITIAL AND S_PRCTR-LOW IS INITIAL.
          MESSAGE E006.
        ELSE.
    *--- Validation for chart of accounts
          SELECT PRCTR                             " Profit Center
          FROM CEPC UP TO 1 ROWS
          INTO L_PRCTR
          WHERE PRCTR IN S_PRCTR.
          ENDSELECT.
          IF SY-SUBRC  NE  0.
    *--- Invalid Profit Center
            MESSAGE E011.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_prctr
    *&      Form  sub_validation_blart
          Validation For Document type
    FORM SUB_VALIDATION_BLART .
      DATA: L_BLART  TYPE  BLART.                " Document type
      IF S_BLART IS INITIAL.
        MESSAGE E012.
      ELSE.
        IF S_BLART-HIGH IS NOT INITIAL AND S_BLART-LOW IS INITIAL.
          MESSAGE E006.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_validation_blart
    *&      Form  sub_check_filepath
          Check user input for initial filename
    FORM SUB_CHECK_FILEPATH .
      IF RB_PFILE = C_FLAG_X.
        IF P_PFILE IS INITIAL.
    *--- The Local File Path can not be Empty
          MESSAGE I014.
          LEAVE LIST-PROCESSING.
        ENDIF.
      ELSEIF RB_AFILE = C_FLAG_X.
        IF P_AFILE IS INITIAL.
    *--- The App Server File Path can not be Empty
          MESSAGE I015.
          LEAVE LIST-PROCESSING.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_check_filepath
    *&      Form  sub_prepare_final
          append the required output data in to the internal table.
    FORM SUB_PREPARE_FINAL.
    changes on 30 th may by dileep
    SELECT * FROM BSEG INTO TABLE I_BSEG WHERE HKONT IN S_HKONT AND  "G/L Account
                                                GJAHR IN S_GJAHR AND
                                                PRCTR IN S_PRCTR AND  "Profit Center
                                                BLART IN S_BLART .  "Document Type
      SELECT BUKRS
             HKONT
             BELNR
             DMBTR
             KOSTL
             PRCTR
             FROM BSEG INTO TABLE IT_BSEG WHERE HKONT IN S_HKONT AND  "G/L Account
                                                PRCTR IN S_PRCTR.  "Profit Center
      LOOP AT IT_BSEG INTO WA_BSEG.
        SELECT SINGLE GJAHR
               BUDAT
               WAERS
               XBLNR
               BLART
               MONAT
               INTO (W_BSEG-GJAHR,W_BSEG-BUDAT,W_BSEG-WAERS,W_BSEG-XBLNR,W_BSEG-BLART,W_BSEG-MONAT)
                 FROM BKPF WHERE BELNR = W_BSEG-BELNR AND
                       GJAHR IN S_GJAHR AND
                       BLART IN S_BLART .  "Document Type
        MOVE WA_BSEG-BUKRS TO W_BSEG-BUKRS.
        MOVE WA_BSEG-HKONT TO W_BSEG-HKONT.
        MOVE WA_BSEG-BELNR TO W_BSEG-BELNR.
        MOVE WA_BSEG-DMBTR TO W_BSEG-DMBTR.
        MOVE WA_BSEG-KOSTL TO W_BSEG-KOSTL.
        MOVE WA_BSEG-PRCTR TO W_BSEG-PRCTR.
        APPEND W_BSEG TO I_BSEG.
      ENDLOOP.
    changes on 30 th may by dileep
      IF S_BUKRS IS NOT INITIAL.
        SORT I_BSEG BY BUKRS ASCENDING.
        DELETE I_BSEG WHERE NOT BUKRS IN S_BUKRS.
      ENDIF.
      IF S_MONAT IS NOT INITIAL.
        SORT I_BSEG BY GJAHR MONAT ASCENDING.
        IF S_MONAT-HIGH IS NOT INITIAL AND S_MONAT-LOW IS NOT INITIAL.
          DELETE I_BSEG WHERE MONAT < S_MONAT-LOW OR MONAT > S_MONAT-HIGH.
        ENDIF.
        IF S_MONAT-HIGH IS INITIAL AND S_MONAT-LOW IS NOT INITIAL.
          DELETE I_BSEG WHERE MONAT NE S_MONAT-LOW.
        ENDIF.
      ENDIF.
      IF S_BELNR IS NOT INITIAL.
        SORT I_BSEG BY BELNR ASCENDING.
        DELETE I_BSEG WHERE NOT BELNR IN S_BELNR.
      ENDIF.
      IF S_BUDAT IS NOT INITIAL.
        SORT I_BSEG BY BUDAT ASCENDING.
        DELETE I_BSEG WHERE NOT BUDAT IN S_BUDAT.
      ENDIF.
      LOOP AT I_BSEG INTO W_BSEG.
        MOVE W_BSEG-BUKRS      TO W_FINAL-BUKRS.
        MOVE W_BSEG-HKONT      TO W_FINAL-HKONT_P.
        MOVE W_BSEG-GJAHR      TO W_FINAL-GJAHR.
        MOVE W_BSEG-BELNR      TO W_FINAL-BELNR.
        MOVE W_BSEG-BUDAT      TO W_FINAL-BUDAT.
        MOVE W_BSEG-WAERS      TO W_FINAL-WAERS.
        MOVE W_BSEG-XBLNR      TO W_FINAL-XBLNR.
        MOVE W_BSEG-BLART      TO W_FINAL-BLART.
        MOVE W_BSEG-MONAT      TO W_FINAL-MONAT.
        MOVE W_BSEG-DMBTR      TO W_FINAL-DMBTR_P.
        MOVE W_BSEG-KOSTL      TO W_FINAL-KOSTL.
        MOVE W_BSEG-PRCTR      TO W_FINAL-PRCTR_P.
        SELECT SINGLE * FROM BSEG INTO W_BSEG1 WHERE BELNR = W_BSEG-BELNR AND    "Document Type
                                              BUZID = 'W' .
        IF SY-SUBRC = 0.
          MOVE W_BSEG1-HKONT      TO W_FINAL-HKONT_G.
          MOVE W_BSEG1-DMBTR      TO W_FINAL-DMBTR_G.
          MOVE W_BSEG1-PRCTR      TO W_FINAL-PRCTR_G.
          MOVE W_BSEG1-BUZID      TO W_FINAL-BUZID_G.
        ELSE.
          EXIT.
        ENDIF.
        APPEND W_FINAL TO I_FINAL.
        SORT I_FINAL BY BELNR ASCENDING.
      ENDLOOP.
    ENDFORM.                  " sub_prepare_final
    *&      Form  sub_download_data
          Download data
    FORM SUB_DOWNLOAD_DATA .
      DATA : V_PRD(2) TYPE N.
      IF RB_PFILE = C_FLAG_X.
    *--- Downloading To presentation server
        V_PRESPATH = P_PFILE.
        PERFORM SUB_DOWNLOAD_PRESSERVER.
      ELSEIF RB_AFILE = C_FLAG_X.
    *--- Downloading To Application server in Auto Mode
        V_APPPATH = P_AFILE.
        PERFORM SUB_DOWNLOAD_APPSERVER.
      ENDIF.
    ENDFORM.                    " sub_download_data
    *&      Form  sub_download_presserver
          text
    FORM SUB_DOWNLOAD_PRESSERVER.
      DATA: MESSAGE TYPE STRING.
      IF I_FINAL[] IS INITIAL.
        MESSAGE I016.
        EXIT.
      ELSE.
        W_FINAL_P-BUKRS = 'Company Code'.
        W_FINAL_P-DELIMITER_1 = '|'.
        W_FINAL_P-HKONT_P = 'G/L Account Number'.
        W_FINAL_P-DELIMITER_2 = '|'.
        W_FINAL_P-GJAHR = 'Fiscal Year'.
        W_FINAL_P-DELIMITER_3 = '|'.
        W_FINAL_P-BELNR = 'A/c Document Number'.
        W_FINAL_P-DELIMITER_4 = '|'.
        W_FINAL_P-BUDAT  = 'Posting Date' .
        W_FINAL_P-DELIMITER_5 = '|'.
        W_FINAL_P-WAERS = 'Currency'.
        W_FINAL_P-DELIMITER_6 = '|'.
        W_FINAL_P-XBLNR = 'Ref. Document Number'.
        W_FINAL_P-DELIMITER_7 = '|'.
        W_FINAL_P-BLART = 'Document Type'.
        W_FINAL_P-DELIMITER_8 = '|'.
        W_FINAL_P-MONAT = 'Fiscal Period'.
        W_FINAL_P-DELIMITER_9 = '|'.
        W_FINAL_P-DMBTR_P = 'Amount'.
        W_FINAL_P-DELIMITER_10 = '|'.
        W_FINAL_P-KOSTL = 'Cost Center'.
        W_FINAL_P-DELIMITER_11 = '|'.
        W_FINAL_P-PRCTR_P = 'Profit Center'.
        W_FINAL_P-DELIMITER_12 = '|'.
        W_FINAL_P-HKONT_G = 'G/L Account Number'.
        W_FINAL_P-DELIMITER_13 = '|'.
        W_FINAL_P-DMBTR_G = 'Amount'.
        W_FINAL_P-DELIMITER_14 = '|'.
        W_FINAL_P-PRCTR_G = 'Profit Center'.
        W_FINAL_P-DELIMITER_15 = '|'.
        W_FINAL_P-BUZID_G = 'Line Item Id'.
        APPEND W_FINAL_P TO I_FINAL_P.
        LOOP AT I_FINAL INTO W_FINAL.
          W_FINAL_P-BUKRS = W_FINAL-BUKRS.
          W_FINAL_P-DELIMITER_1 = '|'.
          W_FINAL_P-HKONT_P = W_FINAL-HKONT_P.
          W_FINAL_P-DELIMITER_2 = '|'.
          W_FINAL_P-GJAHR = W_FINAL-GJAHR.
          W_FINAL_P-DELIMITER_3 = '|'.
          W_FINAL_P-BELNR = W_FINAL-BELNR.
          W_FINAL_P-DELIMITER_4 = '|'.
          W_FINAL_P-BUDAT  = W_FINAL-BUDAT .
          W_FINAL_P-DELIMITER_5 = '|'.
          W_FINAL_P-WAERS = W_FINAL-WAERS.
          W_FINAL_P-DELIMITER_6 = '|'.
          W_FINAL_P-XBLNR = W_FINAL-XBLNR.
          W_FINAL_P-DELIMITER_7 = '|'.
          W_FINAL_P-BLART = W_FINAL-BLART.
          W_FINAL_P-DELIMITER_8 = '|'.
          W_FINAL_P-MONAT = W_FINAL-MONAT.
          W_FINAL_P-DELIMITER_9 = '|'.
          W_FINAL_P-DMBTR_P = W_FINAL-DMBTR_P.
          W_FINAL_P-DELIMITER_10 = '|'.
          W_FINAL_P-KOSTL = W_FINAL-KOSTL.
          W_FINAL_P-DELIMITER_11 = '|'.
          W_FINAL_P-PRCTR_P = W_FINAL-PRCTR_P.
          W_FINAL_P-DELIMITER_12 = '|'.
          W_FINAL_P-HKONT_G = W_FINAL-HKONT_G.
          W_FINAL_P-DELIMITER_13 = '|'.
          W_FINAL_P-DMBTR_G = W_FINAL-DMBTR_G.
          W_FINAL_P-DELIMITER_14 = '|'.
          W_FINAL_P-PRCTR_G = W_FINAL-PRCTR_G.
          W_FINAL_P-DELIMITER_15 = '|'.
          W_FINAL_P-BUZID_G = W_FINAL-BUZID_G.
          APPEND W_FINAL_P TO I_FINAL_P.
          CLEAR : W_FINAL_P, W_FINAL.
        ENDLOOP.
      ENDIF.
    *---Downloading data to file on Presentation Server
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = V_PRESPATH
          FILETYPE                = 'ASC'
        TABLES
          DATA_TAB                = I_FINAL_P
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
    *-- File can not be opened successfully
      IF SY-SUBRC NE 0.
        IF SY-BATCH EQ C_FLAG_X. " Stop Processing
          MESSAGE E017.        " File could not be opened
        ELSE.
          MESSAGE I017.        " File could not be opened
          LEAVE LIST-PROCESSING.
        ENDIF.
      ELSE.
        CONCATENATE 'Data Successfully downloaded to the Specified Location' V_PRESPATH INTO MESSAGE SEPARATED BY SPACE.
        MESSAGE MESSAGE TYPE 'S'.
      ENDIF.
      MODIFY SCREEN.
    ENDFORM.                    " sub_download_presserver
    *&      Form  sub_download_appserver
          text
    FORM SUB_DOWNLOAD_APPSERVER .
      DATA: V_FILE        TYPE  STRING,               " String
            P_DMBTR  TYPE  CHAR20,
            G_DMBTR  TYPE  CHAR20,
            MESSAGE1 TYPE STRING.
      IF I_FINAL[] IS INITIAL.
        IF SY-BATCH EQ C_FLAG_X.
    *--- File contains no data
          MESSAGE E016 .
        ELSE.
    *--- File contains no data
          MESSAGE I016 .
          LEAVE LIST-PROCESSING.
        ENDIF.
      ENDIF.
    *--- To Open The file in Application Server
      OPEN DATASET V_APPPATH FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      IF SY-SUBRC NE 0.
    *--- Display error message: "Could not open file"
        IF SY-BATCH EQ C_FLAG_X.
    *--- File contains no data
          MESSAGE E016 .
        ELSE.
    *--- File contains no data
          MESSAGE I016 .
          LEAVE LIST-PROCESSING.
        ENDIF.
      ENDIF.
    *--- Perform for building the Report header
      CONCATENATE
                 'COMPANY_CODE'
                 'G/L_ACCOUNT_NUMBER'
                 'FISCAL_YEAR'
                 'A/C_DOCUMENT_NUMBER'
                 'POSTING_DATE'
                 'CURRENCY'
                 'REF_DOCUMENT_NUMBER'
                 'DOCUMENT_TYPE'
                 'FISCAL_PERIOD'
                 'AMOUNT'
                 'COSTCENTER'
                 'PROFIT_CENTER'
                 'G/L_ACCOUNT_NUMBER'
                 'AMOUNT'
                 'PROFIT_CENTER'
                 'LINE_ITEM_ID'
                INTO V_FILE SEPARATED BY C_DELIMITER.
      TRANSFER V_FILE TO V_APPPATH.
    *--- Transfer the data to application Server
      LOOP AT I_FINAL INTO W_FINAL.
        P_DMBTR =  W_FINAL-DMBTR_P.
        G_DMBTR =  W_FINAL-DMBTR_G.
        CONCATENATE
                 W_FINAL-BUKRS
                 W_FINAL-HKONT_P
                 W_FINAL-GJAHR
                 W_FINAL-BELNR
                 W_FINAL-BUDAT
                 W_FINAL-WAERS
                 W_FINAL-XBLNR
                 W_FINAL-BLART
                 W_FINAL-MONAT
                 P_DMBTR
                 W_FINAL-KOSTL
                 W_FINAL-PRCTR_P
                 W_FINAL-HKONT_G
                 G_DMBTR
                 W_FINAL-PRCTR_G
                 W_FINAL-BUZID_G
              INTO V_FILE SEPARATED BY C_DELIMITER.
        TRANSFER V_FILE TO V_APPPATH.
        IF SY-SUBRC NE 0.
    Display error message: "Data could not be written at the location"
          MESSAGE 'Data could not be written at the location' TYPE 'I'.
          EXIT.
        ENDIF.
        CLEAR V_FILE.
      ENDLOOP.
      CLOSE DATASET V_APPPATH.
      IF SY-SUBRC NE 0.
    Display error message: "File could not be closed"
        MESSAGE 'File could not be closed' TYPE 'I'.
        EXIT.
      ELSE.
        CONCATENATE 'Data Successfully downloaded to the Specified Location' V_APPPATH INTO MESSAGE1 SEPARATED BY SPACE.
        MESSAGE MESSAGE1 TYPE 'S'.
      ENDIF.
    ENDFORM.                    " sub_download_appserver

    hi,
    here is improved code.
    REPORT ZFIR_GRIR_IPV
    NO STANDARD PAGE HEADING
    LINE-SIZE 120
    MESSAGE-ID ZFI02.
    TABLES: BSEG,BKPF.
    TYPES: BEGIN OF A_FINAL,
    BUKRS TYPE CHAR12,
    HKONT_P TYPE CHAR18,
    GJAHR TYPE CHAR11,
    BELNR TYPE CHAR19,
    BUDAT TYPE CHAR12,
    WAERS TYPE CHAR8,
    XBLNR TYPE CHAR20,
    BLART TYPE CHAR13,
    MONAT TYPE CHAR13,
    DMBTR_P TYPE CHAR13,
    KOSTL TYPE CHAR11,
    PRCTR_P TYPE CHAR13,
    HKONT_G TYPE CHAR18,
    DMBTR_G TYPE CHAR13,
    PRCTR_G TYPE CHAR13,
    BUZID_G TYPE CHAR15,
    END OF A_FINAL.
    changes on 30 th may by dileep
    TYPES: BEGIN OF IT_FINAL,
    BUKRS TYPE BUKRS ,
    HKONT TYPE HKONT,
    BELNR TYPE BELNR_D,
    DMBTR TYPE DMBTR ,
    KOSTL TYPE KOSTL,
    PRCTR TYPE PRCTR,
    END OF IT_FINAL.
    TYPES: BEGIN OF IT_FINAL1,
    BUKRS TYPE BUKRS,
    HKONT TYPE HKONT,
    GJAHR TYPE GJAHR ,
    BELNR TYPE BELNR_D,
    BUDAT TYPE BUDAT,
    WAERS TYPE WAERS ,
    XBLNR TYPE XBLNR1,
    BLART TYPE BLART,
    MONAT TYPE MONAT,
    DMBTR TYPE DMBTR,
    KOSTL TYPE KOSTL,
    PRCTR TYPE PRCTR,
    END OF IT_FINAL1.
    end of changes on 30 th may by dileep
    TYPES: BEGIN OF P_FINAL,
    BUKRS TYPE CHAR12,
    DELIMITER_1 TYPE CHAR1,
    HKONT_P TYPE CHAR18,
    DELIMITER_2 TYPE CHAR1,
    GJAHR TYPE CHAR11,
    DELIMITER_3 TYPE CHAR1,
    BELNR TYPE CHAR19,
    DELIMITER_4 TYPE CHAR1,
    BUDAT TYPE CHAR12,
    DELIMITER_5 TYPE CHAR1,
    WAERS TYPE CHAR8,
    DELIMITER_6 TYPE CHAR1,
    XBLNR TYPE CHAR20,
    DELIMITER_7 TYPE CHAR1,
    BLART TYPE CHAR13,
    DELIMITER_8 TYPE CHAR1,
    MONAT TYPE CHAR13,
    DELIMITER_9 TYPE CHAR1,
    DMBTR_P TYPE CHAR13,
    DELIMITER_10 TYPE CHAR1,
    KOSTL TYPE CHAR11,
    DELIMITER_11 TYPE CHAR1,
    PRCTR_P TYPE CHAR13,
    DELIMITER_12 TYPE CHAR1,
    HKONT_G TYPE CHAR18,
    DELIMITER_13 TYPE CHAR1,
    DMBTR_G TYPE CHAR13,
    DELIMITER_14 TYPE CHAR1,
    PRCTR_G TYPE CHAR13,
    DELIMITER_15 TYPE CHAR1,
    BUZID_G TYPE CHAR15,
    END OF P_FINAL.
    DATA: IT_BSEG TYPE STANDARD TABLE OF IT_FINAL INITIAL SIZE 0,
    I_BSEG TYPE STANDARD TABLE OF IT_FINAL1 INITIAL SIZE 0,
    I_FINAL TYPE STANDARD TABLE OF A_FINAL INITIAL SIZE 0 WITH HEADER LINE,
    I_FINAL_P TYPE STANDARD TABLE OF P_FINAL INITIAL SIZE 0 WITH HEADER LINE,
    W_FINAL_P TYPE P_FINAL,
    W_BSEG1 TYPE BSEG,
    WA_BSEG TYPE IT_FINAL OCCURS 0 WITH HEADER LINE,
    W_BSEG TYPE IT_FINAL1 OCCURS 0 WITH HEADER LINE,
    T_BSEG TYPE STANDARD TABLE OF BSEG INITIAL SIZE 0 WITH HEADER LINE,
    W_FINAL TYPE A_FINAL,
    F_YEAR TYPE BAPI0002_4-FISCAL_YEAR,
    F_PERIOD TYPE BAPI0002_4-FISCAL_PERIOD,
    RETURN1 TYPE BAPIRETURN1,
    V_DATE TYPE CHAR8, " Date in YYYYMMDD format
    V_PRESPATH TYPE STRING, " Path
    V_APPPATH TYPE STRING, " Path
    V_FILENAME(25) TYPE C, " File Name
    V_PERIOD TYPE CHAR3, " Date for Posting Period
    V_FSYEAR TYPE BDATJ, " Fiscal Year
    L_TEXT TYPE CHAR1. " Hypen
    CONSTANTS: C_TXT TYPE CHAR4 VALUE '.txt', " File Extension
    C_TXT1 TYPE STRING VALUE 'txt', " File Type
    C_FLAG_X TYPE CHAR1 VALUE 'X', " Flag
    C_ASC TYPE FILETYPE VALUE 'ASC', " File type
    C_DAT TYPE CHAR4 VALUE '.dat', " File Type
    C_FLAG_1 TYPE CHAR1 VALUE '1', " Constant value
    C_ZERO TYPE CHAR1 VALUE '0', " Constant
    C_GLD(10) TYPE C VALUE 'GRIR021S', " Constant in file Path
    C_DIR TYPE CHAR3 VALUE 'C:\', " Presentation Server path
    C_FLAG_12 TYPE CHAR2 VALUE '12', " Constant value
    C_PCFILE TYPE STRING VALUE 'PC File',
    C_DELIMITER TYPE C VALUE '|'.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
              o
                    +
    Selection Criteria
    SELECT-OPTIONS: S_BUKRS FOR BSEG-BUKRS DEFAULT '012T', " Company Code
    S_HKONT FOR BSEG-HKONT OBLIGATORY DEFAULT '4505001',
    S_GJAHR FOR BKPF-GJAHR DEFAULT SY-DATUM+0(4),
    S_MONAT FOR BKPF-MONAT DEFAULT SY-DATUM+4(2),
    S_BELNR FOR BSEG-BELNR ,
    S_BUDAT FOR BKPF-BUDAT ,
    S_PRCTR FOR BSEG-PRCTR OBLIGATORY DEFAULT '12TOTH00',
    S_BLART FOR BKPF-BLART OBLIGATORY DEFAULT 'RE'.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
              o
                    +
    Radio Buttons for chose the PC Path or App.. Server Path
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS:
    RB_PFILE RADIOBUTTON GROUP RAD2 DEFAULT 'X' USER-COMMAND UCOMM1.
    SELECTION-SCREEN COMMENT 5(27) TEXT-002 FOR FIELD RB_PFILE.
    PARAMETERS:
    P_PFILE LIKE RLGRAP-FILENAME LOWER CASE.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS:
    RB_AFILE RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN COMMENT 5(27) TEXT-003 FOR FIELD RB_AFILE.
    PARAMETERS:
    P_AFILE LIKE RLGRAP-FILENAME LOWER CASE. " Path for AS
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PFILE.
              o
                    + Select File name with Dialog Box
    PERFORM SUB_GET_FILENAME CHANGING P_PFILE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_AFILE.
              o
                    +
    Attach F4 HELP CORRESPONDING TO THE FIELD
    PERFORM SUB_AP_F4.
    AT SELECTION-SCREEN OUTPUT.
    *--Modify screen parameters
    PERFORM SUB_MODIFY_SCREEN.
    AT SELECTION-SCREEN.
              o
                    +
    Selection Screen validations for Company Code
    PERFORM SUB_VALIDATION_BUKRS.
              o
                    +
    Selection Screen validations for Chart of Accounts
    PERFORM SUB_VALIDATION_HKONT.
              o
                    +
    Selection Screen validations Fiscal Year
    PERFORM SUB_VALIDATION_GJAHR.
              o
                    +
    Selection Screen validations for Peiod
    PERFORM SUB_VALIDATION_MONAT.
              o
                    +
    Selection Screen validations for Company Code
    PERFORM SUB_VALIDATION_BELNR.
              o
                    +
    Selection Screen validations for Chart of Accounts
    PERFORM SUB_VALIDATION_BUDAT.
              o
                    +
    Selection Screen validations Fiscal Year
    PERFORM SUB_VALIDATION_PRCTR.
              o
                    +
    Selection Screen validations for Peiod
    PERFORM SUB_VALIDATION_BLART.
    START-OF-SELECTION
    START-OF-SELECTION.
              o
                    +
    Check whether filepath/name have been entered in the sel screen
    PERFORM SUB_CHECK_FILEPATH.
              o
                    +
    Prepare Final Internal Table.
    PERFORM SUB_PREPARE_FINAL.
              o
                    +
    Download data.
    PERFORM SUB_DOWNLOAD_DATA .
    *& Form sub_get_filename
    text
    <--P_PFILE Presentation server File name
    FORM SUB_GET_FILENAME CHANGING P_FILE TYPE C.
    DATA : L_FILENAME TYPE STRING, " For File Name
    L_PATH TYPE STRING, " For Directory
    L_FULLPATH TYPE STRING. " Full path
              o
                    +
    For File Open Dialog Box
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
    EXPORTING
    WINDOW_TITLE = C_PCFILE " Window Title
    DEFAULT_EXTENSION = C_TXT1 " File Extn
    PROMPT_ON_OVERWRITE = C_FLAG_X " Over write
    CHANGING
    FILENAME = L_FILENAME " File Name
    PATH = L_PATH " File Path
    FULLPATH = L_FULLPATH " Full Path
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    OTHERS = 4.
    IF SY-SUBRC NE 0.
              o
                    +
    Error in opening the file
    MESSAGE E000.
    ELSE.
    CONCATENATE L_PATH
    L_FILENAME
    INTO P_FILE.
    V_PRESPATH = L_PATH.
    ENDIF.
    ENDFORM. " sub_get_filename
    *& Form sub_ap_f4
    f4 help attched with application server
    FORM SUB_AP_F4 .
              o
                    +
    FM for to get the Application Server Path
    IF RB_AFILE = C_FLAG_X.
    CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    EXPORTING
    DIRECTORY =
    FILEMASK = C_ASC " File Extn
    IMPORTING
    SERVERFILE = P_AFILE " File Path
    EXCEPTIONS
    CANCELED_BY_USER = 1
    OTHERS = 2.
    IF SY-SUBRC NE 0.
              o
                    +
    Error in opening the file
    MESSAGE E000.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_ap_f4
    *& Form sub_modify_screen
    text
    --> p1 text
    <-- p2 text
    FORM SUB_MODIFY_SCREEN .
              o
                    +
    Selection screen Modifications
    IF RB_PFILE = C_FLAG_X.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'P_PFILE' OR
    SCREEN-NAME = '%_P_PFILE_%_APP_%-TEXT'.
    SCREEN-ACTIVE = C_FLAG_1.
    CONCATENATE C_DIR C_GLD V_DATE SY-UZEIT(4) C_TXT INTO P_PFILE.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ELSE.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'P_PFILE' OR
    SCREEN-NAME = '%_P_PFILE_%_APP_%-TEXT'.
    SCREEN-ACTIVE = C_ZERO.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF RB_AFILE = C_FLAG_X.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'P_AFILE' OR
    SCREEN-NAME = '%_P_AFILE_%_APP_%-TEXT'.
    SCREEN-ACTIVE = C_FLAG_1.
    CONCATENATE '/Solectron/Data/' C_GLD V_DATE SY-UZEIT(4) C_DAT
    INTO P_AFILE.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ELSE.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'P_AFILE' OR
    SCREEN-NAME = '%_P_AFILE_%_APP_%-TEXT'.
    SCREEN-ACTIVE = C_ZERO.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF RB_PFILE = C_FLAG_X.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'P_PFILE'.
    SCREEN-ACTIVE = C_FLAG_1.
    ENDIF.
    IF SCREEN-NAME = 'P_AFILE'.
    SCREEN-ACTIVE = C_ZERO.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF RB_AFILE = C_FLAG_X.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'P_PFILE'.
    SCREEN-ACTIVE = C_ZERO.
    ENDIF.
    IF SCREEN-NAME = 'P_AFILE'.
    SCREEN-ACTIVE = C_FLAG_1.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    ENDFORM. " sub_modify_screen
    *& Form sub_validation_bukrs
    Validation For Company Code
    FORM SUB_VALIDATION_BUKRS .
    DATA: L_BUKRS TYPE BUKRS. " Company Code
    IF S_BUKRS IS NOT INITIAL.
    IF S_BUKRS-HIGH IS NOT INITIAL AND S_BUKRS-LOW IS INITIAL.
    MESSAGE E006.
    ELSE.
              o
                    +
    Validation for chart of accounts
    SELECT BUKRS " Company Code
    FROM T001 UP TO 1 ROWS
    INTO L_BUKRS
    WHERE BUKRS IN S_BUKRS.
    ENDSELECT.
    IF SY-SUBRC NE 0.
              o
                    +
    Invalid Company code
    MESSAGE E001.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_bukrs
    *& Form sub_validation_hkont
    Validation For General Ledger Account
    FORM SUB_VALIDATION_HKONT .
    DATA: L_HKONT TYPE HKONT. " General Ledger Account
    IF S_HKONT IS INITIAL.
    MESSAGE E002.
    ELSE.
    IF S_HKONT-HIGH IS NOT INITIAL AND S_HKONT-LOW IS INITIAL.
    MESSAGE E006.
    ELSE.
              o
                    +
    Validation for chart of accounts
    SELECT SAKNR " General Ledger Account
    FROM SKA1 UP TO 1 ROWS
    INTO L_HKONT
    WHERE SAKNR IN S_HKONT AND KTOPL = '1SLR'.
    ENDSELECT.
    IF SY-SUBRC NE 0.
              o
                    +
    Invalid General Ledger Account
    MESSAGE E003.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_hkont
    *& Form sub_validation_gjahr
    Validation For Fiscal Year
    FORM SUB_VALIDATION_GJAHR .
    DATA: L_GJAHR TYPE GJAHR. " Fiscal Year
    IF S_GJAHR IS NOT INITIAL.
    IF S_GJAHR-HIGH IS NOT INITIAL AND S_GJAHR-LOW IS INITIAL.
    MESSAGE E006.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_gjahr
    *& Form sub_validation_monat
    Validation For Fiscal period
    FORM SUB_VALIDATION_MONAT .
    DATA: L_MONAT TYPE MONAT. " Fiscal period
    IF S_MONAT IS NOT INITIAL.
    IF S_MONAT-LOW LE C_ZERO.
              o
                    +
    Invalid Fiscal Period
    MESSAGE E006.
    ENDIF.
    IF S_MONAT-HIGH GT C_FLAG_12.
              o
                    +
    Invalid Fiscal Period
    MESSAGE E007.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_monat
    *& Form sub_validation_belnr
    Validation For Accounting Document Number
    FORM SUB_VALIDATION_BELNR .
    DATA: L_BELNR TYPE BELNR_D. " Accounting Document Number
    IF S_BELNR IS NOT INITIAL.
    IF S_BELNR-HIGH IS NOT INITIAL AND S_BELNR-LOW IS INITIAL.
    MESSAGE E006.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_belnr
    *& Form sub_validation_budat
    Validation For Posting Date
    FORM SUB_VALIDATION_BUDAT .
    DATA: L_BUDAT TYPE BUDAT. " Posting Date
    IF S_BUDAT IS NOT INITIAL.
    IF S_BUDAT-HIGH IS NOT INITIAL AND S_BUDAT-LOW IS INITIAL.
    MESSAGE E006.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_budat
    *& Form sub_validation_prctr
    Validation For Profit Center
    FORM SUB_VALIDATION_PRCTR .
    DATA: L_PRCTR TYPE PRCTR. " Profit Center
    IF S_PRCTR IS INITIAL.
    MESSAGE E010.
    ELSE.
    IF S_PRCTR-HIGH IS NOT INITIAL AND S_PRCTR-LOW IS INITIAL.
    MESSAGE E006.
    ELSE.
              o
                    +
    Validation for chart of accounts
    SELECT PRCTR " Profit Center
    FROM CEPC UP TO 1 ROWS
    INTO L_PRCTR
    WHERE PRCTR IN S_PRCTR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
              o
                    +
    Invalid Profit Center
    MESSAGE E011.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_prctr
    *& Form sub_validation_blart
    Validation For Document type
    FORM SUB_VALIDATION_BLART .
    DATA: L_BLART TYPE BLART. " Document type
    IF S_BLART IS INITIAL.
    MESSAGE E012.
    ELSE.
    IF S_BLART-HIGH IS NOT INITIAL AND S_BLART-LOW IS INITIAL.
    MESSAGE E006.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_validation_blart
    *& Form sub_check_filepath
    Check user input for initial filename
    FORM SUB_CHECK_FILEPATH .
    IF RB_PFILE = C_FLAG_X.
    IF P_PFILE IS INITIAL.
              o
                    +
    The Local File Path can not be Empty
    MESSAGE I014.
    LEAVE LIST-PROCESSING.
    ENDIF.
    ELSEIF RB_AFILE = C_FLAG_X.
    IF P_AFILE IS INITIAL.
              o
                    +
    The App Server File Path can not be Empty
    MESSAGE I015.
    LEAVE LIST-PROCESSING.
    ENDIF.
    ENDIF.
    ENDFORM. " sub_check_filepath
    *& Form sub_prepare_final
    append the required output data in to the internal table.
    FORM SUB_PREPARE_FINAL.
    changes on 30 th may by dileep
    SELECT * FROM BSEG INTO TABLE I_BSEG WHERE HKONT IN S_HKONT AND "G/L Account
    GJAHR IN S_GJAHR AND
    PRCTR IN S_PRCTR AND "Profit Center
    BLART IN S_BLART . "Document Type
    SELECT BUKRS
    HKONT
    BELNR
    DMBTR
    KOSTL
    PRCTR
    FROM BSEG INTO TABLE IT_BSEG WHERE HKONT IN S_HKONT AND "G/L Account
    PRCTR IN S_PRCTR. "Profit Center
    LOOP AT IT_BSEG INTO WA_BSEG.
    SELECT SINGLE GJAHR
    BUDAT
    WAERS
    XBLNR
    BLART
    MONAT
    INTO (W_BSEG-GJAHR,W_BSEG-BUDAT,W_BSEG-WAERS,W_BSEG-XBLNR,W_BSEG-BLART,W_BSEG-MONAT)
    FROM BKPF WHERE BELNR = W_BSEG-BELNR AND
    GJAHR IN S_GJAHR AND
    BLART IN S_BLART . "Document Type
    MOVE WA_BSEG-BUKRS TO W_BSEG-BUKRS.
    MOVE WA_BSEG-HKONT TO W_BSEG-HKONT.
    MOVE WA_BSEG-BELNR TO W_BSEG-BELNR.
    MOVE WA_BSEG-DMBTR TO W_BSEG-DMBTR.
    MOVE WA_BSEG-KOSTL TO W_BSEG-KOSTL.
    MOVE WA_BSEG-PRCTR TO W_BSEG-PRCTR.
    APPEND W_BSEG TO I_BSEG.
    ENDLOOP.
    changes on 30 th may by dileep
    IF S_BUKRS IS NOT INITIAL.
    SORT I_BSEG BY BUKRS ASCENDING.
    DELETE I_BSEG WHERE NOT BUKRS IN S_BUKRS.
    ENDIF.
    IF S_MONAT IS NOT INITIAL.
    SORT I_BSEG BY GJAHR MONAT ASCENDING.
    IF S_MONAT-HIGH IS NOT INITIAL AND S_MONAT-LOW IS NOT INITIAL.
    DELETE I_BSEG WHERE MONAT < S_MONAT-LOW OR MONAT > S_MONAT-HIGH.
    ENDIF.
    IF S_MONAT-HIGH IS INITIAL AND S_MONAT-LOW IS NOT INITIAL.
    DELETE I_BSEG WHERE MONAT NE S_MONAT-LOW.
    ENDIF.
    ENDIF.
    IF S_BELNR IS NOT INITIAL.
    SORT I_BSEG BY BELNR ASCENDING.
    DELETE I_BSEG WHERE NOT BELNR IN S_BELNR.
    ENDIF.
    IF S_BUDAT IS NOT INITIAL.
    SORT I_BSEG BY BUDAT ASCENDING.
    DELETE I_BSEG WHERE NOT BUDAT IN S_BUDAT.
    ENDIF.
    LOOP AT I_BSEG INTO W_BSEG.
    MOVE W_BSEG-BUKRS TO W_FINAL-BUKRS.
    MOVE W_BSEG-HKONT TO W_FINAL-HKONT_P.
    MOVE W_BSEG-GJAHR TO W_FINAL-GJAHR.
    MOVE W_BSEG-BELNR TO W_FINAL-BELNR.
    MOVE W_BSEG-BUDAT TO W_FINAL-BUDAT.
    MOVE W_BSEG-WAERS TO W_FINAL-WAERS.
    MOVE W_BSEG-XBLNR TO W_FINAL-XBLNR.
    MOVE W_BSEG-BLART TO W_FINAL-BLART.
    MOVE W_BSEG-MONAT TO W_FINAL-MONAT.
    MOVE W_BSEG-DMBTR TO W_FINAL-DMBTR_P.
    MOVE W_BSEG-KOSTL TO W_FINAL-KOSTL.
    MOVE W_BSEG-PRCTR TO W_FINAL-PRCTR_P.
    SELECT SINGLE * FROM BSEG INTO W_BSEG1 WHERE BELNR = W_BSEG-BELNR AND "Document Type
    BUZID = 'W' .
    IF SY-SUBRC = 0.
    MOVE W_BSEG1-HKONT TO W_FINAL-HKONT_G.
    MOVE W_BSEG1-DMBTR TO W_FINAL-DMBTR_G.
    MOVE W_BSEG1-PRCTR TO W_FINAL-PRCTR_G.
    MOVE W_BSEG1-BUZID TO W_FINAL-BUZID_G.
    ELSE.
    EXIT.
    ENDIF.
    APPEND W_FINAL TO I_FINAL.
    SORT I_FINAL BY BELNR ASCENDING.
    ENDLOOP.
    ENDFORM. " sub_prepare_final
    *& Form sub_download_data
    Download data
    FORM SUB_DOWNLOAD_DATA .
    DATA : V_PRD(2) TYPE N.
    IF RB_PFILE = C_FLAG_X.
              o
                    +
    Downloading To presentation server
    V_PRESPATH = P_PFILE.
    PERFORM SUB_DOWNLOAD_PRESSERVER.
    ELSEIF RB_AFILE = C_FLAG_X.
              o
                    +
    Downloading To Application server in Auto Mode
    V_APPPATH = P_AFILE.
    PERFORM SUB_DOWNLOAD_APPSERVER.
    ENDIF.
    ENDFORM. " sub_download_data
    *& Form sub_download_presserver
    text
    FORM SUB_DOWNLOAD_PRESSERVER.
    DATA: MESSAGE TYPE STRING.
    IF I_FINAL[] IS INITIAL.
    MESSAGE I016.
    EXIT.
    ELSE.
    W_FINAL_P-BUKRS = 'Company Code'.
    W_FINAL_P-DELIMITER_1 = '|'.
    W_FINAL_P-HKONT_P = 'G/L Account Number'.
    W_FINAL_P-DELIMITER_2 = '|'.
    W_FINAL_P-GJAHR = 'Fiscal Year'.
    W_FINAL_P-DELIMITER_3 = '|'.
    W_FINAL_P-BELNR = 'A/c Document Number'.
    W_FINAL_P-DELIMITER_4 = '|'.
    W_FINAL_P-BUDAT = 'Posting Date' .
    W_FINAL_P-DELIMITER_5 = '|'.
    W_FINAL_P-WAERS = 'Currency'.
    W_FINAL_P-DELIMITER_6 = '|'.
    W_FINAL_P-XBLNR = 'Ref. Document Number'.
    W_FINAL_P-DELIMITER_7 = '|'.
    W_FINAL_P-BLART = 'Document Type'.
    W_FINAL_P-DELIMITER_8 = '|'.
    W_FINAL_P-MONAT = 'Fiscal Period'.
    W_FINAL_P-DELIMITER_9 = '|'.
    W_FINAL_P-DMBTR_P = 'Amount'.
    W_FINAL_P-DELIMITER_10 = '|'.
    W_FINAL_P-KOSTL = 'Cost Center'.
    W_FINAL_P-DELIMITER_11 = '|'.
    W_FINAL_P-PRCTR_P = 'Profit Center'.
    W_FINAL_P-DELIMITER_12 = '|'.
    W_FINAL_P-HKONT_G = 'G/L Account Number'.
    W_FINAL_P-DELIMITER_13 = '|'.
    W_FINAL_P-DMBTR_G = 'Amount'.
    W_FINAL_P-DELIMITER_14 = '|'.
    W_FINAL_P-PRCTR_G = 'Profit Center'.
    W_FINAL_P-DELIMITER_15 = '|'.
    W_FINAL_P-BUZID_G = 'Line Item Id'.
    APPEND W_FINAL_P TO I_FINAL_P.
    LOOP AT I_FINAL INTO W_FINAL.
    W_FINAL_P-BUKRS = W_FINAL-BUKRS.
    W_FINAL_P-DELIMITER_1 = '|'.
    W_FINAL_P-HKONT_P = W_FINAL-HKONT_P.
    W_FINAL_P-DELIMITER_2 = '|'.
    W_FINAL_P-GJAHR = W_FINAL-GJAHR.
    W_FINAL_P-DELIMITER_3 = '|'.
    W_FINAL_P-BELNR = W_FINAL-BELNR.
    W_FINAL_P-DELIMITER_4 = '|'.
    W_FINAL_P-BUDAT = W_FINAL-BUDAT .
    W_FINAL_P-DELIMITER_5 = '|'.
    W_FINAL_P-WAERS = W_FINAL-WAERS.
    W_FINAL_P-DELIMITER_6 = '|'.
    W_FINAL_P-XBLNR = W_FINAL-XBLNR.
    W_FINAL_P-DELIMITER_7 = '|'.
    W_FINAL_P-BLART = W_FINAL-BLART.
    W_FINAL_P-DELIMITER_8 = '|'.
    W_FINAL_P-MONAT = W_FINAL-MONAT.
    W_FINAL_P-DELIMITER_9 = '|'.
    W_FINAL_P-DMBTR_P = W_FINAL-DMBTR_P.
    W_FINAL_P-DELIMITER_10 = '|'.
    W_FINAL_P-KOSTL = W_FINAL-KOSTL.
    W_FINAL_P-DELIMITER_11 = '|'.
    W_FINAL_P-PRCTR_P = W_FINAL-PRCTR_P.
    W_FINAL_P-DELIMITER_12 = '|'.
    W_FINAL_P-HKONT_G = W_FINAL-HKONT_G.
    W_FINAL_P-DELIMITER_13 = '|'.
    W_FINAL_P-DMBTR_G = W_FINAL-DMBTR_G.
    W_FINAL_P-DELIMITER_14 = '|'.
    W_FINAL_P-PRCTR_G = W_FINAL-PRCTR_G.
    W_FINAL_P-DELIMITER_15 = '|'.
    W_FINAL_P-BUZID_G = W_FINAL-BUZID_G.
    APPEND W_FINAL_P TO I_FINAL_P.
    CLEAR : W_FINAL_P, W_FINAL.
    ENDLOOP.
    ENDIF.
    *---Downloading data to file on Presentation Server
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = V_PRESPATH
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = I_FINAL_P
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22.
              o
                    + File can not be opened successfully
    IF SY-SUBRC NE 0.
    IF SY-BATCH EQ C_FLAG_X. " Stop Processing
    MESSAGE E017. " File could not be opened
    ELSE.
    MESSAGE I017. " File could not be opened
    LEAVE LIST-PROCESSING.
    ENDIF.
    ELSE.
    CONCATENATE 'Data Successfully downloaded to the Specified Location' V_PRESPATH INTO MESSAGE SEPARATED BY SPACE.
    MESSAGE MESSAGE TYPE 'S'.
    ENDIF.
    MODIFY SCREEN.
    ENDFORM. " sub_download_presserver
    *& Form sub_download_appserver
    text
    FORM SUB_DOWNLOAD_APPSERVER .
    DATA: V_FILE TYPE STRING, " String
    P_DMBTR TYPE CHAR20,
    G_DMBTR TYPE CHAR20,
    MESSAGE1 TYPE STRING.
    IF I_FINAL[] IS INITIAL.
    IF SY-BATCH EQ C_FLAG_X.
              o
                    +
    File contains no data
    MESSAGE E016 .
    ELSE.
              o
                    +
    File contains no data
    MESSAGE I016 .
    LEAVE LIST-PROCESSING.
    ENDIF.
    ENDIF.
              o
                    +
    To Open The file in Application Server
    OPEN DATASET V_APPPATH FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC NE 0.
              o
                    +
    Display error message: "Could not open file"
    IF SY-BATCH EQ C_FLAG_X.
              o
                    +
    File contains no data
    MESSAGE E016 .
    ELSE.
              o
                    +
    File contains no data
    MESSAGE I016 .
    LEAVE LIST-PROCESSING.
    ENDIF.
    ENDIF.
              o
                    +
    Perform for building the Report header
    CONCATENATE
    'COMPANY_CODE'
    'G/L_ACCOUNT_NUMBER'
    'FISCAL_YEAR'
    'A/C_DOCUMENT_NUMBER'
    'POSTING_DATE'
    'CURRENCY'
    'REF_DOCUMENT_NUMBER'
    'DOCUMENT_TYPE'
    'FISCAL_PERIOD'
    'AMOUNT'
    'COSTCENTER'
    'PROFIT_CENTER'
    'G/L_ACCOUNT_NUMBER'
    'AMOUNT'
    'PROFIT_CENTER'
    'LINE_ITEM_ID'
    INTO V_FILE SEPARATED BY C_DELIMITER.
    TRANSFER V_FILE TO V_APPPATH.
              o
                    +
    Transfer the data to application Server
    LOOP AT I_FINAL INTO W_FINAL.
    P_DMBTR = W_FINAL-DMBTR_P.
    G_DMBTR = W_FINAL-DMBTR_G.
    CONCATENATE
    W_FINAL-BUKRS
    W_FINAL-HKONT_P
    W_FINAL-GJAHR
    W_FINAL-BELNR
    W_FINAL-BUDAT
    W_FINAL-WAERS
    W_FINAL-XBLNR
    W_FINAL-BLART
    W_FINAL-MONAT
    P_DMBTR
    W_FINAL-KOSTL
    W_FINAL-PRCTR_P
    W_FINAL-HKONT_G
    G_DMBTR
    W_FINAL-PRCTR_G
    W_FINAL-BUZID_G
    INTO V_FILE SEPARATED BY C_DELIMITER.
    TRANSFER V_FILE TO V_APPPATH.
    IF SY-SUBRC NE 0.
    Display error message: "Data could not be written at the location"
    MESSAGE 'Data could not be written at the location' TYPE 'I'.
    EXIT.
    ENDIF.
    CLEAR V_FILE.
    ENDLOOP.
    CLOSE DATASET V_APPPATH.
    IF SY-SUBRC NE 0.
    Display error message: "File could not be closed"
    MESSAGE 'File could not be closed' TYPE 'I'.
    EXIT.
    ELSE.
    CONCATENATE 'Data Successfully downloaded to the Specified Location' V_APPPATH INTO MESSAGE1 SEPARATED BY SPACE.
    MESSAGE MESSAGE1 TYPE 'S'.
    ENDIF.
    ENDFORM. " sub_download_appserver
    regards,
    Vipul

  • Regarding the performance in report

    Hi Abap Gurus,
                              i am working on the report. my requirement is that after executing the report data gets extracting after 11 hours.the required data is comonf perfectly.  how to improve the performance. any tips to follow the performance in the report.  if possible post the code.
    Moderator Message: Please search the forum for available information.
    Edited by: kishan P on Oct 19, 2010 4:50 PM

    Hi,
    Please check below thread;
    Extract from ALV List
    Regards
    Jana

  • Improving the performance of Crystal Reports for Eclipse 2.0

    Hi,
    I am having some performance issues with displaying reports where it can take upto 30 seconds per user for each new session for the report to display. If we run this directly from the client (through Crystal 2008) it takes about 2 seconds.
    The product only has 4 different rpt files but are constantly viewed by the clients (although with diffferent parameters). The users tend to come onto the system browse a couple of reports and log-off. They will do this about 3 - 5 x a day.
    1) Can you cache the reports at an application level (rather than the session) (and is it recommended)
    2) Create a separate web-service just hosting the Crystal Reports
    3) Other mechanisms of calling the report (currently using addDiscreteParameterValue, replaceConnection, Logon [this replaceConnection and Logon is done for the master and every subreport], then using processHttpRequest
    Anyone got any advice , recommendations or pearls of wisdom?
    Probably have max 15 concurrent users which process these 4 reports.
    Kind regards
    Matt.

    CR4E 2.0 currently uses 5 CPLs - 5 concurrent process license, which means it services up to five concurrent report requests.  This isn't per-session, per-report, or per-user, but per-request (open report, next page, export).
    So having 15 simultaneous users may lead to some requests being queued till a license is free.
    For a more scalable solution, the recommendation is to go with a server-client solution like Crystal Reports Server Embedded or BusinessObjects Enterprise.
    But to tune your CR4E app to see how much you'll be able to service, what I recommend is turning on Log4J logging to see where the performance is going.
    Going from 2 sec to 30 sec between CR Designer (binary app) to CRJ (pure Java app) isn't out of performance expectations, but there may be ways to tune it.
    For example, if you're doing replaceConnection or setTableLocation, you may just want to do it once to the rpt file during deployment, so you'd not need to change the connection info every time the report is run.
    Saving to application context isn't something that CRJ is designed for - it's designed to have the ReportSource per-Session.
    Sincerely,
    Ted Ueda

  • Urgent: regarding the increasing the performance of report

    Hi,
    I had a report which is displaying the correct data but i execute on PRD Server,it gets Request Time Out.So i want to increase the performance of it.Plzz help me out in doing this.
    REPORT  ZWIP_STOCK NO STANDARD PAGE HEADING LINE-SIZE 150.
    TABLES: AFPO, AFRU, MARA, MAKT.
    DATA: BEGIN OF ITAB OCCURS 0,
          AUFNR LIKE AFPO-AUFNR,
          MATNR LIKE AFPO-MATNR,
          LGORT LIKE AFPO-LGORT,
          MEINS LIKE MARA-MEINS,
          NTGEW LIKE MARA-NTGEW,
          MTART LIKE MARA-MTART,
          STOCK TYPE P LENGTH 10 DECIMALS 3,
          END OF ITAB.
    DATA : ITAB2 LIKE ITAB OCCURS 0 WITH HEADER LINE.
    DATA : DESC LIKE MAKT-MAKTX.
    SELECT-OPTIONS : MAT_TYPE FOR MARA-MTART.
    SELECT-OPTIONS : P_MATNR FOR AFPO-MATNR.
    DATA : V_MINOPR LIKE AFRU-VORNR,
           V_MAXOPR LIKE AFRU-VORNR,
           V_QTYMIN LIKE AFRU-GMNGA,
           V_QTYMAX LIKE AFRU-GMNGA,
           V_QTY TYPE P LENGTH 10 DECIMALS 3.
            SELECT AAUFNR AMATNR ALGORT BMEINS BNTGEW BMTART FROM AFPO AS A
              INNER JOIN MARA AS B ON AMATNR = BMATNR
                INTO TABLE ITAB WHERE ELIKZ <> 'X' AND MTART IN MAT_TYPE AND A~MATNR IN P_MATNR.
        ITAB2[] = ITAB[].
        SORT ITAB2 BY MATNR MEINS MTART NTGEW.
        DELETE ADJACENT DUPLICATES FROM ITAB2 COMPARING MATNR MEINS MTART NTGEW.
       LOOP AT ITAB2.
        V_QTY = 0.
          LOOP AT ITAB WHERE MATNR = ITAB2-MATNR.
            SELECT MIN( VORNR ) INTO V_MINOPR FROM AFRU WHERE AUFNR = ITAB-AUFNR.
            SELECT MAX( VORNR ) INTO V_MAXOPR FROM AFRU WHERE AUFNR = ITAB-AUFNR.
            SELECT SUM( GMNGA ) INTO V_QTYMIN FROM AFRU WHERE AUFNR = ITAB-AUFNR AND VORNR =  V_MINOPR.
            SELECT SUM( GMNGA ) INTO V_QTYMAX FROM AFRU WHERE AUFNR = ITAB-AUFNR AND VORNR =  V_MAXOPR.
            V_QTY = V_QTY + V_QTYMIN - V_QTYMAX.
          ENDLOOP.
          ITAB2-STOCK = V_QTY.
          MODIFY ITAB2.
        ENDLOOP.
        LOOP AT ITAB2.
              WRITE:/ ITAB2-MATNR,ITAB2-STOCK.
        ENDLOOP.

    Instead of code from
    itab2[] = itab[] till last endloop try code given below
    data : begin of minopr occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of minopr.
    data : begin of maxopr occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of maxopr.
    data : begin of qtymin occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of qtymin.
    data : begin of qtymax occurs 0,
           aufnr type afru-aurnr,
           vornr type afru-vornr,
           end of qtymax.
    select aurnr vornr into table minopr from afru for all entries in itab where aurnr = itab-aufnr
    maxopr[] = minopr[].
    sort minopr by aufnr vornr ascending.
    sort maxopr by aufnr vornr descending.
    delete adjacent duplicates from minopr comparing aufnr.
    delete adjacent duplicates from maxopr comparing aufnr.
    SELECT aufnr vornr GMNGA INTO TABLE QTYMIN FROM AFRU for all entries in minopr WHERE AUFNR = minopr-AUFNR AND VORNR = MINOPR-vornr.
    SELECT aufnr vornr GMNGA INTO TABLE QTYMAX FROM AFRU for all entries in maxopr WHERE AUFNR = maxopr-AUFNR AND VORNR = maxopr-vornr.
    sort qtymin by aufnr.
    sort qtymax by aufnr
    sort itab by matnr MEINS MTART NTGEW.
    LOOP AT ITAB.
    v_minopr = 0.
    v_maxopr = 0.
    read table qtymin with key aufnr = itab-aufnr binary search.
    if sy-subrc = 0.
    loop at qtymin from sy-tabix.
    if qtymin-aufnr = itab-aufnr.
    V_MINOPR = V_MINOPR + itab-gmnga.
    else.
    exit.
    endif.
    endloop.
    endif.
    read table qtymax with key aufnr = itab-aufnr binary search.
    if sy-subrc = 0.
    loop at qtymax from sy-tabix.
    if qtymax-aufnr = itab-aufnr.
    V_MaxOPR = V_MaxOPR + itab-gmnga.
    else.
    exit.
    endif.
    endloop.
    endif.
    V_QTY = V_QTY + V_QTYMIN - V_QTYMAX.
    At new itab-matnr.
    if sy-tabix = 1.
    continue.
    endif.
    itab2 = itab.
    itab2-stock = v_qty.
    append itab2.
    V_QTY = 0.
    endat.
    ENDLOOP.
    itab2 = itab.
    itab2-stock = v_qty.
    append itab2.
    LOOP AT ITAB2.
    WRITE:/ ITAB2-MATNR,ITAB2-STOCK.
    ENDLOOP.

Maybe you are looking for

  • Router 877 changing Ios

    hi! i dont know if it's the correct forum but i got a simple question that i would like to be answered. Recently i brought a 877 adsl router with the advance security ios. I thought this ios supported 802.1q, but i don't think so. So i upgraded to ad

  • Problem passing texts into sap-script

    Dear Experts, I have a requirement, where I have to pass some text-lines from my selection-screen of the driver-program to the sap-script,i.e. whatever I write in those text fields that should be displayed(printed) on the specified place of my script

  • Flash Vars is not working when we accessing from other class files

    Hi all, I'm currently developing a flex application where i need to pass the data from the flash vars to the other class files instead of the main actionscript class file. Does any body know how i should go about doing that?? you can see this below c

  • Errors while running MAU application in a PDA

    Hi All, We have customized ZMAU and after checking the u2018Add JSP as complied classesu2019 u2013 We are deploying that application on a PDA with OS = WM 6.0 Crème = CrEme329_ARM_CE42_PPC.exe DB2E 9.22 The application is successfully deployed. When

  • Photoshop does not remember my preformance settings.

    Hello I have Win XP and using Photoshop CS4,  everytime I make a change under  EDIT / PREFERENCE / PREFORMANCE/  and set my desired settings, when ever I restart wwindows and check those prefrences they go back to the default mode.  But my work statt