How to optimize GUI_DOWNLOAD function I am using...

Hi,
I have got 54 internal tables populated at the end of the report.
I am using GUI_DOWNLOAD Function to download the data in flat files each corresponding to one internal table.
Now in GUI_DOWNLOAD Function, I know I have to mention name of file and name of table as follows:
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
  BIN_FILESIZE                    =
    FILENAME                        = filenam
    WRITE_FIELD_SEPARATOR           = ' '
  FILETYPE                        = 'ASC'
  APPEND                          = ' '
  TABLES
    DATA_TAB                        = ITAB1.
Now I do not want to code GUI_DOWNLOAD 54 times since there are 54 internal tables and I have to mention the name of table always in DAT_TAB parameter.
How can I achieve this ?

Hi,
Probably have three parameters for the subroutine..
perform download tables PTRVTGPER
<b>* Folder - File path</b>
                          using 'Concatenate '
bma-files-06\redirectedfolders$\tushar.shah\Desktop\TREATY_TABLE_DATA\'
<b>* File name</b>                                  
                                   'PTRVTGPER.txt'.
FORM download tables itab
                         using  folder
                                   fname.
IF NOT ITAB[] IS INITIAL.
<b>  Concatenate folder fname INTO fname.</b>
Call the FM GUI_DOWNLOAD..
ENDIF.
ENDFORM.
Is this what you want??
Thanks,
Naren

