Output to File using SAPScript

Hello Friends,
How can we get output as .PDF file from SAPScrip. I dont need to print the output instead I want to send it as attachment.
Please help me in finding the solution.
Regards,
Shabbar

Hi Ali,
You need not have to create a spool request in order to convert the SAPScript output to PDF..
What you need to do is to convert SAPScript Output to OTF format and then convert it to PDF format using the Function Module CONVERT_OTF and then download the PDF data to desktop using the Function Module GUI_DOWNLOAD.
Here is my entire code.
REPORT Z1SCRIPT_TO_PDF                              .
***************************DECLARATIONS*******************************
DATA: BEGIN OF ITAB OCCURS 0,
      CARRID TYPE SFLIGHT-CARRID,
      CONNID TYPE SFLIGHT-CONNID,
      PRICE TYPE SFLIGHT-PRICE,
      END OF ITAB.
DATA: struct TYPE ITCPO.
DATA: PDFTAB TYPE TABLE OF TLINE WITH HEADER LINE,
      DATAB TYPE TABLE OF ITCOO WITH HEADER LINE,
DATA: BINFILESIZE TYPE I,
      FILE_NAME TYPE STRING,
      FILE_PATH TYPE STRING,
      FULL_PATH TYPE STRING.
To specify Printer name
struct-tddest = 'LP01'.
To specify no Print Preview
struct-tdnoprev = 'X'.  
To access the SAP Script output in OTF format
struct-tdgetotf = 'X'.
**************************SAPSCRIPT GENERATION*******************************
CALL FUNCTION 'OPEN_FORM'
EXPORTING
  APPLICATION                       = 'TX'
  ARCHIVE_INDEX                     =
  ARCHIVE_PARAMS                    =
   DEVICE                            = 'PRINTER'
   DIALOG                            = space
   FORM                              = 'ZSCRIPT'
  LANGUAGE                          = SY-LANGU
   OPTIONS                           = struct
  MAIL_SENDER                       =
  MAIL_RECIPIENT                    =
  MAIL_APPL_OBJECT                  =
  RAW_DATA_INTERFACE                = '*'
  SPONUMIV                          =
IMPORTING
  LANGUAGE                          =
  NEW_ARCHIVE_PARAMS                =
  RESULT                            =
EXCEPTIONS
   CANCELED                          = 1
   DEVICE                            = 2
   FORM                              = 3
   OPTIONS                           = 4
   UNCLOSED                          = 5
   MAIL_OPTIONS                      = 6
   ARCHIVE_ERROR                     = 7
   INVALID_FAX_NUMBER                = 8
   MORE_PARAMS_NEEDED_IN_BATCH       = 9
   SPOOL_ERROR                       = 10
   CODEPAGE                          = 11
   OTHERS                            = 12
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 'START_FORM'
EXPORTING
  ARCHIVE_INDEX          =
   FORM                   = 'ZSCRIPT'
  LANGUAGE               = ' '
  STARTPAGE              = ' '
  PROGRAM                = ' '
  MAIL_APPL_OBJECT       =
IMPORTING
  LANGUAGE               =
EXCEPTIONS
   FORM                   = 1
   FORMAT                 = 2
   UNENDED                = 3
   UNOPENED               = 4
   UNUSED                 = 5
   SPOOL_ERROR            = 6
   CODEPAGE               = 7
   OTHERS                 = 8
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 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'ELEM1'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN'
IMPORTING
  PENDING_LINES                  =
EXCEPTIONS
   ELEMENT                        = 1
   FUNCTION                       = 2
   TYPE                           = 3
   UNOPENED                       = 4
   UNSTARTED                      = 5
   WINDOW                         = 6
   BAD_PAGEFORMAT_FOR_PRINT       = 7
   SPOOL_ERROR                    = 8
   CODEPAGE                       = 9
   OTHERS                         = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SELECT CARRID CONNID PRICE FROM SFLIGHT INTO TABLE ITAB.
LOOP AT ITAB.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'ELEM2'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN'
IMPORTING
  PENDING_LINES                  =
EXCEPTIONS
   ELEMENT                        = 1
   FUNCTION                       = 2
   TYPE                           = 3
   UNOPENED                       = 4
   UNSTARTED                      = 5
   WINDOW                         = 6
   BAD_PAGEFORMAT_FOR_PRINT       = 7
   SPOOL_ERROR                    = 8
   CODEPAGE                       = 9
   OTHERS                         = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'END_FORM'
