Print PDF out put file

Hi all
I am using below to generate PDF output file
String s3 = oapagecontext.getParameter("RtfTemplateName");
//Generate the PDF Report.
if ("PDF".equals(ReportOutputType))
TemplateHelper.processTemplate(((OADBTransactionImpl)oapagecontext.getApplicationModule(oawebbean).getOADBTransaction()).getAppsContext(), "APP_NAME", s3, "en", "US", inputstream, (byte)1, (Properties)null, bytearrayoutputstream);
is there any parameter or anything by which i can automatically print the PDF without having to actually click Print on the PDF file ??
Please help
Thanks

Use Standard Program RSTXPDFT4 in SE38 / SA38 with Sppol Request Number to convert OTF Purchase Order Format to PDF Format.
In order to send PO, your Basis team must configure the system first so that external email can be send out from SAP.  If it is not configured, no settings you do on MM will work.
1. You must maintain email address in vendor master data.
2. The same applies to your user master data.  For the output type for default values, a communication strategy needs 
to be maintained in the Customizing that supports the e-mail. You can find the definition of the communication strategy in the 
Customizing via the following path: 
(SPRO -> IMG -> SAP Web Application Server -> Basic Services -> Message Control -> Define Communication Strategy). 
As a default, communication strategy CS01 is delivered. This already contains the necessary entry for the external communication. Bear in mind that without a suitable communication strategy it is not possible to communicate with a partner via Medium 5 (external sending).
3. Use the standard SAP environment (program 'SAPFM06P', FORM routine 'ENTRY_NEU' and form 'MEDRUCK') as the processing routines.
4. In the condition records for the output type (for example, Transaction MN04), use medium '5' (External send).
5. You can use Transaction SCOT to trigger the output manually. The prerequisite for a correct sending is that the node is set correctly. This is not described here, but it must have already been carried out.
6. To be able to display, for example, the e-mail in Outlook, enter PDF as the format in the node.
Regards,
Ashok

