Print Workbench generating txt file

Hello,
we are using Print Workbench to generate bill forms. We will send a file to the Print Center.
The problem is that our form (SmartForm) generates a XML file, and the Print Center expects to receive a TXT file.
Does anybody know how to generate the TXT file directly?
We don't want to generate XML and then convert to TXT...
Cheers
Adriano

Use printer defined with device type ASCIIPRI when printing and set 'Standard format' as output format in the smartform general attributes.
Regards
Sridhar

Similar Messages

  • Can I use DME to generate .TXT file?

    My client wants the withholding tax program to generate a .TXT file to meet his legal requirements. How is this done?Maybe can i generate a .DME file and then convert to .TXT file? Can .DME be converted to .TXT?

    Hi,
    How you are going to get data of the withholding tax? If it is through an custom ABAP program, you can write taxt file directly and no need to write DME file.
    Thanks
    Murali.

  • Automatic Print of output .txt file - Visual Studio Basic 2013

    Hi all,
    I am wondering if someone knows the code for printing a .txt file automatically.
    Thanks in advance for any help.
    Konstantina.

    Here is one way: from
    http://msdn.microsoft.com/en-us/library/cwbe712d.aspx
    Imports System
    Imports System.Drawing
    Imports System.IO
    Imports System.Drawing.Printing
    Imports System.Windows.Forms
    Public Class Form1
    Inherits Form
    Private printButton As Button
    Private printDocument1 As New PrintDocument()
    Private stringToPrint As String
    Public Sub New()
    Me.printButton = New System.Windows.Forms.Button()
    Me.printButton.Location = New System.Drawing.Point(12, 51)
    Me.printButton.Size = New System.Drawing.Size(75, 23)
    Me.printButton.Text = "Print"
    Me.ClientSize = New System.Drawing.Size(292, 266)
    End Sub
    Private Sub ReadFile()
    Dim docName As String = "testPage.txt"
    Dim docPath As String = "c:\"
    printDocument1.DocumentName = docName
    Dim stream As New FileStream(docPath + docName, FileMode.Open)
    Try
    Dim reader As New StreamReader(stream)
    Try
    stringToPrint = reader.ReadToEnd()
    Finally
    reader.Dispose()
    End Try
    Finally
    stream.Dispose()
    End Try
    End Sub
    Private Sub printDocument1_PrintPage(ByVal sender As Object, _
    ByVal e As PrintPageEventArgs)
    Dim charactersOnPage As Integer = 0
    Dim linesPerPage As Integer = 0
    ' Sets the value of charactersOnPage to the number of characters
    ' of stringToPrint that will fit within the bounds of the page.
    e.Graphics.MeasureString(stringToPrint, Me.Font, e.MarginBounds.Size, _
    StringFormat.GenericTypographic, charactersOnPage, linesPerPage)
    ' Draws the string within the bounds of the page
    e.Graphics.DrawString(stringToPrint, Me.Font, Brushes.Black, _
    e.MarginBounds, StringFormat.GenericTypographic)
    ' Remove the portion of the string that has been printed.
    stringToPrint = stringToPrint.Substring(charactersOnPage)
    ' Check to see if more pages are to be printed.
    e.HasMorePages = stringToPrint.Length > 0
    End Sub
    Private Sub printButton_Click(ByVal sender As Object, ByVal e As EventArgs)
    ReadFile()
    printDocument1.Print()
    End Sub
    <STAThread()> _
    Shared Sub Main()
    Application.EnableVisualStyles()
    Application.SetCompatibleTextRenderingDefault(False)
    Application.Run(New Form1())
    End Sub
    End Class

  • How to generate .txt file from data in internal table

    Hi I am using the program below to load .txt file into SAP table.
    I am moving the records from a .txt file into internal table final and then into ZOUT_CCFOBS table.
    How do I load records from internal table final back to another .txt file with the same layout? Pls advice.
    REPORT  ZOUP_LOAD_CCF_OBS.
    TABLES: ZOUT_CCFOBS.
    TYPES: BEGIN OF tline, "structure to store a line of each row
        line(1000) TYPE c,
    END OF tline.
    TYPES: BEGIN OF i_split, "structure to store split record of each row
          t_ZOTFACIL(100)    TYPE c,
          t_ZOTCCF(8)    TYPE c,
          t_ZOTOBSCAT(100)    TYPE c,
    END OF i_split.
    DATA: itab TYPE TABLE OF tline WITH HEADER LINE.
    DATA: idat TYPE TABLE OF i_split WITH HEADER LINE.
    DATA: final TYPE STANDARD TABLE OF ZOUT_CCFOBS WITH HEADER LINE.
    DATA: file_str TYPE string.
    DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
          c_search_dir TYPE dxfields-longpath.
    SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
    PARAMETERS p_file LIKE rlgrap-filename.                "file location
    SELECTION-SCREEN END OF BLOCK a1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      PERFORM f4_dxfilename USING p_file.
    START-OF-SELECTION.
    Download data from application server
      PERFORM download_data.
      file_str = p_file.
      LOOP AT itab.
        CLEAR idat.
    this will split the line at every delimeter into single field
        SPLIT itab-line AT ',' INTO idat-t_ZOTFACIL
        idat-t_ZOTCCF
        idat-t_ZOTOBSCAT.
        APPEND idat.
      ENDLOOP.
    copying the internal table into final table which compatible with table tcurr
      LOOP AT idat.
        final-ZOTFACIL = idat-t_ZOTFACIL.
        final-ZOTCCF = idat-t_ZOTCCF.
        final-ZOTOBSCAT = idat-t_ZOTOBSCAT.
        APPEND final.
      ENDLOOP.
      LOOP AT final.
        MODIFY ZOUT_CCFOBS FROM final.
        IF sy-subrc EQ 0.
          MESSAGE S001(ZCURR).
        ELSE.
          MESSAGE A000(ZCURR).
        ENDIF.
      ENDLOOP.
    FORM f4_dxfilename USING p_file.
    addition TAICK 15/07/2008.
    *maintain application server default search path.
      IF sy-sysid = 'BWP'.
        c_search_dir = '//rdmsbw/prd/data/output/all'.
      ELSEIF sy-sysid = 'BWQ'.
        c_search_dir = '//rdmsbw/uat/data/output/all'.
      ELSEIF sy-sysid = 'BWD'.
        IF sy-mandt = '900'.
          c_search_dir = '//rdmsbw/sit/data/output/all'.
        ELSE.
          c_search_dir = '//rdmsbw/dev/data/output/all'.
        ENDIF.
      ENDIF.
      DATA: wa_file LIKE dxfields-longpath.
      CLEAR: wa_file.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
        EXPORTING
          i_location_flag = 'A'
          i_server        = ' '
          i_path          = c_search_dir
          filemask        = c_fnh_mask
          fileoperation   = 'R'
        IMPORTING
          o_path          = wa_file
        EXCEPTIONS
          rfc_error       = 1
          error_with_gui  = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        p_file = wa_file.
      ENDIF.
    addition end TAICK 15/07/2008.
    ENDFORM. " f4_dxfilename
    FORM download_data .
      OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      DO.
        IF sy-subrc <> 0.
          exit.
        ENDIF.
        READ DATASET p_file INTO itab.
        if sy-subrc = 0.
          APPEND itab.
        clear itab.
        endif.
      ENDDO.
      CLOSE DATASET p_file.
      delete itab index 1. "remove column header
    ENDFORM.                    " download_data
    Edited by: RebekahMBB on Feb 20, 2012 12:56 PM

    Hi I am using this piece of code to download my internal table into an .xls file on my pc.
    FORM Z_CONVERT_EXCEL .
      "This part of code to add column name in the downloaded file.
      data : begin of int_head occurs 0,
      Filed1(20) type c,                     " Header Data
      end of int_head.
      int_head-Filed1 = 'ZOTOUS'.
      APPEND int_head.
      CLEAR int_head.
      int_head-Filed1 = 'ZOTOUS'.
      APPEND int_head.
      CLEAR int_head.
      int_head-Filed1 = 'ZOTOGCUR'.
      APPEND int_head.
      CLEAR int_head.
    Select ZOTOUS ZOTSYORGU ZOTOGCUR from ZOUT_ORG_CURR into CORRESPONDING FIELDS OF TABLE itab.
      v_filetype = '.xls'. "I just manipulate the file name using XLS file type.
      v_filename = 'C:\Documents and Settings\00088592\Desktop\OUs automation\development'.
      CONCATENATE v_filename v_filetype INTO lv_filename.
      CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
            filename         = lv_filename
            filetype         = 'ASC'
          APPEND           = 'X'
            write_field_separator = 'X'
          CONFIRM_OVERWRITE = 'X'
       TABLES
            data_tab         = itab
            FIELDNAMES       = int_head
       EXCEPTIONS
            file_open_error  = 1
            file_write_error = 2
            OTHERS           = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    "Z_CONVERT_EXCEL
    As you can see the code specifies the header row separately and appends it in int_head.
    What if I have 76 fields or more? I cant be specifying each like that.
    Is there any other way to do this? To move the 76 field headers into int_head?
    Pls help.
    Thanks!

  • PC cannot print Mac-generated pdf-files

    Hi, I have a question:
    I am using Microsoft Word to save Word documents as PDF. I can perfectly open and print them from my system, but PC users will not be able to print them (although they can see them on screen).
    This is a real problem when exchanging pdf files with other users by email, especially important documents like references, where the final reader usually does not respond to me when he cannot print it out. My mail (Eudora) settings seem OK, since pdf files that I downloaded from the internet and send to PC users are readable and printable.
    I always thought PDFs are universally readable. If this is a known issue, or if any of you know the answer, I would be happy to hear it.
    Thanks!
    eMac   Mac OS X (10.4.8)   eMac

    Just a thought Gerrit: when you save the file on your Mac, are you remembering to add the appropriate file suffix?
    PCs can't do anything with files unless they are told (by the suffix) what to do with them!

  • [Applet]Printing issue with pdf files on Xerox 4595

    Greetings !!
    I'm trying to print to a Xerox 4595 printer from a Windows XP station (limited account) using a Java Web Applet.
    This applet generates pdf files which have to be printed.
    The Xerox 4595 uses a printing queue that is detected by the Applet.
    The problem is the following: usually when printing a simple local file from this computer there is a box that asks you your login to let you create a job and then print.
    When using the Java Applet, there is no way to have this print box displayed. We have the Java Print Dialog but once clicked on "Print" there is no box displayed to pass the login to the printer and let us print.
    Is anyone already worked with Xerox 4595 and experienced such issue ?
    How can I, using the Java language and modify the Applet, ask the printer to send me the dialog box asking for the login ? Without this login no jobs are accepted and we can't print the generated pdf files.
    I looked on the printer queue settings and it seems that the Xerox uses the IPP to communicate with the local computers in the office.
    The server from which the Applet is used is a openSuSE Linux Web server (apache2)
    How come using Linux workstations any pdf files are printed (on shared printers such HP laserjet) and under windows there is jammed characters and sheet feed instead ?

    A lot can depend upon which app your are using on your tablet device, the same applies to computer programs but apps are much worse.
    Which app are you using?
    I would try the free Adobe Mobile Reader. This product seems to support more features than other apps.
    There could even be issues with the type of tablet you are using. The Apple line may work better then Android devices since there is QA check and approval by Apple.
    Another factor is the how the PDF was created.
    How well are the maps displayed on your laptop or desktop? Try different values of zoom.

  • Print Workbench file

    Hello
    I would like to know what is the best way to work with files in the print workbench. The 3rd part company wants to work with txt files.
    Should I create XML(SmartForm), or RDI(SAPscript) and then convert to txt?
    Online documentation has a lot of stuff, but i would like to know if someone has experienced the same problem.

    Use printer defined with device type ASCIIPRI when printing and set 'Standard format' as output format in the smartform general attributes.
    Regards
    Sridhar

  • While generating reports in Oracle BI Publisher in pdf format, the generated pdf reports have hindi  इ matra displaced by one character. For example, रिपोर्ट is printed as रपेिोरट.  Word file generated of the same report have correct hindi इ  matra positi

    While generating reports in Oracle BI Publisher in pdf format, the generated pdf reports have hindi  इ matra displaced by one character. For example, रिपोर्ट is printed as रपेिोरट.  Word file generated of the same report have correct hindi इ  matra position and also pdf generated from this word file also contains the same.

  • How to generate a specific size txt file?

    Hey guys,
    I'm working with a system wich reads txt files. These files have to be 100kb of size.
    Is it possible to generate specific size txt files in abap? I'm trying to do this but i cant get exactly 100kb.
    Best regards

    [Character Streams|http://java.sun.com/docs/books/tutorial/essential/io/charstreams.html]

  • With webutil-client_host, send txt file to client printer

    hi,
    I wanna to learn how to send a txt file to client default printer(local or network),
    I created txt file at client disk, and try to send printer directly,
    just try some statement looks like below;
    a.client_host('cmd /c start print C:\TEMP399899.txt /d:lpt1');
    b.client_host('cmd /c start copy C:\TEMP399899.txt lpt1');
    I do not know the command prompt syntax, please help me, reference me,
    thanks

    Hi,
    on a command line type
    print /?
    for the help of how to print documents. On XP this help is
    PRINT [D:device] [[drive:][path]filename[...]]
    /D:device Specifies a print device.
    Frank

  • Creating Flat file in Print workbench.

    Hi,
       I have a query in Print workbench.
       I have to diable spooling and printing and I've to create a 'Flat file' instead.
       If anyone worked on this area or if anyone could suggest me some idea, it would be of great help to me.
    Thanks before-hand and Greetings,
    Sasi.

    Hi,
    Take a look at https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1523. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] It gives information on how to setup printer for file output. See if it helps.
    Regards

  • Problem with printing txt file

    I have a problem with printing txt file. My code looks like :
    String filename = something.txt";
    DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
    PrintService[] services = PrintServiceLookup.lookupPrintServices(
              flavor, null);
    PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
    pras.add(PrintQuality.DRAFT);
    pras.add(new Copies(1));
    pras.add(MediaSizeName.ISO_A4);
    pras.add(Sides.ONE_SIDED);
    pras.add(Chromaticity.MONOCHROME);
    PrintService service = ServiceUI.printDialog(null, 200, 200,
              services, services[0],
              null,
              pras);
    if (service != null)
    try
    DocPrintJob job = service.createPrintJob();
    FileInputStream fis = new FileInputStream(filename);
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc = new SimpleDoc(fis, flavor, das);
    job.print(doc, pras);
    Thread.sleep(10000);
    catch(FileNotFoundException e)
    catch(PrintException e1)
    catch(InterruptedException e2)
    It doesn't work :(
    What is my purpose: I would like to print .txt file but I would like to get PrintDialog where I can choose PrintQuality, Chromaticity etc. I found also that I should use DocFlavor.INPUT_STREAM.TEXT_PLAIN_HOST but I don't know how.
    I will be very gratefull for help :)

    I tested it on 3 printers (different models of hp). 2 of them don't give me any error but when it started print priter stoped (just as it dosesn't have a paper), but 1 of them doesn't react (there were no errors), i thought tahat something was wrong with printers but when I change DocFlavor.INPUT_STREAM.AUTOSENSE to DocFlavor.GIF and filename to dog.gif it works so mybe there is another way to print txt file

  • Indesign-generated .pdf files won't print

    I realize this question is vague to the point of being unanswerable, but here I go anyway.
    Our department's publication person sent me a number of chapters of our book in progress so that I could print an uncorrected proof to show to our funding source. She emailed me .pdf files generated by InDesign CS2, probably, although it might have been CS3.
    She also emailed me the indesign file for the frontmatter because I had some things to add, so the .pdf for that I generated myself.
    I took everything to a local printer we regularly use. To print this job he was using a large commercial Canon setup I think. None of the .pdfs would print on it. He ended up having to print them all as images for the purposes of creating a proof for me.
    Now, I printed all of them myself on our networked postscript printer, both from a Mac and a Windows machine, no problem.
    Since the files had been emailed to me, and then to him, we thought maybe they got corrupted, so I brought them over on a disk, but that didn't help, not even the one file whose .pdf I generated myself would print.
    So is this an issue that has come up--indesign-generated .pdf files being unprintable on a commercial printer but printable on a postscript machine.

    Dov and Al,
    Yes, I'm sorry, I do realize that this isn't enough to diagnose a problem. I was hoping that this might be something that has come up before and someone would recognize.
    As far as I could tell, he was opening up the print jobs in Acrobat and sending them to his printer, which had its own job monitor. When he consulted that monitor he just said, no, it won't print.
    He's a smart guy and I've done a number of jobs with him that were generated in indesign, so I'm really at a loss to explain what has gone wrong with this one.

  • Wrong  file format while generating a txt file

    Hi,
    I am using a java application to generate a txt file. This txt file will later be used by a spider. The problem is when the file is generated it has UNIX format. It means the '\n' characters at the end of the line are not the same as in a DOS file.
    I need the file to be in a "PC/DOS" format otherwise the spider will ignore the file.
    Any help would be appreciated.
    Regards,
    Fas

    Another stab at "simplest": can you avoid embedding
    newline characters in the strings
    your write and reply on PrintWriter's
    println() methods instead?But, if I understand the OP, this will cause the same problem. He is running on Unix but wants to generate a DOS type eol. The println() method will use the OS default; therefore, he needs to explicitly specify the DOS eol.

  • Print from .csv or .txt file

    Hello Experts,
    I am new to ABAP development.
    Is there any way to print the content of an .csv or .txt file.
    For example my report will have a selection screen where we will upload a file containing "Hello world" when we execute the output screen will show "Hello World".
    Regards,
    Sarnava

    Hi Sarnava,
    If your are selecting file from your system desktop then use  GUI_UPLOAD to upload data in data_tab and then while applying loop at this internal table split the code at ',' or space and fill internal table with your relevant fields.
    Loop at final internal table and display on output screen.
    DATA: BEGIN OF I_APPFEED OCCURS 0,
             RECORD(200)  TYPE C,
           END   OF I_APPFEED.
    CALL FUNCTION 'GUI_UPLOAD'
         EXPORTING
           FILENAME                = LV_FILE (path of .csv file from desktop)
         TABLES
           DATA_TAB                = I_APPFEED
    LOOP AT I_APPFEED INTO GWA_LOC_APP.
         SPLIT GWA_LOC_APP AT ','
        into wa_fields.
    append wa_fields to it_fields.
    endloop.
    loop at it_fields into wa_fields
    write: wa_fields-fields.
    endloop.
    Hope, this will solve your issue or let me know if you want something else.

