Print the contents of secondary screen on click of button

hi,
        i want to print the contents of the secondary screen which is stored a table int_tab when user clicks on the button on the status bar defined by me.
I want to knw what code should i write to print the contents ?
Is there any function module ?
Or any coding apart from function module call?
And also if any configurations are required?
Please reply.
urgently required
thank you experts.................

Hi ,
Go throuh the code .  Important part is the command
new-page print on
AND
'GET_PRINT_PARAMETERS'  .
Try to use this logic inur code .
REPORT demo NO STANDARD PAGE HEADING.
DATA: spfli_wa TYPE spfli,
      sflight_wa TYPE sflight.
DATA: print_parameters TYPE pri_params,
      valid_flag       TYPE c LENGTH 1.
START-OF-SELECTION.
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    IMPORTING
      out_parameters       = print_parameters
      valid                = valid_flag
    EXCEPTIONS
      invalid_print_params = 2
      OTHERS               = 4.
  IF valid_flag = 'X' AND sy-subrc = 0.
    SELECT carrid connid
           FROM spfli
           INTO CORRESPONDING FIELDS OF spfli_wa.
      WRITE: / spfli_wa-carrid, spfli_wa-connid.
      HIDE:    spfli_wa-carrid, spfli_wa-connid.
    ENDSELECT.
  ELSE.
  ENDIF.
AT LINE-SELECTION.
  NEW-PAGE PRINT ON PARAMETERS print_parameters
                    NO DIALOG.
  SELECT *
         FROM sflight
         INTO sflight_wa
         WHERE carrid = spfli_wa-carrid AND
               connid = spfli_wa-connid.
    WRITE: / sflight_wa-carrid, sflight_wa-connid,
             sflight_wa-fldate ...
  ENDSELECT.
  NEW-PAGE PRINT OFF.
Regards ,