IMPORTING
  RESULT                         =
EXCEPTIONS
   UNOPENED                       = 1
   BAD_PAGEFORMAT_FOR_PRINT       = 2
   SPOOL_ERROR                    = 3
   CODEPAGE                       = 4
   OTHERS                         = 5
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 'CLOSE_FORM'
IMPORTING
  RESULT                         =
  RDI_RESULT                     =
TABLES
   OTFDATA                        = DATAB[]
EXCEPTIONS
   UNOPENED                       = 1
   BAD_PAGEFORMAT_FOR_PRINT       = 2
   SEND_ERROR                     = 3
   SPOOL_ERROR                    = 4
   CODEPAGE                       = 5
   OTHERS                         = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*******************CONVERTING OTF DATA TO PDF DATA***********************
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
   FORMAT                      = 'PDF'
  MAX_LINEWIDTH               = 132
  ARCHIVE_INDEX               = ' '
  COPYNUMBER                  = 0
  ASCII_BIDI_VIS2LOG          = ' '
  PDF_DELETE_OTFTAB           = ' '
IMPORTING
   BIN_FILESIZE                = BINFILESIZE
  BIN_FILE                    =
  TABLES
    otf                         = DATAB[]
    lines                       = PDFTAB[]
EXCEPTIONS
  ERR_MAX_LINEWIDTH           = 1
  ERR_FORMAT                  = 2
  ERR_CONV_NOT_POSSIBLE       = 3
  ERR_BAD_OTF                 = 4
  OTHERS                      = 5
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 METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
   WINDOW_TITLE         =
   DEFAULT_EXTENSION    =
   DEFAULT_FILE_NAME    =
   FILE_FILTER          =
   INITIAL_DIRECTORY    =
   WITH_ENCODING        =
   PROMPT_ON_OVERWRITE  = 'X'
  CHANGING
    filename             = FILE_NAME
    path                 = FILE_PATH
    fullpath             = FULL_PATH
   USER_ACTION          =
   FILE_ENCODING        =
EXCEPTIONS
   CNTL_ERROR           = 1
   ERROR_NO_GUI         = 2
   NOT_SUPPORTED_BY_GUI = 3
   others               = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*******************DOWNLOADING THE PDF DATA******************************
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
   BIN_FILESIZE                    = binfilesize
   FILENAME                          = FULL_PATH
   FILETYPE                           = 'BIN'
  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'
  WK1_N_FORMAT                    = ' '
  WK1_N_SIZE                      = ' '
  WK1_T_FORMAT                    = ' '
  WK1_T_SIZE                      = ' '
IMPORTING
  FILELENGTH                      =
  tables
    data_tab                        = PDFTAB[]
  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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
After executing this program, it will ask for saving in the desktop. Give proper location and the PDF file will be stored in that location.
<b>Award points if found useful.</b>
Regards,
SP.

