Create text file (ASCII), tab separated and load in sap (transaction al11)

hi..
i need to create a text file (ASCII), tab separated in sap which can be viewed in transaction AL11.
thank you.

Hi kailashl,
Do intend to create a tab delimited file through program. or is it that you wish to diretly place the file on the application server.
PS: if you wish to place the file which you have on the application server from presentation you use the tcode CG3Z, you need to give the source file path on the front end and target path on the application.
If you wish to write the file onto the app server using program that you can do using dataset. and for tab delimited u can use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
PS: Award points ONLY if the solution was useful to you.

Similar Messages

  • Read text file (ASCII), tab separated

    how to read contens of text file (ASCII), tab separated in a report.

    hi kailash,
                    To read contents of text files (Ascii) use GUI_UPLOAD function.
    GUI_UPLOAD - this FM will Upload the Data of a text File to ITAB.
    Please see below the code for it.It is very simple ,plz go through it.
    In the code when u call the function GUI_UPLOAD just mention the file type as 'ASCII' as done below.
    pls do reward if useful.
    Thanks.
    types: begin of ttab,
           f1(25) type c,
           f2(10) type c,
           f3(10) type c,
           end of ttab.
    data: itab type table of ttab with header line.
    data: file_str type string.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          static    = 'X'
        CHANGING
          file_name = p_file.
    start-of-selection.
      file_str = p_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = file_str
        FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          DATA_TAB                      = itab
       EXCEPTIONS
         FILE_OPEN_ERROR               = 1
         FILE_READ_ERROR               = 2
         NO_BATCH                      = 3
         GUI_REFUSE_FILETRANSFER       = 4
         INVALID_TYPE                  = 5
         NO_AUTHORITY                  = 6
         UNKNOWN_ERROR                 = 7
         BAD_DATA_FORMAT               = 8
         HEADER_NOT_ALLOWED            = 9
         SEPARATOR_NOT_ALLOWED         = 10
         HEADER_TOO_LONG               = 11
         UNKNOWN_DP_ERROR              = 12
         ACCESS_DENIED                 = 13
         DP_OUT_OF_MEMORY              = 14
         DISK_FULL                     = 15
         DP_TIMEOUT                    = 16
         OTHERS                        = 17.
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
      Loop at itab.
        write : / itab-f1,itab-f2,itab-f3.
      endloop.

  • Output file as a text file with tab delimited and fixed length fields

    Hi all,
    I have developed a custom report which outputs an excel file on the user desktop who executes that report.Now i need to create an additional (second) excel file with almost the same data as the first file.
    Im using the FM GUI_DOWNLOAD to create the file.i need have the 2nd file as txt file(seperated by space/tab delimited) and also i want the fields to have fixed length.For this format of the file,what parameters do I need to pass to the FM ?
    BR,
    SRM Tech.

    Thanks for the prompt reply.
    Also in the sel screen,Im entering the path where  the o/p file needs to be downloadede.g. C:/Output_folder/Output.xls...Now if I need a text file,do I need to give the fielname as C:/Output_folder/Output.txt.?

  • Down load or create text file using bapi

    hi friends,
    My requirement is to create text file or down load text file in presentation server when the bapi runs in which the ip address is defined at the interface.
    plz sujjest me,
    points will be rewarded .
    prasad.

    Hi,
    The FM 'GUI_DOWNLOAD' should use the network path like '
    10.10.10.10\shared_file\PO.txt'. Pass this value to the file path parameter and execute the program.
    Thanks..
    Preetham S

  • Text created in Premiere showing other text files in the timeline and exports.

    Hi,
    I'm creating slates with text generated in Premiere. For each new slate I am duplicating a text layer, Option + Dragging the duplicate file over the text I'd like to replace, then opening the new text layer in the text editor and updating the information.
    Things seem fine at first and then randomly text layers in the timeline will show text from other files in the timeline. If I open the text file up in the text editor I see the correct info but not in the timeline.
    The only fix I have found is to delete render files, move the text layer around in the timeline, quit and re-open. But still, sometimes when I export, the export preview window will show the wrong text and when I export the file I create shows the wrong text as well.
    It seems like Premiere is getting confused by multiple text files in the timeline and is pointing to the wrong cache files.
    Thoughts would be a huge help!

    Thanks for the tip Kevin. Anything I can do to avoid this in the future?
    I've had this happen on a number of projects. My media and project files are on a SAN, cache and previews are local.
    Thanks,
    Mike Brown
    P: (401) 743-7452

  • Creating text file from table

    Hi all
    I have a table LFA1 with headers LIFNR, MANDT, NAME1, NAME2, ...., . That table contains data and I need to create text file that collects all headers with all data, where each field is separated by TAB.
    thanks for your help.

    Here is program for KNA1.
    *"Table declarations...................................................
    tables:
      kna1.                              " General Data in Customer Master
    *"Selection screen elements............................................
    select-options:
      s_kunnr for kna1-kunnr.            " Customer Number 1
    *" Type declarations...................................................
    types:
      begin of type_s_customer_details,
        name        like kna1-kunnr,
        address     like kna1-adrnr,
        title       like kna1-anred,
        createdon   like kna1-erdat,
        createdby   like kna1-ernam,
      end of type_s_customer_details.
    Internal table to hold General Data in Customer Master data         *
    data:
      t_customer_details type table
                           of type_s_customer_details
                         with header line.
                          START-OF-SELECTION EVENT                      *
    start-of-selection.
      perform select.
    *&      Form  select
    This subroutine selects information from database and exports the    *
    data into presentation layer                                         *
    There are no interface parameters to be passed to this subroutine.  *
    form select .
      select kunnr
              adrnr
              anred
              erdat
              ernam
         into table t_customer_details
         from kna1
        where kunnr in s_kunnr.
      if sy-subrc ne 0.
        write : / 'DATABASE SELECTION FAILED'.
      else.
        call function 'GUI_DOWNLOAD'
          exporting
      BIN_FILESIZE                    =
           filename                        = 'd:\customer_details.txt'
           filetype                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      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                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
    IMPORTING
      FILELENGTH                      =
          tables
            data_tab                        = t_customer_details
      FIELDNAMES                      =
         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.
          write : / 'Upload Failed' , sy-subrc.
        else.
          write : / 'Upload Completed'.
        endif.
      endif.
    endform.                               " SELECT

  • Hi,I want  ABAP program to create an file of this data and to upload in app

    Hi Sir/Madam,
               I want  ABAP program to create an file of this data and to upload in application server.this is urgent requirement.plz reply soon. i'll b thankful to u.
    Regards,
    Vishali

    Hi ,
    Use this abap code .this will create a file in AL11 that you can use .
    data: d_msg_text(50),
          v_string(20000) type c,
          v_filename type rlgrap-filename,
    ******Create a file on app server
    concatenate '<directory name present in AL11 case sensitive>' ' filename.CSV' into v_filename .
    condense v_filename no-gaps .
    open dataset v_filename for output in text mode
    encoding default message d_msg_text.
    if sy-subrc ne 0.
      write: 'File cannot be opened. Reason:', d_msg_text.
      exit.
    endif.
    ****Header for file
    concatenate 'information you want to write in file like header etc ' into v_string separated by '|'.
    transfer v_string to v_filename.
    *****Write data into file by looping an internal table
    loop at  <internal table > assigning <work area>.
      concatenate      <work area>-field name1   <work area>-field name2    into v_string separated by '|' .
      transfer v_string to v_filename.
    endloop.
    close dataset v_filename.
    Hope this will solve your purpose.
    Regards,
    Jaya Tiwari

  • Problem in creating text file from report file

    Hello Everybody...
    I have problem in creating text file.
    I had set System Parameter as below
    DESTYPE : File
    MODE : Character
    DESNAME : gayu.txt
    And ruler setting
    Units : Character Cells
    Character Cell Size : Horiziontal = 7
    Vertiacle =12
    GridSpacing : 1
    no of snap points per grid spacing : 1
    but when i run report it will give error
    "REP_1219 M_2 or R_2 has no size -- length or width zero"
    so is there any solution of that
    or another way to convert report into text file?....

    Hi Folks,
    Please don't go after that Error as its a very deceptive one. Please don't go for altering your design Or changing the size of items in your layout.
    Similar errors I have come across in reports. I think its due to file transfer type. You might have transferred the file in Binary and your File Mode I am seeing it as CHAR.
    This normally happens while making the Report Format as "Text". Either you change that format which I think is possible in your case as your basic requirement is making a report output of CHAR type.
    Please check for this error in Metalink and proceed accordingly. I could fix similar errors when I changed Format type to PDF(from text).
    Regards
    Shibu

  • How to upload a text file to a webpage and process it using a Java app?

    Apologies if the question is off topic.
    I would like a user to upload a text file to a webpage and have a pre-existing Java application I created process the text file and return the results to the user. The Java application is fairly memory intensive. It is expected that multiple clients will be uploading at the same time. What is the simplest or most efficient method to achieve this?
    Thank you

    This might help you to get started: http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml
    As done in this example, processing the uploaded file in the JSP itself may not be a good idea though. You're better off handling it in your controller servlet or action class.

  • How to create text file of report in 10g

    Hi,
    I want to create text file of report in character mode and print that text file, without view it on screen.
    i want to do this in Oracle developer 10g and run this report on web.
    what coading i required to do for this pls. help me.

    Hello,
    Execute the Reports with the parameters MODE=CHARACTER DESTYPE=PRINTER DESNAME=<printer name>
    Regards

  • Uploading into database table from text file using tab (GUI_UPLOAD)

    i have small doubt
    i have 3 fiels in text file using tab as separator
    i need to update into database table 'ZABPSP_01'
    from 's.txt' located in local disk.
    My code is below.
    Please let me know the correction.
    Awaiting for ur response.
    Thanks in advance
    REPORT  ZABPSPPRG_02.
    TABLES: LFA1,MARA,KNA1,ZABPSP_01.
    DATA:  begin of itab occurs 0,
    IKUNNR type zabpsp_01-kunnr,
    IMATNR type zabpsp_01-matnr,
    IADRNR type zabpsp_01-adrnr.
    DATA:END OF ITAB.
    DATA: FILENAME1 TYPE STRING.
    FILENAME1 = 'C:/s.txt'.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILENAME1
      FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                     = itab.
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF sy-subrc EQ 0.
    zabpsp_01-kunnr = ITAB-IKUNNR.
    zabpsp_01-matnr = ITAB-IMATNR.
    zabpsp_01-adrnr = ITAB-IADRNR.
    WRITE : / ' UPLOAD SUCCESS ' .
    ENDIF.
    \[subject changed, don't write everything in upper case!\]
    Edited by: Jan Stallkamp on Aug 6, 2008 2:39 PM

    Hi,
    After upload modify the code like below. Also change the file name as some one suggested already. If u are still facing problems then check in debug mode what is happening after FM call.
    CALL GUI_UPLOAD FM.
    IF sy-subrc EQ 0
    IF NOT itab[] IS INITIAL.
    MODIFY ZABPSP_01 FROM TABLE itab.
    WRITE : / ' UPLOAD SUCCESS ' .
    ELSE.
    WRITE 'No data in file'.
    ENDIF.
    ELSE.
    WRITE 'Upload failure'.
    ENDIF.
    Thanks,
    Vinod.

  • Create text file in Database Trigger

    Hello,
    How to create text file in the database trigger. I am working on Row level trigger which has select statement if statement fails I have to create text file and insert record in text file. I tried to use file1 TEXT_IO.FILE_TYPE package it does not works.
    Thanks,
    Atif

    TEXT_IO is not available on the database. It is only available if you are doing client-side PL/SQL development in Oracle Forms. On the database side, you can use the UTL_FILE package.
    Since writing to a file is not transactional, however, and because Oracle may have to call a trigger multiple times to ensure write consistency:
    http://tkyte.blogspot.com/2005/09/part-iii-why-is-restart-important-to.html
    http://tkyte.blogspot.com/2005/08/part-ii-seeing-restart.html
    http://tkyte.blogspot.com/2005/08/something-different-part-i-of-iii.html
    you aregenerally better off not writing to a file in a trigger. The better answer is generally to use Oracle Asynchronous Queues to send a message to another process that actually writes the file. That way, if the transaction rolls back, nothing gets written to the file.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?

    No

  • How do I find out the exact path of each and every file that LabVIEW finds and loads into memory for a given top level vi?

    How do I find out the exact path of each and every file that LabVIEW finds and loads into memory for a given top level vi? There is probably a trivial, easy way to get this info, but I have not yet found it!  Thanks..

    Or if you want to grab all the paths programatically, try the attached VI.
    Open the top level that you want all the paths from and close all others, then open the
    attached and run it. It will return an array of all the VIs that the VI
    in question uses, including vi.lib VIs. You can filter these as well if
    you like.
    Ed
    Message Edited by Ed Dickens on 08-01-2005 07:01 PM
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    Get all paths.vi ‏29 KB

  • Creating a file that has drag and drop feature

    Hi,
    I'm working on a memory experiment and I want to create a file with a drag and drop feature.  I set an image as layer 1, and several images as layer 2. I would like to create a file where people can drag and drop on of the images from layer two onto a slot in layer one.  Ideally I would like it to remain stable if the place an image in the slot (meaning if they try to place one of the images from layer 2 into layer 1, I want it to allign perfectly).
    Help is greatly appreciated.
    Thanks.

    Check if using the Smart Guides snapping is something that could be useful for this. If the size of the objects are exactly the same the snapping is relatively easily when trying to put one object on the place of another. If the sizes are not the same then the center point indicator should be used as a target which require a little bit more effort. However enabling the Smart Guides is not a file feature, the user has to turn it on/off in Illustrator affecting all open documents.

Maybe you are looking for

  • How do I sync calendars on iPhone with my Mac

    I'm trying to sync my calendar info from my iPhone 5 (OS 7.0.4) with my Mac (OS 10.9) Calendar application (7.0). I was syncing through iTunes, but I'm told I now need to use iCloud. How is this done? All of my up-to-date info is on my iPhone, so I w

  • Updating LIKP-ANZPK when goods receiving one line item of Inbound Delivery

    I am Goods Receipting a single inbound delivery line item via function module WS_DELIVERY_UPDATE. Once the line item, and associated Handling Unit, are received, I would like LIKP-ANZPK (number of packages) to be updated with a new total of HU's that

  • After updating Airport software, Macbook will not boot

    I see others have updated with the new Airport software without incident, but not me. I just ran software update to install the Airport update (hoping it would cure the problem I've had -- and other users as well -- with the connection dropping every

  • Map ID String Length Limit?

    Any one know if there is a maximum length for valid map IDs in WinHelp? A few of my long IDs ( > 32 chars.) do not call help topics from the application. Everything else seem to be in order. Identically-formed IDs in neighboring topics work properly.

  • Using HTML in JEdotrPane

    Can somebody pls tell me a way to use HTML version 4.0 command in a JEditoPane.Becz it support only for HTML version 3.2. I want to use div command. i heard about HTMlEdotiKit. but i dont know ow ot use it . pls help me thnx