Similar Messages

  • How to print the content of a textarea by clicking on a button?

    Hello, i'm currently developping a HTML Editor in java but i've got a problem with printing job... Does anyone know a simple code to print the content of a textarea by clicking on a button?
    for instance:
    JTextarea textarea = new JTextArea();
    JButton print = new JButton ();
    file_menu.add(print) ;
    print.addActionListener(
    new ActionListener()
    public void actionPerformed(ActionEvent event)
    ////----> what could i put here to print the content of my textarea named 'textarea' ?
    I've searched on the web but i didn't find it...
    Thanks very much for your help...
    S�bastien

    I've never tried it, but here's an article that might help:
    http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html

  • When using the camera in lock-screen(double click home button), iPhone 4s somehow automatic Respring ?

    Same as the topic! Need help APPLE

    Ok, Here is the problem.
    When I want to use the camera of my iphone4S, then, I launch my camera app in my lock screen. My phone suddently turn into the restart screen(no apple logo) just springboard loading. Then the phone return to the lock screen as usual. This happen to me several times.

  • How to print the content of a textarea in java?

    Hello, i'm currently developping a HTML Editor in java but i've got a problem with printing job... Does anyone know a simple code to print the content of a textarea by clicking on a button?
    for instance:
    JTextarea textarea = new JTextArea();
    JButton print = new JButton ();
    file_menu.add(print) ;
    print.addActionListener(
    new ActionListener()
    public void actionPerformed(ActionEvent event)
    ////----> what could i put here to print the content of my textarea named 'textarea' ? Does anyone know a class i could implement here? for instance: 'Print print = new Print(textarea);'
    I've searched on the web but i didn't find it...
    Thanks very much for your help...
    S�bastien

    public class TA extends JTextArea implements Printable{
    public TA(){
    super();
    this.setPreferredSize(new Dimension(500,500));
    public TA(int x, int y){
    super(x,y);
    public int print(Graphics g, PageFormat pf,int pi){
    if (pi >= 1) {
    return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D) g;
    g2.translate(pf.getImageableX(),pf.getImageableY());
    Font f = new Font("Monospaced", Font.PLAIN,6);
    g2.setFont (f);
    g2.drawString(this.getText(),100,100);
    this.paint(g2);
    return Printable.PAGE_EXISTS;
    And use in Action Listener
    // get the print job
    if(pj.printDialog()){
    PageFormat pformat = pj.defaultPage();
    pformat.setOrientation(PageFormat.PORTRAIT);
    System.out.println(pj.defaultPage());
    pj.setPrintable(ta,pj.pageDialog(pformat));
    try{
    pj.print();
    catch(PrinterException p){

  • Really need help... How to print the 'content' of a JTextArea?

    Hello, i'm currently developping a HTML Editor in java but i've got a problem with printing job... Does anyone know a simple code to print the content of a textarea by clicking on a button?
    for instance:
    JTextarea textarea = new JTextArea();
    JButton print = new JButton ();
    file_menu.add(print) ;
    print.addActionListener(
    new ActionListener()
    public void actionPerformed(ActionEvent event)
    ////----> what could i put here to print the content of my textarea named 'textarea' ?
    I've searched on the web but i didn't find it...
    Thanks very much for your help...
    Sebastien Roupin

    thank you very much for your help... i'm checking this samples...
    Sebastien Roupin

  • ITS 6.1 :  Printing the contents in a  container in webgui

    Hai All,
    I have a  module pool program which displays, employees details with there photo in a container. I used method  "CALL METHOD html_control->execwb." to print the content within the container. The program works fine when i run the program in SAP gui. I have created the transaction code as "SAP GUI for HTML"
    The problem is we are using ITS server 6.1, when i run the same program in webgui, the print functionality is not working. The reason being the above method is related to OLE, which will not work in "SAP GUI FOR HTML".
    We can print the content of the container by right clicking whithin the container and selecting print. Is it possible to have that functionality by clicking a button in the screen. That is when the user clicks a button in the screen the content of the container should be printed.
    Please let me know, is there any solution for this.
    Thanks & Regards,
    H.K.Hayath Basha.

    Hi Hayath,
    this method is Windows only. Neither webgui nor java gui support the method because it based on OLE.
    But you can insert a link in the HTML and execute the print method of the window object when clicking on the link.
    Example:
    <html><head><title>Test</title>
    </head><body>
    <a href="javascript:window.print()">Print this page</a>
    </body></html>
    Regards,
    Klaus
    P.S.: I would recommend to upgrade to ITS 6.20. ITS 6.10 is no longer supported by SAP and SAP will refuse any OSS message regarding ITS 6.10.

  • I have a MG6320 Printer. It will not print the contents of an email, only the outline

    I have a Canon MG 6320 printer. When I call up an email in GMail, it will not print the contents of the email, only the words and figures displaye don rails down the side and at the top. Can anyone tell me what I can do to change this?
    James O'Shea

    Hi JOShea432,
    In order to assist with this issue we will need more information.  Is the problem only occuring in Gmail?  If so, are you using the print button from within Gmail or are you using the print option under the File menu in your web browser?
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • When I first open Firefox it is fine but if I open a second tab to search another site I get a white screen and have to continually click 'back', click the site link, white screen, back, click the link, white screen and so on.

    When I first open Firefox it is fine but if I open a second tab to search another site I get a white screen and have to continually click 'back', click the site link, white screen, back, click the link, white screen and so on.

    This can also be a problem with the files [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    Delete [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
    You will have to redo App Tabs and Tab Groups after deleting sessionstore.js.
    See:
    * http://kb.mozillazine.org/Session_Restore

  • How to print the content of LinkedList int[] and LinkedList LinkedList ?

    Hi guys, its been a long time since i posted here, and now im coming back to programming using java. My problem is, how can i print the content of the list?
    Example:
    LinkedList<int[]> list = new LinkedList<int[]>;
    int[] input = {1,2,3,4,5};
    int[] input2 = {2,32,43,54,65};
    list.add(input);
    list.add(input2);
    how can i print all the content of the linkedlist?
    Please help me..I know its a dumb question but i really dunno how.
    here is the code:
    import java.util.LinkedList;
    import java.util.Scanner;
    import java.util.Arrays;
    public class Test{
         static void printThis(String[] in){
              System.out.print("Value: ");
              for(int i = 0;i<in.length;i++){
                   System.out.print(in[i] + " ");
              System.out.println();
         static void reset(String[] val){
              for(int i = 0;i<val.length;i++){
                   val[i] = "";
         public static void main(String[] args){
              LinkedList<String[]> list = new LinkedList<String[]>();
              LinkedList<String> listTrans = new LinkedList<String>();
              System.out.print("Enter the number of records: ");
              Scanner s = new Scanner(System.in);
              int numOfRecords = s.nextInt();
              System.out.print("Enter the number of records per run: ");
              s = new Scanner(System.in);
              System.out.println();
              int numOfRecordsInMemory = s.nextInt();
              String[] getData = new String[numOfRecords];
              String[] transferData = new String[numOfRecordsInMemory];
              int numOfRuns = 0;
              int counter = 0;
              for(int i = 0;i<numOfRecords;i++){
                   counter++;
                   System.out.print("Enter value number " + counter + ": ");
                   Scanner scan = new Scanner(System.in);
                   getData[i] = scan.next();
                   listTrans.add(getData);
              if(getData.length%numOfRecordsInMemory == 0){
                   numOfRuns = getData.length/numOfRecordsInMemory;
              }else if(getData.length%numOfRecordsInMemory != 0){
                   numOfRuns =(int)(getData.length/numOfRecordsInMemory)+ 1;
              System.out.println();
              System.out.println("Number of Runs: " + numOfRuns);
         int pass = 0;
         System.out.println("Size of the main list: " + listTrans.size());
         while(listTrans.size() != 0){
              if(listTrans.size() >= numOfRecordsInMemory){
                   for(int i = 0;i<numOfRecordsInMemory;i++){
                        transferData[i] = listTrans.remove();
                   System.out.println("Size of the list: " + listTrans.size());
                   printThis(transferData);
                   System.out.println();
                   Arrays.sort(transferData);
                   list.add(transferData);
                   reset(transferData);
              }else if(listTrans.size() < numOfRecordsInMemory){
                   pass = listTrans.size();
                   for(int k = 0;k<pass;k++){
                        transferData[k] = listTrans.remove();
                   System.out.println("Size of the list: " + listTrans.size());
                   printThis(transferData);
                   System.out.println();
                   Arrays.sort(transferData);
                   list.add(transferData);
                   reset(transferData);
    //This is the part that is confusing me.
    //im trying to print it but its not working.
              System.out.println("Size of the next list: " + list.size());
    //          for(int i = 0;i<list.size();i++){
    //                    System.out.println();
    //               for(int j = 0;j<list.get(i)[j].length();j++){                    
    //                    System.out.print(list.get(i)[j] + " ");

    Here's the funnest, mabye clearest way you could do it: Use 2 Mappers
    package tjacobs.util;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import tjacobs.Arrays;
    public class Mapper <T>{
         public static interface MappedFunc<T> {
              void map(T value);
         public Mapper(T[] vals, MappedFunc<T> function) {
              this (new Arrays.ArrayIterator<T>(vals), function);
         public Mapper(Iterator<T> iterator, MappedFunc<T> function) {
              while (iterator.hasNext()) {
                   function.map(iterator.next());
         public static void main(String[] args) {
              String[] s = new String[] {"a","b", "c", "abc", "ab"};
              MappedFunc<String> func = new MappedFunc<String>() {
                   public void map(String s) {
                        if (s.toLowerCase().startsWith("a")) {
                             System.out.println(s);
              Mapper m = new Mapper(s, func);
    }

  • How to print the contents of a form(window)

    I'm devloping visitors application in java. After the data entry, I need to display the selected information from database along with the photo and take a printout so that it looks like a card.
    I know how to display the contents in a form. How do I print the contents of the form?
    -Thanx
    Hane

    in JComponent there is a method called print(Graphics g)
    you can use that with a Printable class
    read bout the java.print package in the java doc

  • How to print the contents of doubly-Linked List

    Hi
    I have a DLList consists of header , trailer and 10 linked nodes in between
    Is there a simple way to print the contents ie "the elements"
    of the list
    thanks

    In general you should write an iterator for every linked data structure for fast traversal. I'm guessing you're writing your own DLL for an assignment because one normally uses the LinkedList structure that is included in the api. Anyway, here is an example of how the iterator is implemented for a double linked list:
    http://www.theparticle.com/_javadata2.html#Doubly_Linked_Lists_with_Enumeration

  • How do i close the welcome to iMovie screen? Clicking on red button in upper left does nothing. SOS!  Thanks!

    How do I close the "Welcome to iMovie" screen?  Clicking on the red button in the upper left does nothing. SOS!  Thanks!

    "Continue" was hidden at the bottom of the welcome screen because my display was changed.  Some days I'm smarter than others.  Or.... :-) 

  • Can you print the contents of a blob in Bi Publisher

    For example, Bi Publisher generate a pdf file in apex that will print the contents of a blob.
    Let's say you have a record with test.xls in a blob, can I take the test.xls out of the record and have bi publisher print it.
    Thanks,
    Doug

    BI Publisher can add some blobs to a report, such as a .jpg / .gif / .png, but excel just doesn't make sense, nor do I think it would work.
    Tyler Muth
    http://tylermuth.wordpress.com
    "Applied Oracle Security: Developing Secure Database and Middleware Environments": http://sn.im/aos.book

  • Urgent: how to print the contents displayed in JTextPane

    hi all,
    i've a problem printing the contents typed in styled format in JTextPane, when i print the contents nothing is printed. can anyone tell how can i print the contents typed in styled format or so. the code for implementing the print is given below.
    class ContentsArea extends JTextPane implements Pritable {
       public int print(Graphics g, PageFormat pf, int pi) throws PrinterException {
          if (pi >= 1) {
             return Printable.NO_SUCH_PAGE;
          Graphics2D g2d = (Graphics2D) g;
          g2d.translate(pf.getImageableX(), pf.getImageableY());
          g2d.translate(pf.getImageableWidth() / 2,
                          pf.getImageableHeight() / 2);
          Dimension d = getSize();
          double scale = Math.min(pf.getImageableWidth() / d.width,
                                    pf.getImageableHeight() / d.height);
          if (scale < 1.0) {
              g2d.scale(scale, scale);
          g2d.translate(-d.width / 2.0, -d.height / 2.0);
          return Printable.PAGE_EXISTS;
    }i'd be grateful to all ppl who helps me.
    Afroze.

    What's the exact problem? The printer printing a blank sheet or the printer not doing anything at all? First make sure in the main program you've got something along the lines of...
    import java.awt.print.*;
    PrinterJob printerJob = PrinterJob.getPrinterJob();
    PageFormat pageFormat = printerJob.defaultPage();
    if(!printerJob.printDialog()) return; //not essential but lets the user tweak printer setup
    pageFormat = printerJob.pageDialog(pageFormat); //ditto
    printerJob.setPrintable(this, pageFormat);
    print(...);
    The above code should go in an ActionListener, triggered when the user hits a print button or menuitem. I'm guessing you already have something similar set up.
    Then your print(...) method should be similar to
    public int print(Graphics g, PageFormat pageFormat, int pageIndex)
         if(pageIndex>0) return NO_SUCH_PAGE;
         Graphics2D gg = (Graphics2D)g;
         gg.draw(whatever's going to be printed);
         return PAGE_EXISTS;
    Which it is, although yours has clever scaling stuff built in ) The only thing you're not doing is rendering the actual content.
    So if you want the contents of the textpane, it'd make sense to use something like g.drawString(myTextPane.getContents()); in the print method. Note it's g and not g2d, since Graphics2D has more complicated text handling routines.
    I'm no expert tho )

  • I need to print the contents of a text area

    i am trying to create an editor and one of the options is print, so i want to print the contents of the text area. can someone help

    See Printing the Contents of a Component in http://java.sun.com/docs/books/tutorial/2d/printing/index.html

Maybe you are looking for

  • Red light headphone jack problem iMac 27" 2011

    I have a problem with internal speakers. I searched forums and I think is a problema about the connector, the red light in headphone jack is on. I cannt hear from internal speakers sometimes and now it's allways. I need to plug a headphone or externa

  • Macbook Pro,USB Hub, Maschine, USB Turntable, Audio Interface

    So I have a MacBook pro 13 inch. I'm also using Maschine and a USB turntable to sample from. My problem is I want a USB audio interface so that the audio comes out clearer on these KRK Monitors I have. If I get a USB hub will I be able to use the mid

  • Cash with drawn from bank for petty cash use (FBCJ)

    HI, We are using cash journal (FBCJ)for all cash transactions. While withdrawing money from bank for petty cash use, howwe will handle in SAP. Client wants to prepare bank payment voucher for withdrawing cash from bank.  After preparing cheque by ban

  • Message waiting on Lync for Mac

    Hi everyone - I'm hoping someone can help. Although I can see I have a message waiting for my on Lync thanks to the number indicator on the app icon, there's no indication of who in my list of contacts actually sent me the message. I have a large lis

  • Auditing custom attributes in reports

    I have a custom attribute which resides in LDAP and when the user changes this attribute, I need to log both the old value and the new value. But auditlog report page I am seeing just the new value, how do I display old value in the changed attribute