Similar Messages

  • Extract XML output to file using PL/SQL

    Hi.
    Since Oracle 8.1.4.7.1 I am using XML output in my applications.
    With that version of Oracle, my method was:
    1. Make the select;
    2. Create a file somewhere in my C drive;
    3. Create the XML file header;
    3. For each row, insert into the file, with the correct format;
    4. Close the file;
    ... and, voilá ... the XML file was made.
    Now, with the Oracle 10g, I know that I have much more ways to do it:
    1. Package DBMS_XMLQUERY
    2. Statements like
    "SELECT XMLELEMENT("USERS", XMLELEMENT("nome_pessoa", e.nome_pessoa ||' - '|| e.login), XMLELEMENT ( "password", e.password)) AS "result"
    FROM pessoa e"
    3. Or finally using XML SQL Utility.
    My question, is that if there is any way that i can make it all of this automatically. If there is any procedure or method that allow me to do all this stuff in just one step:
    1. Select in XML output;
    2. Creation of file;
    3. Insertion of Select output in file and Close of File;
    Thankx,

    I'm assuming that you want to write to the file system of the server that the database is running on...
    you'll have to use utl_file
    See
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96612/u_file.htm

  • Output Mutiple Files Using htp.p

    Hello,
    I wish to output 3 CSV files from APEX I have the following code
    Declare
    S_FileName VarChar(20);
    S_Counter Number;
    begin
    -- Set the File NAme
    S_FileName :=To_char(sysdate,'yyyymmdd')||'Letters.CSV';
    For S_Counter IN 1..4 LOOP
    -- Set the MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="'||S_FILENAME||S_Counter|| '"');
    -- Close the HTTP Header
    owa_util.http_header_close;
    -- Loop through all rows in EMP
    for x in (select MPAN_CORE,ACCOUNT_NO
    from Categoriser.LTNA_LETTER_ONE_OUTPUT@link_to_dqmDevdb )
    loop
    -- Print out a portion of a row,
    -- separated by commas and ended by a CR
    htp.prn(x.MPAN_CORE ||','|| x.ACCOUNT_NO ||','||
    x.MPAN_CORE || chr(13));
    END LOOP;
    END LOOP;
    -- Send an error code so that the-- rest of the HTML does not render
    htmldb_application.g_unrecoverable_error := true;
    end;
    At this stage i only want to output 3 files the content is not a issue
    I it possible to do this with APEX?
    Any help on this is greatly appreciated.
    David

    I take it from the lack of response that this is not somthing that APEX can do?No, it's something that HTTP cannot do. Think about it: if it was possible for a server to send multiple files in response to an HTTP request, then it would be possible to break your computer very easily indeed.
    aww well looks like i will need to find another way..You'd need something in the browser client-side, Java applet, Flash control etc...

  • How to send the output of a script to a txt or rpt file using T-sql?

    Hi!
    I have some code which we use to record info about a database when we decommission it. I normally click Query > Results to File and then run it to produce a file.  I need to do this via t-sql so I can automate it. Any idea what code I need to make
    this script output to file?
    Thanks,
    Zoe
    SET NOCOUNT ON
    DECLARE @Databasename varchar(50)
    DECLARE @date as char(10)
    DECLARE @session_usr nchar(30);
    SET @Databasename = db_name()
    SET @date = convert(char(10), getdate(), 121)
    SET @session_usr = SYSTEM_USER;
    DECLARE @sqlCommand varchar(1000)
    select current_user
    Print '================================================================================'
    Print '========== SQL Decommission Report for '+ @@SERVERNAME +' ========='
    Print '========== Executed on ' + @date +' by '+ rtrim(@session_usr) +' ========='
    Print '================================================================================'
    Print ' '
    Print 'Database properties'
    Print '----------------------------------'
    select substring(name,1,25) as Name,substring(filename,1,40) as File_Name,cmptlevel as Compatibility_level from master.dbo.sysdatabases
    where name = @databasename
    Print 'Full Text Catalogs'
    Print '----------------------------------'
    select substring(name,1,20)as Name,status,substring(path,1,52) as Path FROM [master].[dbo].[sysfulltextcatalogs]
    Print 'SSIS Packages'
    Print '----------------------------------'
    IF (select cast(@@version as varchar)) like '%2012%' begin
    print 'sql 2012 instance'
    select substring(name,1,20) as Name,substring(description,1,40) as Description,ownersid as Owner from msdb.dbo.sysssispackages
    end else if (select cast(@@version as varchar)) like '%2008%' begin
    print 'sql 2008 instance'
    select substring(name,1,20) as Name,substring(description,1,40) as Description,ownersid as Owner from msdb.dbo.sysssispackages
    select substring(name,1,20) as Name,substring(description,1,40) as Description,substring(owner,1, 18) as Owner from msdb.dbo.sysdtspackages
    end else if (select cast(@@version as varchar)) like '%2005%' begin
    print 'sql 2005 instance'
    select substring(name,1,20) as Name,substring(description,1,40) as Description,suser_sname(ownersid) as Owner from msdb.dbo.sysdtspackages90
    select substring(name,1,20) as Name,substring(description,1,40) as Description,substring(owner,1, 18) as Owner from msdb.dbo.sysdtspackages
    end
    Print 'Linked Servers'
    Print '----------------------------------'
    SELECT substring(srvname,1,35) as LinkedServer_Name,substring(datasource,1,35) as Data_Source FROM master.dbo.sysservers WHERE isremote = 0
    Print 'Replication'
    Print '----------------------------------'
    IF (select count(*) from master.dbo.sysdatabases where name = 'Distribution') > 0
    select substring(publisher_db,1,20) as Published_DB,substring(Description,1,40) as Description from distribution.dbo.MSpublications
    ELSE print 'No replication'
    Print ' '
    Print 'Database Mail'
    Print '----------------------------------'
    SELECT substring(name,1,20) as Name,enabled,substring(email_address,1,35) as Email_address,last_email_date FROM msdb.dbo.sysoperators
    where last_email_date > dateadd(day,-30,getdate())-- detect whether any of the systems have sent an email in the last 30 days
    Print 'CLR Assemblies'
    Print '----------------------------------'
    select substring(Name,1,20) as Name,substring(Type_desc,1,35) as Description,Create_date from sys.objects where object_id in (select object_id from sys.assembly_modules)
    Print 'Logins'
    Print '----------------------------------'
    SET @sqlCommand = 'select substring(name,1,40) as Name,substring(dbname,1,30) as Default_Database from master.dbo.syslogins where sid in (select sid from '+ @databasename +'.dbo.sysusers where issqlrole <> 1 and hasdbaccess <> 0 and name <> ''dbo'')'
    EXEC (@sqlCommand)

    You can use bcp to export from database to flat file.
    It requires xp_cmdshell to work from a stored procedure.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Creating an output  file using 'GUI_DOWNLOAD' function

    Hi SapAll.
    when i try to create an out put text file using the FM 'GUI_DOWNLOAD' by wiring the follwoing below source code
    CONCATENATE 'ASORT' c_tab 'ASORTYP' c_tab
                    'VKORG' c_tab 'DATAB' c_tab
                    'DATBI' INTO outtab-txt.
    iam not able to create the text file with more than 16 fields.i have tried to create an out put file with 24 fields but i can only see 16 fields in it.so could any body help me in finding out how i can create an Output file with more than 16 fields in the file.
    your help will be appreciated.
    regards.
    Varma

    check your output definition....are you doing something like below?  SAP will transfer 1024 bytes per line with GUI_DOWNLOAD.    After you download, how do you view the data?  Be sure you're looking at the data with something that will show all 1024 bytes, and not jsut 256 or 512.
    types: begin of outline,
               txt(1024),
             end of outline.
    data: outtab type table of outline,
             ls_out type outline.

  • How to create multiple output files using TrAX?

    I am new in this field. I'm trying to create multiple xml output files using TrAX. I have to parse a xml source file and output it to multiple xml files. My problem is that it only creates one output file and puts all the parsed data there. When i use saxon and run xsl and xml files, it works fine and creates multiple files...it has something to do with my java code...Any help is greatly appreciated.
    Here's my XSL file
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"
    <xsl:template match="data_order">
    <data_order>
         <xsl:copy-of select="contact_address"/>
         <xsl:copy-of select="shipping_address"/>
         <xsl:apply-templates select="ds"/>
    </data_order>
    </xsl:template>
    <xsl:template match="ds">
    <xsl:variable name="file" select="concat('order', position(),'.xml')"/>
    <order number="{position()}" href="{$file}"/>
    <xsl:document href="{$file}">
    <xsl:copy-of select="."/>     
    </xsl:document>
    </xsl:template>
    </xsl:stylesheet>
    xml source file
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE operation SYSTEM 'data_order.dtd'>
    <data_order job_id='00-00-000' origin='PM-ESIP'>
         <contact_address>
              <first_name>ssssss</first_name>
              <last_name>sssss></last_name>
              <phone>2323232</phone>
              <email>dfdfdsaf</email>
         </contact_address>
         <ds ds_short_name ='mif13tbs'>
              <output>
                   <media_format>neither</media_format>
                   <media_type>FTP</media_type>
                   <output_format>GIF</output_format>
              </output>
         </ds>
              <ds ds_short_name ='mif15tbs'>
              <output>
                   <media_format>neither</media_format>
                   <media_type>FTP</media_type>
                   <output_format>GIF</output_format>
              </output>
         </ds>
    </data_order>
    My java file
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import java.io.*;
    public class FileTransform {
    public static void main(String[] args)
    throws Exception {
    File source = new File(args[0]);
    File style = new File(args[1]);
    File out = new File(args[2]);
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer t = factory.newTransformer(new StreamSource(style));
    t.transform(new StreamSource(source), new StreamResult(out));

    Saxon has specific extensions. In this case it is <xsl:document>. That looks like a standard XSLT element, but it actually isn't. The history behind it is this: There was a proposal to create a new version of XSLT, called XSLT 1.1. One of the new features of this version was to be this xsl:document element. The author of the Saxon product, Michael Kay, is one of the people on the W3C committee directing the evolution of XSLT, so he upgraded his product to implement XSLT 1.1. But then the committee decided to drop XSLT 1.1 as a recommendation. So that left Saxon in the strange position of implementing a non-existent extension to XSLT.
    The other outcome of this process was that XSLT (1.0) does not have a way of producing more than one output file from an input file. And so the short answer to your question is "Trax can't do that." However, XSLT 2.0 will be able to do that, although it is not yet a formal W3C recommendation, and when it does become one it will take a while before there are good implementations of it. (I predict that Saxon will be the first good implementation.)
    One of the problems with XML and XSLT is that what you knew a year ago is probably obsolete now, because of all the evolution going on. So being new in the field is not a disadvantage, unless you get stung by reading obsolete tutorials or magazine articles.

  • Printing messages in Log File and Output File using Dbms_output.put_line

    Hi,
    I have a requirement of printing messages in log file and output file using dbms_output.put_line instead of fnd_file.put_line API.
    Please let me know how can I achieve this.
    I tried using a function to print messages and calling that function in my main package where ever there is fnd_file.put_line. But this approach is not required by the business.
    So let me know how I can achieve this functionality.
    Regards
    Sandy

    What is the requirement that doesn't allow you using fnd_file.put_line?
    Please see the following links.
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Dbms_output.put_line+AND+Log+AND+messages&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=%22dbms_output.put_line+%22+AND+concurrent&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How to capture output of java files using Runtime.exec

    Hi guys,
    I'm trying to capture output of java files using Runtime.exec but I don't know how. I keep receiving error message "java.lang.NoClassDefFoundError:" but I don't know how to :(
    import java.io.*;
    public class CmdExec {
      public CmdExec() {
      public static void main(String argv[]){
         try {
         String line;
         Runtime rt = Runtime.getRuntime();
         String[] cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E.java";
         Process proc = rt.exec(cmd);
         cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E";
         proc = rt.exec(cmd);
         //BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
         BufferedReader input = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
         while ((line = input.readLine()) != null) {
            System.out.println(line);
         input.close();
        catch (Exception err) {
         err.printStackTrace();
    public class E {
        public static void main(String[] args) {
            System.out.println("hello world!!!!");
    }Please help :)

    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • Using opendata set  to output a file

    Hi,
    I have a query in using open dataset command.
    let us consider this scenario as an example.
    I need to select 5 fields from mara table and I want to display the output in a flat file.Later, I have to read the data from the flat file and to display the output in sap screen.
    Can someone help me on doing this and also if you send me the code , it will be useful for me to understand.
    Thanks,
    Stal.

    Hi Stalin,
    Download data to a unix file :
    1) Declare parameter p_file LIKE rlgrap-filename OBLIGATORY.
    (convert logical file to physical file using FM file_get_name)
    2) Declare internal table and work area
    3) OPEN DATASET <dsn> FOR OUTPUT
    4) Retrieve data and store in internal table
    5) For each record use statemet Transfer <f> to <dsn>
    Upload data from unix file :
    1) OPEN DATASET <dsn> FOR INPUT IN TEXT MODE.
    2) Within statement Do... Enddo use READ DATASET <dsn> INTO internal table
    3) Using internal table display the data in screen
    With Regards,
    Gandhi Subramani

  • Using scripts/image processor to output png files

    Hello,
    I need to resize a batch of pngs and would like to use scripts/image processor. My original files are png files. There appears to be no option for outputting pngs -but i must output the files as tranparent pngs.
    I'm using ps cs6 on mac os 10.6.8.
    Thanks!

    Well, I'll be…!   How come Russell Brown gets all the credit for it? ??! 
    Aha! Here are the clues:
    / ImageProcessorNG.jsx
    // $Id: ImageProcessorNG.jsx,v 1.88 2012/03/15 21:24:40 anonymous Exp $
    // Copyright: (c)2012, xbytor, Adobe Systems, Inc.
    // 2011-03-21
    // Written by [email protected]
    // c2007 Adobe Systems, Inc. All rights reserved.
    // Produced and Directed by Dr. Brown ( a.k.a Russell Preston Brown )
    // Written by Tom Ruark and Mike Shaw
    // UI Design by Dr. Brown

  • I have a recorder that outputs wma files. How can I get garageband to use my wma files?

    I have a recorder that outputs wma files. How can I get garageband to use my wma files?

    I don't think that GarageBand can use wmas, but there's always good old conversion, and GarageBand can definitely use mp3s. Personally, I recommend media.io for stuff like this, but of course it depends on the size of your files. Otherwise I don't know that there's anyway to get GarageBand to work with them...

  • XML Output  File using PLSQL

    I like to generate an XML output file using the PLSQL. Can any one help with an example (using EMPand DEPT). I tried the forum but seems confusing to me...
    This is URGENT so please rush!

    Please refer to the following post:
    page 0 security: authorization scheme not applied to other pages

  • ABAP Query output to XML file using Business connector

    Hi All,
    I would request your help on to know, how can I read the output of ABAP query executed in SAP system via Business connector and then generate a XML file.
    Also the existing business connector system, generates the XML file in encoding iso-8859-1. Where as customer wants the output XML file in encoding windows-1252.
    Please help with your valuable ideas.
    Thanks,

    Hello,
    possible solution:
    1. create a remote function module (FM) in SAP which returns your needed data
    2. create outbound map in BC for this FM
    3. call this FM from BC in a flow
    3. extract the result to XML (e.g. with service recordToDocument)
    CSY

  • How to print Barcode using SAPscript?

    hello, everyone.
    I have some questions.
    now, I have to print some doc. that described by barcode in sapscript form.
    so, try to test in t-code so10
    input value SAPSCRIP-BARCODETEST, ST, EN.
    and click 'print-preview'
    result is correctly output in pint privew.
    but when I print dis priviewed doc. disappeared barcode image.
    is this O.K??
    I have to do something?? (Add DLL file, barcode font or etc....)
    I don't know how to print barcode using SAPScript. anybody solve this problem.please.
    p.s this system is SAP ECC 6.0 only ABAP.
    printer setting is front-end print.

    hello, everyone.
    I have some questions.
    now, I have to print some doc. that described by barcode in sapscript form.
    so, try to test in t-code so10
    input value SAPSCRIP-BARCODETEST, ST, EN.
    and click 'print-preview'
    result is correctly output in pint privew.
    but when I print dis priviewed doc. disappeared barcode image.
    is this O.K??
    I have to do something?? (Add DLL file, barcode font or etc....)
    I don't know how to print barcode using SAPScript. anybody solve this problem.please.
    p.s this system is SAP ECC 6.0 only ABAP.
    printer setting is front-end print.

  • Printing tab in Bar Code using SAPScript

    Hi,
    We are trying to print information from multiple fields in Bar code (using Code128 symbology) on our Utility Invoices, printing of which is done using SAPScript.
    Our objective is that when accepting payment using FPCJ transaction, the Cash Desk Operator will use a Bar Code Scanner and import relevant invoice data into multiple fields.
    However, for that to happen, it is necesary to print tab feeds between data of contiguous fields using Bar code.
    We have tried printing tab feeds in Bar Code using hexadecimal '09'. But it has not helped. Can anybody suggest how one can print tab feeds in Bar Code using SAPScript?
    Thanks in advance,
    Arijit Mitra

    Hi
    See the doc related to BARCODE printing and do accordingly
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    Reward points if useful
    Regards
    Anji