Maybe you are looking for

  • GR/IR Balance Pending

    Dear Experts in the case of only imported item PO. Pl tell us whenever we r checking the GR/IR Balance System MB5S is showing the Balance Qty , instead of i have Clear the IR with respect to  GR with same qty & Amount . but still its showing it Pendi

  • Using user_command in reuse_alv

    hai ,         please help to solve this prob. after i used layout-list_append = 'X '. to out put 3 alv's in one page .  use user_command is not working is  their any possible way to do this .

  • IOS 8 faces are unsorted in photo app

    Since IOS8 all the faces in the photo app are unsorted. If ou have only a few faces it is no problem, but if you have several hundrets of faces, it is useless. Is there a switch to change this, which I didn't find? regard Harry

  • More XI 3.0-- IDoc-- R/3 - Trouble

    hi, i was trying to set up a scenario in which an idoc matmas04 is sent via XI to the receiver-R/3 instead of pure ALE/IDoc transfer. I get the corresponding Error in the XI-Monitoring: translated to English it says something like: Receiver Service c

  • Sqribe Reporting Tool

    Has anyone used or looked at the Sqribe Enterprise report tool from Sqribe Technologies? We are evaluating which reporting tool to use in conjunction with our Forte application, and Sqribe is a suggestion that has been put forward. Any experiences/co