Similar Messages

  • Out put file is not genrated when calling xml reports from OAF page

    Dear all
    i am calling xml reports from OAF page
    the out put file is not generated
    i am writing this code
    public int tradingrequest(String quoid, String costoder,int orgid)
    try
    OADBTransaction tx = (OADBTransaction)getOADBTransaction();
    java.sql.Connection pConncection = tx.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(pConncection);
    String applnName =
    "XXCRM"; //Application that contains the concurrent program
    String cpName = "XXCRM_COSTSHEET"; //Concurrent program short name
    String cpDesc =
    "Trading Costsheet Report XXCRM"; // concurrent Program description
    Number orgid1=new Number(orgid);
    // Pass the Arguments using vector
    Vector cpArgs = new Vector();
    cpArgs.addElement(quoid);
    cpArgs.addElement(costoder);
    cpArgs.addElement(orgid1.toString());
    // Calling the Concurrent Program
    int requestId =
    cr.submitRequest(applnName, cpName, cpDesc, null, false, cpArgs);
    tx.commit();
    System.out.println("Request ID is " + requestId);
    return requestId;
    } catch (RequestSubmissionException e)
    OAException oe = new OAException(e.getMessage());
    oe.setApplicationModule(this);
    throw oe;
    in controller i am writing this code
    OAMessageStyledTextBean y =
    (OAMessageStyledTextBean)webBean.findChildRecursive("quotationid");
    OAFormValueBean z =
    (OAFormValueBean)webBean.findChildRecursive("costorder");
    String quoid = y.getValue(pageContext).toString();
    String costorder = z.getValue(pageContext).toString();
    System.out.println("The quotation id and costing order are....." + quoid +
    " " + costorder);
    /*if click on run report button to run the report*/
    if ("Viewreport".equals(pageContext.getParameter(EVENT_PARAM)))
    if (tsflag.equals("Y"))
    int requestid = am.servicerequest(quoid, costorder, orgid);
    String url =
    "OA.jsp?akRegionCode=FNDCPREQUESTVIEWPAGE&akRegionApplicationId=0&retainAM=Y&addBreadCrumb=Y&REQUESTID=" +
    requestid;
    pageContext.setForwardURL(url, null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT, null,
    null, true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    when i call the report from oaf page the request id is coming
    when i click on view output i am getting this message
    Error
    The concurrent request 7335031 did not create an output file.
    WHEN I GOTO FIND REQUESTS PAGE QUERY THIS REQUEST ID I AM GETTING THE OUTPUT IN XM FILE
    Regards
    Sreekanth

    java.io.FileNotFoundException: \..\..\..\xdoAqdFFZfuuJ051010_0628487460.fo (The system cannot find the path specified)
    MY CO code
    if("GenerateReport".equals(event))
    // Get the HttpServletResponse object from the PageContext. The report output is written to HttpServletResponse.
    DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
    HttpServletResponse response = (HttpServletResponse)sessionDictionary.selectValue(null,"HttpServletResponse");
    try {
    // Hashtable hashtable = new Hashtable(1);
    // hashtable.put("TruckBookingRefNum",trucknum);
    // System.out.println("test"+trucknum);
    ServletOutputStream os = response.getOutputStream();
    // Set the Output Report File Name and Content Type
    String contentDisposition = "attachment;filename=LF Cargo Summary Report.htm";
    response.setHeader("Content-Disposition",contentDisposition);
    response.setContentType("application/HTML");
    // Get the Data XML File as the XMLNode
    XMLNode xmlNode = (XMLNode) am.invokeMethod("getTestDataXML");
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    xmlNode.print(outputStream);
    ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
    ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
    System.out.println(" ByteArrayInputStream.ByteArrayOutputStream"+pdfFile+inputStream);
    //Generate the PDF Report.
    TemplateHelper.processTemplate(
    ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
    "LFCUST",
    "XXLFCARSUM_TARGET",
    "English",//((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
    "US",//((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
    inputStream,
    TemplateHelper.OUTPUT_TYPE_HTML,
    null,
    pdfFile);
    // hashtable);
    System.out.println(" TemplateHelper");
    // Write the PDF Report to the HttpServletResponse object and flush.
    byte[] b = pdfFile.toByteArray();
    System.out.println(" byte"+b);
    response.setContentLength(b.length);
    os.write(b, 0, b.length);
    os.flush();
    os.close();
    pdfFile.flush();
    pdfFile.close();
    catch(Exception e)
    System.out.println(" inside catch");
    response.setContentType("text/html");
    throw new OAException(e.getMessage(), OAException.ERROR);
    pageContext.setDocumentRendered(true);
    Edited by: user9367919 on May 13, 2010 10:31 AM

  • How should we get the out put file-name same as in put file-name in file to

    Hi frnds,
    having hundreds of files in the sender system with different names, how should we get the out put file-name  in the receiver system same as the in put file-name in file to file scenario ?
    Thanks in advance.
    truly,
    snrvakiti.

    Hi,
    In Receiver File Adapter you can set under 'Adapter-Specific Message Properties'
    check Use Adapter-Specific Message Properties
    check Fail on Missing Adapter Message Properties
    Check File Name
    Have a look at this link,  [File_to_File|http://allsapnetweavernotes.blogspot.com/2008/09/how-can-i-access-filename-from-fileftp.html]
    Regards,
    P.Rajesh

  • Out put file with three extra blank line

    Hi Expert
    i am snding some article data from sap to ftp location.from proxy class the internal table has all correct record .but in the out put file three blank line is coming with all the record at the end.
    i have the following cc parameter
    File.fieldNames Trans_type,Transfer_no,SrcSt_no,DestST_no,LPN_No,Transfer_date
    File.fieldFixedLengths 1,30,10,10,10,8
    then i added
    File.endSeparator '0'.
    but still 3 blank line is coming in the output file.
    please suggest somthing.

    Hi !
    Why are you using File.endSeparator '0'. ?
    Are you sure your input data doesn't have those 3 blank records in the end? Check the message payload in the sxmb_moni transaction.
    Regards,
    Matias.

  • Can't print PDF or word file

    my 6500 all in one printer cant print pdf , excel or word file format doc via e-print, what can i do ?

    Hi wongwilliamcw,
    What model of 6500 printer do you have (E709 or E710)?
    Check out the following document below.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02721964
    I am an HP employee.
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

  • OC4J Report Server is not saving the PDF out put

    Hi everybody,
    I have a master report running under OC4J.Under this master report 1000's of other reports are runninng by using the srw.run_report.Report name and other required parameters are taking from the database.My aim is to send all generated PDF reports by using the javamail.My problem is report server is not saving any reports until the completion of the master report.Once the master report is completted we can see all the reports under the specified folder, before that we can not see the out put in the folder .So the above reason my mailing part is getting faild because of system cannot find the specified file in that particular path
    Hi anybody know how to save each pdf report in a folder insted of waiting the completion of entire report
    Is any particular report configuration is required for that?
    srw.runreport is running in the batch mode
    thanks in advanceee
    regards
    mathew
    Message was edited by:
    Mathew Thomas

    Please helppp meee

  • Is it possible to batch print .pdf AND .doc files together?

    I need to let users to batch print a set of files that includes both .PDFs and .DOCs. Since <cfprint> allows .PDF files only, what would you suggest?
    Thanks!

    el_sim wrote:
    Unfortunately, it's not an option because I need to allow users to batch print and I have no info about their network printer configuration
    That raises a large RED Flag that you may be misunderstanding the <cfprint...> functionality.  <cfprint...> can NOT print to a printer that is configured to the clients computer.  So if that is what you are looking to do, you need to be looking at Client side technology.  But be aware, that current, common, browser based web applications generally have very limited connections to client hardware.  If you are willing to get into Flex, Flash, Air (or another company's technologies) you could probably do more.  But HTML and JavaScript currently do not have much access to the hardware of a client computer.
    The <cfprint...> tag is designed to send a print job from the SERVER running the ColdFusion application to a printer connected to that server.  IF you are writing programs with no knowledge of the server network configurations (I.E. an application meant to be sold to various customers) this becomes much more difficult to do.  But if you are writing a CFML application to be run on a known network, which is what many of us do, then it should be pretty easy to know what printers are connected to the server running ColdFusion and figure out what capabilities those printers have.

  • Cs5 InDesign crashing when exporting print pdf and markup file?

    We just did our upgrade yesterday from cs4 to cs5. Two things that I have discovered so far that I haven’t been able to figure out.
    I need to create a pdf from a file...I go to export — print pdf — this QUITS (if I do the interactive pdf it works okay but I need a print ready one. I had to print a postscript file  — then distill it in acrobat — so far, knock on wood that works but is time consuming.
    I tried to export a — InDesign MarkUp file (imdl), the new interchange to go from 5 to 4 — I was thinking okay...I will just take the cs5 file back to cs4 and make the pdf there but when making the imdl file to open in cs4 I also crash.
    any help would be appreciated!

    I had a major problem with exporting CS5 Indesign interactive PDF doc (270pgs) it would crash reasonbly consistently, other times behave OK?  After many hours reading forums, and Adobe help desk I found my own work-around which I want to share (as I couldn't believe it was so simple and worked!)
    OK..so the doc has navigation buttons and hyperlinks all the way through....I Exported half the doc.  Then the other half.  Then I combined in Acrobat. 
    There it is....simple and boy am I happy now!!

  • Special charactors found in out put file of .xml file in file adapter

    Hi ,
    Dear all,
    I am working on Sender File adapter picking files from the multiple Directories which are specified in a single CC and these files are placed in the different receiver directories in different CC's metained paths of the receivers
    The Souce is XML.
    When I use  the receiver format as .csv,.txt it the out put is as excepted,when i give the receiver format as .XML the output file contents:PK   (An invalid character was found in text content. Error processing resource 'file:).
    Pl let me know how to tackle thsi situation.
    Thanks,
    Srini

    Hi
    Also try with the following UDF.
    public class XmlUtil {
        char[] specialCharacters = { '&', '<'>', '\'' };
        String[] replacementStrings = { "&", "<">", "&apos;" };
        public static String sanitizeText( String text ) {
            StringBuffer buffer = new StringBuffer( text );
            for( int i = 0; i < buffer.length(); i++ ) {
                for( int k = 0; i < specialCharacters.length; k++ ) {
                    if( buffer.charAt(i) == specialCharacters[k] ) ) {
                         buffer.replace( i, i + 1, replacementString[k] );
                         i += replaceString[k].length;
                    } else if( (int)buffer.charAt(i) > 128 ) {
                         String replacement = "&#" + (int)buffer.charAt(i) + ";";
                         buffer.replace( i, i + 1, replacement );
                         i += replacement.length();
            return buffer.toString();
    Regards
    Abhishek Mahajan

  • Out put file is not coming

    Hi all,
    if user is l running one report and it will run successfully.
    then my doubt is at that time output will not generate.
    At that time what i will do?
    and suppose out put will button is disable .then what i will do at that time?
    regards.
    vijay

    Hi follow the following thread...this thread topic is more or less same...If the issue is resolved, you will come to know how to debug this type of issues....
    output file
    output file

  • F380 printer won't print PDF or Doc files

    My printer won't print Docx files sent through email.  It also has trouble printing PDF documents.  It quits after the first page, and no matter what I do won't print the other pages. I'm using a Toshiba Satellite laptop with Windows Vista. I tried HP print doctor, but it couldn't find the problem.  I went to the HP site but found no new drivers for my exact printer, and a warning that if I uninstalled my current driver and installed one of theirs, they wouldn't provide any support, since my OS is older than Windows7.   I noticed that the person sending me these files has windows 10 installed on his computer.  (For what it's worth.) Printer works fine otherwise. Thanks!

    Hi , Welcome to the HP Support Forums! I see you are unable to print PDF files to your HP Deskjet F380, and you computer running the Windows Vista Operating system. When you try to print, they stop after one page. I would like you to go ahead and follow the steps listed below: 1. Perform a Clean Boot: How to perform a clean boot in Windows  2. Now go ahead and use the System File Checker: Use the System File Checker tool to repair missing or corrupted system files  UNINSTALL 1. Unplug the USB if using a direct connection.2. Remove the HP F380 software from your computers Control Panel's Uninstall a program option.3. Restart the computer.4. Make sure all the F380 software is gone from the programs list as well as your HP folder listed under the All programs in your Start Menu.5. Now go ahead and download the software and drivers for your F380 (DO NOT plug in USB until the software prompts you to):HP Full Feature Software and Drivers6. Go ahead and print a test page.7. If you are unable to print a test page, please run the HPClick here to download and run the HP Print and Scan Doctor > www.hp.com/go/tools-- It was designed by HP to provide users with the troubleshooting and problem solving features needed to resolve many common problems experienced with HP print and scan products connected to Windows-based computers. Please let me know if this was successful, are you now able to print pdf files? I will watch for your reply. Thank you,

  • Getting multiple notepad out put files

    hello
    i'm trying to make a java program that writes out multiple files to a folder in my documents. However, i'm confused on how to make a for statement that would output a lot of files, while making them still write and not have to replace the previous one.......
    this is my program
    import java.io.*;
    public class notePad{
    public static void main(String args[]){
    try{
    File infile = new File("C:/Documents and Settings/c1s5/My Documents/Allah/sample.txt");
    FileOutputStream fos = new FileOutputStream(infile);
    PrintWriter out = new PrintWriter(fos);
    out.println("This is the sample text in the notepad");
    out.flush();
    out.close();
    }catch(Exception e){}
    and i want to be able to manipulate the sample so that it goes sample 1...sample 2..for every time it runs though the for statement....also, i want to make it output more than one file....anyone have an idea how i can do this...its my fourth month in java...so i'm a noob
    hwrd

    import java.io.*;
    public class notePad{
      public static void main(String args[]){
        try{
          for(int i=0; i<how many file; i++)
            File infile = new File("C:/Documents and
            Settings/c1s5/My Documents/Allah/sample.txt" + i);
            FileOutputStream fos = new FileOutputStream(infile);
            PrintWriter out = new PrintWriter(fos);
            out.println("This is the sample text in the
            notepad");
            out.flush();
            out.close();
        }catch(Exception e){}
    Change the file name for each one. as long as you use the same hard coded file name it will overwrite the previous one. The example is hideous and very rought but should give you the idea.
    Hope this helps,
    PS.

  • Canon printer wont print PDF and Word files... sometimes.

    I face a very special problem with my iMac and my Canon printer (Pixma MG5350): Since a few weeks, the printer wont print most PDF files correctly, the same with existing Word files. A blank or blurred sheet is coming out of the machine. But: When I create a brand new Word file and fill it with text, the printer prints it clean and neat. The same with the official Canon test prints – no troubles at all. I have also tried to sort out the problem with the help from Apple: http://support.apple.com/kb/TS3147?viewlocale=de_DE, without success. Glad about every help!

    My next suggestion would be to try an alternate driver to the Canon.
    There is the Gutenprint v5.2.9 suite which is free and lists the MG5300 series as a supported model. You could download and install this driver suite and add the Gutenprint MG5300 driver and see if this gives you the same problem.

  • How to print the out put for each customer in table

    Dear SDN Team Members!
    I've created a report and the output is displayed on the smartform for the same.
    In this report, I've selected a list of  customers and the report has to print the list of transactions being made by each customer in Smartform. 
    These details must be printed seperately for each customer. 
    I'm thinking of control statement AT NEW & AT END.  But i don't know how to use them exactly so that the output is displayed seperately for each customer in the Smartform.
    Please provide syntax and points will be awarded for.
    Best Regards!

    Hi Krsihna,
      Its simple.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting formname = '<form name>'
    importing FM_NAME = lv_func_name.
    loop at itab.
    at new customer.  "customer must be the fisrt field in the itab and itab mus be sorted by customer.
    call function lv_func_name
    endat.
    endloop.
    Regards,
    Ravi

  • Invalid characters found in the generated out put file

    hi ,
    I had written  a report to generate a file using open dataset , And In the generated file there are invalid characters generated for few fields. can any body help me with this.
    regards
    nelakonda

    Hi,
    Try below code.
    DATA : l_w_file LIKE rlgrap-filename .
      FIELD-SYMBOLS : <l_w_record> TYPE string,
                      <l_table>    TYPE STANDARD TABLE,
                      <l_line>     TYPE ANY,
                      <l_field>    TYPE ANY.
      DATA         : new_table TYPE REF TO data   ,
                     new_line  TYPE REF TO data   .
      TYPE-POOLS : slis.
      DATA      : wa_fieldcat             TYPE lvc_s_fcat         ,
                  wa_fieldcat1            TYPE slis_fieldcat_alv  ,
                  fieldcat                TYPE slis_t_fieldcat_alv,
                  gt_fieldcat             TYPE lvc_t_fcat         .
      DATA : l_w_length TYPE i.
      DATA : wa TYPE string.
      CLEAR : p_subrc .
      l_w_file = p_file .
      OPEN DATASET l_w_file FOR INPUT IN BINARY MODE.
      IF sy-subrc NE 0 .
        p_subrc = 1 .
        EXIT.
      ENDIF .
      ASSIGN wa TO <l_w_record> CASTING.
      DO.
        READ DATASET l_w_file INTO <l_w_record>.
        CONDENSE <l_w_record>.
        IF sy-subrc EQ 0.
        ELSE.
          EXIT.
        ENDIF.
        APPEND <l_w_record> TO p_it_itab.
    *This method will create a structure required for the
    *runtime table generation
        l_w_length = STRLEN( <l_w_record> ).
          CLEAR wa_fieldcat.
       wa_fieldcat-fieldname    =  wa.
       wa_fieldcat-seltext      =  wa.
          wa_fieldcat-outputlen    =  l_w_length          .
          APPEND wa_fieldcat       TO gt_fieldcat         .
          CALL METHOD cl_alv_table_create=>create_dynamic_table
            EXPORTING
                        I_STYLE_TABLE             =
              it_fieldcatalog           = gt_fieldcat
                        I_LENGTH_IN_BYTE          =
            IMPORTING
              ep_table                  = new_table
            EXCEPTIONS
              generate_subpool_dir_full = 1
              OTHERS                    = 2
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    *The structure is assigned to the table <l_table>
          ASSIGN new_table->* TO <l_table>.
    *Structure of Work Area of the table created.
          CREATE DATA new_line LIKE LINE OF <l_table>.
    *The structure of work area is assigned to <l_line>
          ASSIGN new_line->* TO <l_line>.
          MOVE wa TO <l_line>.
          ASSIGN COMPONENT wa OF STRUCTURE <l_line> TO <l_field>.
          INSERT <l_line> INTO TABLE <l_table>.
          CLEAR : <l_w_record>.
      ENDDO.
      CLOSE DATASET l_w_file .
      IF sy-subrc NE 0 .
        p_subrc = 1 .
        EXIT .
      ENDIF .
    Refere above code as per your requirement.

Maybe you are looking for

  • Problem in Post-Room Creation

    Hi All, I have created a room using the "Room Creation" Wizard. on the first screen i had Name : Description: Owner: Categories: Template: Template Description: and on the next screen i had Room Type: Room members: i filled all the above fields and c

  • Stop Firefox from reverting back to Google Search Results when opening a page from results list

    When I click on one of the results from a Google search, I have it open the page in a new window. The page opens in the new window just fine, but instead of letting me view the page in the new window, Firefox takes me back to the Google Search result

  • Running scripts concurrently from various workstations(OTM)

    We have a server setup for OATS and we are accessing the OTM given by admins. But when when we submit the scripts from workstation the playback is running on server not on workstation. what setup is required on workstations to see the script playback

  • Message Manager

    Hi, I have few q' s which i felt will get answered over here. a) Is it possible to count the number of messages that gets collected by the message manager at the run time. b) Is it possible to stop the further collection of messages using message man

  • B85-G43 A2 boot error when connecting more then one SATA driver

    Hello everyone please help me. As the title says, whenever i connect more than one sata driver (hdd or dvd) i get te A2 boot freeze.... Already changed cables, hard drives, and problem persist! Sorry for my bad english, not my main language. Board: M