Maybe you are looking for

  • Price Updation in Info-Record from Purchase Order

    Hi Experts, Please Suggest ur Valuable inputs. 1) Created a Material 2) Created a Vendor 3) NOT MAINTAINED Info-Record 4) Manually Entering  the Price in Purchase Order 5) Raising a Purchase Order with respect to that Vendor with Info-Record Tick. No

  • Creating a new page and new layout in a Parent/Child report.

    Hi, Currently I have a Parent/Child Report in Oracle Reports 6i. The report shows Contracts as the parent and the detail of the contracts are the Ads. Sometimes there are many ads which extend the contract to another page. Just a normal Parent/Child

  • Criteria with Master Detail

    Using windows Jdev 11.1.1.4 in application JSF. I have two Objects View linked by View Link. First View is Master and second is Detail. I don' t use "Entity Usage". I defined field by sql statement (in Object View into field Info I view Calculated...

  • Possible to get exchange type E & M in difference row

    Hi guys, It that any possible we get 2 Exchange rate type ( 'E' & 'M') in the report? When we run the reports, we entered the variable which we select one of the exchange rate, (M or E) Is that possible when we select 'M' in the variable, certain of

  • Projecting a keynote presentation

    When connecting to an external projector to give a keynote presentation  sometimes it works perfectly and then with other projectors all I get projected is my desktop background but no icons, and so cannot project the presentation. is there a solutio