How to Print the whole view content from a button on the View Layout

Dear All,
Good Morning All
I am New to WebDynPro.Solution needed Urgently
How to take print whole view content(lay out) in
webdynpro application.i.e whatever it may be tablecontent or label or inputfield .
Could you send the coded part briefly step by step from the beginning itself i.e
i put the button in the view lay out below the printed parts(label or inputfield) name like show preview .
Now my Question is what should i write in show preview function to take the print in label fields in the webdynpro view lay out
B'cos i am new to webdynpro.Help me
Thx in advance
Regards
Dhinakar

Web Dynpro by default does not provide the option of printing the view content.
However still you have a round about way of doing it. Create the an html page similar to the Web Dynpro page. Store the code into a String variable.
String html="<html> ....<scripts>window.print()</scripts></html>";
bytes[] source=html.getBytes();
try{
byte[] b=new byte[1];
IWDCachedWebResource res=WDWebResource.getWebResource(b,WDWebResourceType.HTML);
String url=res.getURL();
}catch (WDURLException e) {
          // TODO: handle exception
Now open the url in a new window and that would print the content of the html page.
Regards,
Noufal

Similar Messages

  • How to print the single layout in N no times

    Hi,
    I have developed 1 cheque printing report using developer6i for Oracle Applications i want to print the same output 4 times
    1st output will directly printon the cheque and
    2nd output should contain the note as "ORIGINAL" and it should come on a A4 paper
    3rd should contain as the "FOR ACCOUNTS", and it should come on a A4 paper
    4th should contain the "FOR SUPPLIER" and it should come on a A4 paper
    does any body know how to get this output it will be a great help if any body through some light on this.
    Regards,

    I found the following thread discussing sending report to multiple printers.
    Re: Printing Report Out Put on Different Trays
    I have in the past defined each printer tray as a separate printer in order to control the paper type.
    Maybe you could define the first page output as the check output to one printer then send following three pages as the A4 printer, repeating the frame for each literal.
    Message was edited by:
    user623321

  • How can I acess my ipad content from the pc, without enter the security code on ipad? I broke the screen and it doesn´t work. theres a way to enter the code on the pc?

    how can I acess my ipad content from the pc, without enter the security code on ipad? I broke the screen and it doesn´t work. theres a way to enter the code on the pc? thank you

    No. Get it fix by making an appointment with the Apple genius bar.

  • How to print the script in condensed mode

    Hi to all,
    Pls help me.
    How to print the script in condensed mode and particular window only print in the condensed mode.

    Hi,
    Hi
    It will remove the blank spaces in front of the variable
    and if you use the extension NO-GAPS
    It will remove all the blank spaces in the variable field.
    DATA: ws_val1 type char12.
    ws_val1 = ' 100 123'.
    Condense ws_val1.
    Write / ws_val1.
    Condense ws_val1 no-gaps.
    write / ws_val1.
    It will give output as
    100 123
    100123
    The CONDENSE statement deletes redundant spaces from a string:
    CONDENSE c NO-GAPS.
    This statement removes any leading blanks in the field c and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
    Please check this link for sample code.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33e6358411d1829f0000e829fbfe/content.htm
    Regards,
    Raj.

  • How to print the components in scrollpane

    hi there,
    can anyone tell me how to print the scrollpane components, i mean the headers & the main view of the component. i've a scrollpane with the following code and i want to print the components:
    JScrollPane pane = new JScrollPane(aTextPane);
    pane.setRowHeaderView(aLineNumberComponent);my requirement is i've a editor & lineno component as textpanes and added to scrollpane & when asked to print it should print the lineno component which resides in scrollpane's row header & the editor textpane which is the main view in the scrollpane. how can i achieve this?
    i'd would appreciate any suggestions & codes given.
    thanx in advance.

    After adding/removing components to/from a panel try:
    panel.revalidate();
    panel.repaint() // sometimes this is also needed, I'm
    not sure whyI'm not certain, but I think that panel.revalidate() implicitly calls repaint() only if something actually changed in the layout. If nothing changed, it sees no reason to repaint; hence, if something changed in appearance but not in layout, you have to repaint it yourself.
    Or something like that. I'm no expert. ;)

  • How to print the list shown in the finder

    I work as a photographer. For my clients I burn the pictures on DVD / CD.
    Some of my clients want a indexprint from the folder on the disk.
    How can print the list wich is shown in the finder? A screenshot doesn't work because there are often more items in the folder than the screen shows.
    A friend told me this isn't possible in OS X. In OS9 this function was available, but removed in OS X.... ?
    Regards
    Walter
    G5 Dual   Mac OS X (10.4.8)   also Intel Imac

    Hi Walter,
    To make a list, choose all (COMMAND + a) in the window than "copy" and "paste" to TextEdit or MS Word, or directly into email.
    Also, If you drag a folder or entire volume onto the Print Setup Utility it will print it's contents.
    -mj
    [email protected]

  • How to print a text file contents using java.

    Using Input and Output streams I can add and retrive the contents to/from text file. But how to send this file contents to the printer or how to print the file.

    Example from my code:
       private void printErrorReport()
          PrintJob pjob = getToolkit().getPrintJob(m_frame,null,null);
          if (pjob != null) {
            Graphics pg = pjob.getGraphics();
            if (pg != null) {
              String s = detailsArea.getText();
              printLongString (pjob, pg, s);
              pg.dispose();
            pjob.end();
    // Utility method needed
       void printLongString (PrintJob pjob, Graphics pg, String s) {
         int pageNum = 1;
         int linesForThisPage = 0;
         int linesForThisJob = 0;
         // Note: String is immutable so won't change while printing.
         if (!(pg instanceof PrintGraphics)) {
           throw new IllegalArgumentException ("Graphics context not PrintGraphics");
         StringReader sr = new StringReader (s);
         LineNumberReader lnr = new LineNumberReader (sr);
         String nextLine = "       ";
         int pageHeight = pjob.getPageDimension().height;
         pageHeight -= 20;
         Font helv = new Font("Arial", Font.PLAIN, 12);
         //have to set the font to get any output
         pg.setFont (helv);
         FontMetrics fm = pg.getFontMetrics(helv);
         int fontHeight = fm.getHeight();
         int fontDescent = fm.getDescent();
         int curHeight = 0;
         try {
           do {
             nextLine = lnr.readLine();
             if (nextLine != null) {
               if ((curHeight + fontHeight) > pageHeight) {
                 // New Page
                 System.out.println ("" + linesForThisPage + " lines printed for page " + pageNum);
                 pageNum++;
                 linesForThisPage = 0;
                 pg.dispose();
                 pg = pjob.getGraphics();
                 if (pg != null) {
                   pg.setFont (helv);
                 curHeight = 0;
               curHeight += fontHeight;
               if (pg != null) {
                 pg.drawString (nextLine, 0, curHeight - fontDescent);
                 linesForThisPage++;
                 linesForThisJob++;
               } else {
                 System.out.println ("pg null");
           } while (nextLine != null);
         } catch (EOFException eof) {
           // Fine, ignore
         } catch (Throwable t) { // Anything else
           t.printStackTrace();
         System.out.println ("" + linesForThisPage + " lines printed for page " + pageNum);
         System.out.println ("pages printed: " + pageNum);
         System.out.println ("total lines printed: " + linesForThisJob);
         }

  • How to print the file name in sap

    Hi All,
    I have requirment like,
    there is a folder in my local system, inside that folder there are 10 Excel file like file1.xls,file2.xls..............file10.xls
    how to print the file name of all these file in SAp like
    file1.xls
    file2.xls
    file3.xls
    file4.xls
    file10.xls
    Appropriate points will be rewarded.
    Thanks in Advance
    Arun kumar

    Hi,
    Still you are facing any problem with this code expalin the problem with details , otherwise close this thread.
    Use Method <b>cl_gui_frontend_services=>directory_list_files</b> to read file names for a given directory
    after reading the files then Use FM : <b>RSPO_SX_OUTPUT_TEXTDATA</b> to create spool from internal table data and print the data.
    <b>sample code :</b>
    data: desktop_dir type string.
    data: ifiles type table of string.
    data: xfiles type string.
    data: count type i.
    data: filepath type string.
    call method cl_gui_frontend_services=>get_desktop_directory
      changing
        desktop_directory    = desktop_dir .
    call method cl_gui_cfw=>flush.
    call method cl_gui_frontend_services=>directory_list_files
      exporting
        directory                   = desktop_dir
    *    filter                      = '*.xls'
         files_only                  = 'X'
    *        DIRECTORIES_ONLY            =
      changing
        file_table                  = ifiles
        count                       = count.
      DATA : x_name       LIKE tsp03d-name,
             x_dest       LIKE tsp03d-padest VALUE 'LOCL',
             x_rows       LIKE sxpcklsti1-body_num VALUE 0,
             x_startrow   LIKE sxpcklsti1-body_start VALUE 1,
             x_pages      LIKE rspotype-pages VALUE 1,
             x_pages_1    TYPE p DECIMALS 2,
             x_rqtitle    LIKE sxpcklsti1-obj_descr,
             x_rqcopies   TYPE i VALUE 1,
             x_rqowner    LIKE trdyse01cm-username,
             x_immediate  LIKE pri_params-primm VALUE ' ',
             x_rqid       LIKE tsp01-rqident,
             i_contents    LIKE  solisti1 OCCURS 0 WITH HEADER LINE,
          x_pages   = 1.
          x_rqowner = sy-uname.
          x_dest     = 'LOCL'.
          x_startrow = 1.
          x_rqcopies = 1.
          x_immediate = 'X' .
          CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
           EXPORTING
    *       name                 =   x_name
             dest                 =  x_dest
             rows                 =  x_rows
             startrow             =  x_startrow
             pages                =  x_pages
             rqtitle              =  x_rqtitle
             rqcopies             =  x_rqcopies
             rqowner              =  x_rqowner
             immediately          =  x_immediate
           IMPORTING
             rqid                 =  x_rqid
           TABLES
             text_data            = i_contents
           EXCEPTIONS
             name_missing         = 1
             name_twice           = 2
             not_found            = 3
             illegal_layout       = 4
             internal_error       = 5
             size_mismatch        = 6
             OTHERS               = 7.
          IF sy-subrc <> 0.
    ** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Regards
    Appana
    *Reward Points for helpful answers
    Message was edited by: L Appana

  • HOW TO PRINT THE MATTER IN FOR ALL ENTRIES

    HI HOW T  PRINT THE FOR ALL ENTRIES MATTER

    Hi Naresh,
    You can only use FOR ALL ENTRIES IN ...WHERE ...in a SELECT statement.
    SELECT ... FOR ALL ENTRIES IN itab WHERE cond returns the union of the solution sets of all SELECT statements that would result if you wrote a separate statement for each line of the internal table replacing the symbol itab-f with the corresponding value of component f in the WHERE condition.Duplicates are discarded from the result set. If the internal table itab does not contain any entries, the system treats the statement as though there were no WHERE cond condition, and selects all records (in the current client).
    For example:
    SELECT * FROM sflight INTO wa_sflight 
    FOR ALL ENTRIES IN ftab 
    WHERE CARRID = ftab-carrid AND 
                 CONNID = ftab-connid AND 
                     fldate = '20010228'. 
    This condition, return all entries of the sflight.
    When using FOR ALL ENTRIES the number of matching records is restricted to the number of records in the internal table. If the number of records in the database tables is too large then join would cause overheads in performance. Additionally a JOIN bypasses the table buffering.
    Thanks,
    Reward If Helpful.

  • How to print the script  before realasing?

    how to print the script  before realasing?

    Do you want to see the output of your SAPscript??and print it?? before you release.
    Then goto NACE tcode and configure your script.
    Example :
    Goto Transaction NACE --> Select Application V1(Sales) --> Click on Output Types --> Select the output type as BA00 (as generally BA00 is the output type associated with Sales Order ) --> Double click on the Processing Routines folder on the left and it will display the Form name and the corresponding driver programs name.
    Goto tcode VA03, and display the output from menu and do your printing.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • How do we move i tunes content from a windows computer to our new macbook pro

    how do we move i tunes content from a windows computer to our new macbook pro

    The Apple store will do this for you.
    You can call Apple support and they will help you do it.
    You can type "move itunes library from pc to mac" into the google search bar.

  • How to Print the Account Balance in Outgoing Payment PLD

    Hello Experts
    How to Print the Account Balance in Outgoing Payment PLD
    Dixit Patel

    Hi,
    you can use udf in the outgoing payment to record  the vendor's account balance and then using the query FMS ;
    select balance from ocrd where cardcode = $[$4.0.0]
    Assign the query in the UDF so that each time after entering the vendor code, the balance appears.
    After add the payment, the balance is recorded.
    In PLD, you can create the UDF field to make the balance appears in the outgoing report.
    Rgds,
    JimM

  • In cursor i have two queries where put the condition and how to print the d

    hi i have 2 tables 1 is emp(empid,empname,dept,grade)
    2 is salary(grade,salary)
    in cursor when ever grade is increased salary automatically increased
    in 2 diffrent queries where i will put the if condition and how to print the output.
    any one can please suggest me.
    finally my required out put is
    empid,empname,grade,salary
    thanks

    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to print the output of the screen in Dialog Programming

    Hi,
    Could anybody help how to print the output of a screen in the dialog programming. i can select 'Hard Copy' option in the 'Custumizing of Local Layout' Icon in the standard tool bar. but that prints the whole screen with the toolbar. i want to print only the output which is displayed on the screen. Please help..
    Regards,
    Swathi

    Hi Swathi,
        Ok. Do One thing. Go to menu bar and select Systems -> Own pool Request -> here you get the spool number. Select it and select the option "Print Directly" in tool bar.
    Thanks.

  • How to print the rows vertically

    Hi
    how to print the results vertically, like this
    SELECT eno, ename, deptid FROM emp_asign
    WHERE ROWNUM<3
    ENO     104
    ENAME     Bruce Ernst
    DEPTID     60
    ENO     106
    ENAME     Maximus
    DEPTID     60

    well, let's start from the inside and work our way out, shall we?
    the "WITH" clause is just to alias a subquery that he used as an example. I'll assume you know that, and just put it inside the main query (and I'll use all the columns)
    select rpad(t.column_value.getrootelement(),20) || ': ' || t.column_value.extract('//text()') out
    from table(xmlsequence(xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*'))) t
    SQL> select cursor(select * from emp where rownum<4) from dual;
    CURSOR(SELECT*FROMEM
    CURSOR STATEMENT : 1
    CURSOR STATEMENT : 1
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
    3 rows selected.
    1 row selected.
    SQL> select xmltype(cursor(select * from emp where rownum<4)) from dual;
    XMLTYPE(CURSOR(SELECT*FROMEMPWHEREROWNUM<4))
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7902</MGR>
      <HIREDATE>17-DEC-80</HIREDATE>
      <SAL>800</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7499</EMPNO>
      <ENAME>ALLEN</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>20-FEB-81</HIREDATE>
      <SAL>1600</SAL>
      <COMM>300</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7521</EMPNO>
      <ENAME>WARD</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>22-FEB-81</HIREDATE>
      <SAL>1250</SAL>
      <COMM>500</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    </ROWSET>
    1 row selected.
    SQL> select xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*') from dual;
    XMLTYPE(CURSOR(SELECT*FROMEMPWHEREROWNUM<4)).EXTRACT('ROWSET/ROW/*')
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7902</MGR>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    <DEPTNO>20</DEPTNO>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    <DEPTNO>30</DEPTNO>
    <EMPNO>7521</EMPNO>
    <ENAME>WARD</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>22-FEB-81</HIREDATE>
    <SAL>1250</SAL>
    <COMM>500</COMM>
    <DEPTNO>30</DEPTNO>
    1 row selected.
    SQL> select xmlsequence(xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*')) from dual;
    XMLSEQUENCE(XMLTYPE(CURSOR(SELECT*FROMEMPWHEREROWNUM<4)).EXTRACT('ROWSET/ROW/*'))
    XMLSEQUENCETYPE(XMLTYPE(<EMPNO>7369</EMPNO>
    ), XMLTYPE(<ENAME>SMITH</ENAME>
    ), XMLTYPE(<JOB>CLERK</JOB>
    ), XMLTYPE(<MGR>7902</MGR>
    ), XMLTYPE(<HIREDATE>17-DEC-80</HIREDATE>
    ), XMLTYPE(<SAL>800</SAL>
    ), XMLTYPE(<DEPTNO>20</DEPTNO>
    ), XMLTYPE(<EMPNO>7499</EMPNO>
    ), XMLTYPE(<ENAME>ALLEN</ENAME>
    ), XMLTYPE(<JOB>SALESMAN</JOB>
    ), XMLTYPE(<MGR>7698</MGR>
    ), XMLTYPE(<HIREDATE>20-FEB-81</HIREDATE>
    ), XMLTYPE(<SAL>1600</SAL>
    ), XMLTYPE(<COMM>300</COMM>
    ), XMLTYPE(<DEPTNO>30</DEPTNO>
    ), XMLTYPE(<EMPNO>7521</EMPNO>
    ), XMLTYPE(<ENAME>WARD</ENAME>
    ), XMLTYPE(<JOB>SALESMAN</JOB>
    ), XMLTYPE(<MGR>7698</MGR>
    ), XMLTYPE(<HIREDATE>22-FEB-81</HIREDATE>
    ), XMLTYPE(<SAL>1250</SAL>
    ), XMLTYPE(<COMM>500</COMM>
    ), XMLTYPE(<DEPTNO>30</DEPTNO>
    1 row selected.
    now that we know what that looks like, we can put it in the TABLE() and make it the FROM clause
    SQL> select * from table(xmlsequence(xmltype(cursor(select * from emp where rownum<4)).extract('ROWSET/ROW/*')));
    COLUMN_VALUE
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7902</MGR>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    <DEPTNO>20</DEPTNO>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    <DEPTNO>30</DEPTNO>
    <EMPNO>7521</EMPNO>
    <ENAME>WARD</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>22-FEB-81</HIREDATE>
    <SAL>1250</SAL>
    <COMM>500</COMM>
    <DEPTNO>30</DEPTNO>
    23 rows selected.I'm getting bored. I'm sure you can break down the remaining parts of the statement to see what they return, and how it all comes together.

  • How do you transfer Albums & their contents from Elements 11 into a later edition Elements 13. Thanks

    How do you transfer Albums & their contents from Elements 11 into a later edition Elements 13. Thanks

    Albums are lists which are stored into catalogs. They don't contain the images, they just keep a pointer to where the pictures are stored in your computer and the order to display them.
    So your problem is with catalogs, not with albums.
    If you have missed the message to convert the old current catalog at installation time, that's not a problem. You can use the menu File in the organizer, select 'Manage catalogs' which will show a 'convert' button. That is also necessary if you have more than one catalog.
    The catalog is not a single file, it's a folder containing the main database, catalog.pse13b as well as other files and subfolders. The location of your current catalog can be found with the menu Help/System Info of the organizer. If you want to use another catalog, the organizer will search for other catalogs and provide a list to choose from.

Maybe you are looking for