Similar Messages

  • How to identify Which function modules are used in the planning area?

    Hi all,
    there are couple of function module derviation is used to derive the calendar year, month, fiscal period etc.
    But how to identify which function module is used in which planning area?
    I cant find out from the where used list from function modules?
    Thanks
    pooja

    Hi Pooja,
    Go to characteristic relationship tab,click on detail icon on extreme left of the derivation,there you will get the name and the details of function module used for derivation.
    Regards,
    Indu

  • How to create search function (af:query) using method in java

    hi All..:)
    i got problem with search custom (af:query), how to create search function/ af:query using method in java class?
    anyone help me....
    thx
    agungdmt

    Hi,
    download the ADF Faces component demo sources from here: http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html It also has an example for creating a custom af:query model
    Frank

  • How to implement the function "Slow Play" using MPMoviePlayerController?

    Does anybody have idea to implement the function "Slow Play" using MPMoviePlayerController or some other indirect solutions? Thanks. Kevin.

    You can use the changeSelection(...) method to change the cell with focus.

  • How can I call functions in packages using flash builder?

    a new guy in flash developnet, I need to find out a way to import multiple packages into frames and call functions. I know how to import packages, but an error occurs error 1120 : access of undefined property. How can ı solve them?
    Is there any easy way to add Mediapomise object to the stage form the package? "addChild(loader);" does not work? or ı do not know whether it works or not, ı could not see the photo that ı took from camerauı object in android.
    thank you 

    I need to find out a way to import multiple packages into frames
    Usually, no matter where you use any classes of any package, the imports happen always in the beginning.
    If you have a specific problem with flashbuilder you should post in this forum:
    http://forums.adobe.com/community/flash_builder

  • How to replace a function/procedure/trigger using datapump

    Hi All and thanks for any help you can provide!
    My goal is to export our production schema -- table data, function and procedure definitions, triggers and sequences -- and import all of that into the QA schema.
    Here is the expdp command from production
    expdp / as sysdba
    DIRECTORY=EXPORT_DATA
    SCHEMAS=CP_APP
    DUMPFILE=cp_app_01.dmp
    LOGFILE=cp_app_01.log
    I then move the file from the production server to the qa server and use this command to import it.
    impdp / as sysdba
    DIRECTORY=IMPORT_DATA
    CONTENT=ALL
    TRANSFORM=OID:N
    DUMPFILE=cp_app_01.dmp
    TABLE_EXISTS_ACTION=REPLACE
    REMAP_SCHEMA=CP_APP:CP_QA
    The problem is that triggers don't get built properly. Here's one error
    ORA-39083: Object type TRIGGER failed to create with error:
    ORA-00942: table or view does not exist
    Failing sql is:
    CREATE TRIGGER "CP_QA"."PLAYER_LOG_EMAIL_INS_TRIGGER"
    before insert on cp_app.player_log_email
    for each row
    begin
    -- auto-increment --
    select seq_player_log_email.nextval into :new.log_id from dual;
    end;
    The REMAP_SCHEMA option only changes the schema of the trigger itself, but it did not affect the schema of the referenced table.
    Any suggestions on how to get PL/SQL objects rebuilt?
    Thanks for any help.
    -- Chris Curzon

    Hi,
    this is a known issue and is also desribed in the manuals. There is a note on Oracle Support: "IMPDP Reports ORA-942 and ORA-39083 During Importing Schema Objects [ID 750783.1]". It describes a solution, in the simplest way:
    Make an sql dump of the import, add the last parameter:
    impdp / as sysdba
    DIRECTORY=IMPORT_DATA
    CONTENT=ALL
    TRANSFORM=OID:N
    DUMPFILE=cp_app_01.dmp
    TABLE_EXISTS_ACTION=REPLACE
    REMAP_SCHEMA=CP_APP:CP_QA
    sqlfile=script.sqlNow you have the file script.sql in which you find your trigger code. Adjust in this file the schema names and run the code against the database.
    Another option would be to adjust the trigger code in the source database to not reference the schema.
    Herald ten Dam
    http://htendam.wordpress.com

  • How to Optimize Quality of DVD Video using Premier 6.5

    I am looking for some advice how to get the best video quality on the MPEG-2 DVDs I create. I capture my MiniDV video into Adobe Premiere 6.5 in AVI format using a D-Link (at least 2 years old) 1394 fireware card. I set my default projects settings to Microsoft DV Compressor, Frame Size 720 x 480, 16x9 aspect, 29.97 fps, depth millions, quality 100%. Once my editing is done, I export using Adobe Premier 6.5 MPEG encoding (I have the latest 1.3 update). I typically pick the DVD 16x9 High Bit Rate setting. My DVDs look OK. The Canon ZR30 MC MiniDV Camcorder I have been using recently died; it was about 5 years old. I just replaced it with a 3CCD MiniDV camcorder from Panasonic (PV-GS320) that should help in terms of the source video quality. I am not ready for HD. Too expensive to upgrade my PC and disk subsystem in particular and my preference will be an HD camcorder with no spinning hard drive or moving tapes. We are very close to this. I imagine many folks are in my boat in this in-between stage where we get to watch HD on our LCD TVs but must work in the stone ages with our DVD video editing software and equipment. I would appreciate any suggestions how to get better performance either by upgrading to newer software from Adobe (provided this will really help), buying a better capture card, changing my settings in Premier. Any suggestions would be much appreciated.

    >typically pick the DVD 16x9 High Bit Rate setting
    I will qualify this by saying that I (used to) use Premiere 6.02 and the MPEG output added by a Pinnacle Dv500 card's software, so I don't have any direct experience with Premiere 6.5 and the MainConcept coding engine
    But, I am
    switching over to Premiere Pro
    which also uses MainConcept, so I have some experience with settings
    For a video up to one hour, your current settings are probably the best you can do
    For over one hour, you should look at 2-pass VBR settings
    In Pro, there is a place to adjust the 3 individual components, and I used a MINimum bitrate of 3 and MAXimum bitrate of 7 (see below) and would then play with the TARGET bitrate to have the highest setting where the software would say there was enough space (on a DVD) to export the project
    That "play with" consisted of adjusting the target bitrate a tenth at a time (6.5 6.4 6.3 etc) until the status message would change from insufficient space to READY... at which point I knew I had the best quality the software could give
    If you want to try a different product, visit Vendor site CCE Basic
    MPEG coding program
    Download site for
    CCE Basic Demo or Purchase
    And, some general information about burning DVD's
    To
    Burn Error Proof DVDs (Well, close to error proof!)
    Use the SLOWEST possible burn option your burner will allow in Encore, since it is much better to take a bit more time burning the disc than it is to burn "fast" and have a disc that won't play
    Set the VIDEO portion of the transcoding options to a Maximum of 7,000 so your burned disc will have a better chance at playing in desktop players (which support burned discs, if at all, only as an "after thought" of the DVD specification)
    Use AC3 or PCM audio transcode settings for best player compatibility (some discussion of MPEG audio not being supported by all players, especially for NTSC discs)
    Buy and use Taiyo Yuden (or Verbatim?) brand blank discs
    Read this
    ENTIRE message
    Concerning Replication
    And this one
    About Authoring and Playing a DVD
    Discussion of
    Peak Bitrate
    Here is one
    Bit Budget Calculator

  • How to run planing function automatically by using planing folder (UPSPL)

    Hi All,
    We have 2 planing packges one for local currency and one for global currency  in the planing folder .We have exit function to upload the file from work ststion  for both local and global currency packages .
    Now we have Requiremnt to distribute or calaculat the remaning keyfigure values based on planned keyfigure in the planing package .We created one more exit function to allocate or calculate the amounts for remaning keyfgire.
    Everything works fine.But issue is how to execute the planing function 2 after saving the data in planing folder ?. is there any possiblity.Attribtues options of Execute when saving was disbaled .So i have option to choose execute function before layout change .But when i choose this option data is getting ovewrtied with old values. because last daya in the planing  was executing before layout change or before selecting file.
    Can anyone let me know how to solve this,
    Thanks in advance,

    Yes that right.but when i place these functions  in the layout section and give attribute as run before layout change.
    While writing the data to cube its also picking up the previous plan values from the layout with new values.
    I have another function also which will upload the file from desktop to layout .While i choose this file planing function running autoamtiaclly in the background becuase of settng we made (run before layout change).I
    I think this time planing function  executing 2 times .One is when i choose the file into the layout and at the time of save the data.
    This way old plan and new plan data getting into the cube and getting enermous results.
    How can i achieve this.If i create global planing sequence how can i exeute that while user save the data from planing folder ?.Can you explain the possble senaios step by step.

  • To find Function Module is used for How many times

    Hi Gurus.
    How to find a Function module is used for how many times since it is created.. we went through the Tcode STAT , ST03, STAD, STATTRACE but in ST03 we can find it for Program but we could not find it for Function module , So can any one please suggest us . we are using ECC 6.0 version.
    Thanks and Regards,
    Chaitanya.

    Hi Chaithu,
    Go to SE37,enter your function module, click on where used list button on the application bar.
    All the program used your function module used is displayed.
    Regards,
    Venkat.

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

  • How to get field separator in flat file using GUI_DOWNLOAD function

    hi,
    how to get field separator in flat file using GUI_DOWNLOAD function.
                                    thanking you.

    Hi,
      Use WRITE_FIELD_SEPARATOR = 'X'.
      Check this sample code
    REPORT  z_file_download.
    DATA: w_name(90) TYPE c.
    DATA:
      BEGIN OF fs_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        price    LIKE sflight-price,
        currency LIKE sflight-currency,
      END OF fs_flight.
    DATA:
      BEGIN OF fs_head,
        carrid(10) TYPE c,
        connid(10) TYPE c,
        fldate(10) TYPE c,
        price(10) TYPE c,
        curr(10) TYPE c,
      END OF fs_head.
    DATA:
      t_head LIKE
       TABLE OF
             fs_head.
    DATA:
      t_flight LIKE
         TABLE OF
               fs_flight.
    fs_head-carrid = 'CARRID'.
    fs_head-connid = 'CONNID'.
    fs_head-fldate = 'FLDATE'.
    fs_head-price  = 'PRICE'.
    fs_head-curr   = 'CURRENCY'.
    APPEND fs_head TO t_head.
    SELECT-OPTIONS:
      s_carrid FOR fs_flight-carrid.
    START-OF-SELECTION.
      SELECT carrid
             connid
             fldate
             price
             currency
        FROM sflight
        INTO TABLE t_flight
       WHERE carrid IN s_carrid.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        filename                      = 'D:\flight.xls'
       FILETYPE                      = 'ASC'
    *   APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    *   CONFIRM_OVERWRITE             = ' '
    *   NO_AUTH_CHECK                 = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   WRITE_BOM                     = ' '
    * IMPORTING
    *   FILELENGTH                    =
      tables
        data_tab                      = t_head
    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
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'D:\flight.xls'
          filetype                = 'ASC'
          append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_flight
        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.
      IF sy-subrc EQ 0.
        MESSAGE 'Download successful' TYPE 'I'.
      ENDIF.
      IF sy-subrc <> 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • Using GUI_DOWNLOAD Function module in Batch

    Hi All,
    I use the subject function module to load the data into a .xls file. I find no error while I run my program directly. But when I run it in Background it throws an unknown_error. Tried to debug, while in background (by introducing a infinite loop and releasing from the loop with the exit condition). I couldn't get into the function module to debug.
    Needed information on how else can I find what the error is and is there any other function module (other than ws_download and gui_download) which I could use and find no errors while running in background.
    Thanks,
    Aaron.
    This is what I am doing:
    OPEN DATASET p_file FOR OUTPUT IN TEXT MODE
    ENCODING DEFAULT.
    if sy-subrc = 0.
    Loop at te070 into se070.
    Transfer se070 to p_file.
    Endloop.
    endif.
    close dataset p_file.
    This creates a file in the app server in Batch and I will have to run a program online to dowload the contents from the server. My requirement is that I need to download the contents in Batch to my local file. Is this possible by any means? (Can we create a windows executable file (.EXE) and use it in a windows batch file (.BAT)?)
    Message was edited by: Aaron Anthony

    Hi Gopi,
    This is what I am doing:
    OPEN DATASET p_file FOR OUTPUT IN TEXT MODE
                                       ENCODING DEFAULT.
    if sy-subrc = 0.
      Loop at te070 into se070.
        Transfer se070 to p_file.
      Endloop.
    endif.
    close dataset p_file.
    This creates a file in the app server in Batch and I will have to run a program online to dowload the contents from the server. My requirement is that I need to download the contents in Batch to my local file. Is this possible by any means? (Can we create a windows executable file?)
    Thanks for your help.

  • How to optimize this sql by writing MINUS function.

    Hi all,
    how to optimize the sql by writing MINUS function.
    these are my tables
    1. CREATE TABLE POSTPAID
    RECORD VARCHAR2(2000 BYTE),
    FLAG NUMBER
    Record format:
    Mobile no in 1:10 of that length
    2. CREATE TABLE SUBSCRIBER
    PHONE_NO VARCHAR2(10 BYTE)
    My requirement is following sql need write using ‘minus’ as this one is very slow
    select record record from POSTPAID where substr(record,9,10) NOT in (select PHONE_NO from SUBSCRIBER)
    Thanks

    Why are you very particular about using "MINUS". You can optimize the sql by using "NOT EXISTS" instead of "NOT IN" as below:
    SELECT RECORD FROM POSTPAID A WHERE NOT EXISTS (SELECT 1 FROM SUBSCRIBER B WHERE SUBSTR(A.RECORD,9,10) = B.PHONE_NO)

  • How to optimize a MDX aggregation functions containing "Exists"?

    I have the following calculated measure:
    sum(([D Player].[Player Name].[All],
    exists([D Match].[Match Id].children,([D Player].[Player Name].currentmember,[Measures].[In Time]),"F Player In Match Stat" ))
    ,[Measures].[Goals])
    Analyzing this calculated measure (the one with "nonempty") in MDX Studio shows "Function
    'Exists' was used inside aggregation function - this disables block computation mode".
    Mosha Pasumansky spoke about this in one of his posts titled "Optimizing
    MDX aggregation functions" where he explains how to optimize MDX aggregation functions containing "Filter",
    "NonEmpty", and "Union", but he said he didn't have time to write about Exists, CrossJoin, Descendants, or EXISTING (he posted this in Oct. 2008 and the busy man didn't have time since that date :P )... so anyone knows an article that continues
    on what Mosha miss or forgot? how to optimize a MDX aggregation function containing "Exists"? what can I do to achieve the same as this calculated measure but in block mode not cell-by-cell mode ?

    Sorry for the late replay.
    I didn't check if your last proposed solution is faster or not, but I'm sorry to say that it gave the wrong result, look at this:
    Player Name
    Players Team
    Goals Player Scored with Team
    A
    Team's Goals in Player's Played Matches
    Lionel Messi
    Argentina
    28
    28
    110
    Lionel Messi
    Barcelona
    341
    330
    978
    The correct result should be like the green column. The last proposed solution in the red column.
    If you look at the query in my first post you will find that the intention is to find the total number of goals a team scored in all matches a player participated in. So in the above example Messi scored 28 goals for Argentina (before the last world cup:)
    )  when the whole Argentinian team scored 110 goals (including Messi's goals) in those matches that Messi played even one minute in.

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

Maybe you are looking for