Print button in ABAP WebDynpro

Hello all,
  The client has requested a 'Print' button in our webdynpro application - ie a simple button that triggers the browser command Ctrl P.
I have searched the forum, and it seems that this is not possible, because WebDynpro cannot execute browser commands (or indeed, javascript).
Can someone please suggest a solution - OR - confirm that this functionality is not possible?
thanks
Paul
Note: Note: We do NOT want to use ALV, Adobe or Smartforms. We just want to print what's on the webdynpro screen.

Micky,
I thank you for that clear response: It is not possible to print from ABAP WebDynpro.
> What should that printbutton do?
We want it to do the same as Ctrl P, which is to print the entire web page. (We don't have frames etc)
>WD4A is normally intended to be used with Adobe Interactive forms
This is news to me! Is this an accepted view in the SAP communit... that WebDynpro requires Adobe to achieve full functionality? That is disappointing, to say the least. And a step back from BSP.
We are building multiple online calculators, and it would be a huge overhead to have to develop (and maintain) an Adobe form for each calculator, simply to enable the user to print the contents of the screen....
I have read in SDN that you can invoke a browser Print command from Java Webdynpro. A class WDPrintService has been provided.
Printing in Web Dynpro, finally
How can it be that this functionality is "not possible" for one flavour of WebDynpro, but plainly available in the other....?
cheers
Paul

Similar Messages

  • Print button on my webdynpro JAVA page

    Hi Experts,
    Is there any way that I can include a print button on my webdynpro JAVA page. ON click of the Print button I have to print the entire Page. User is able to print the page by using the print option of Browser, but in that case if the page is having a vertical or horizontal scroll, print output will contain only the visible part.
    Thanks and Regards,
    Sarath Satheesan

    Hi Sarath,
    Printing Web Dynpro Java (WDJ) applications is one of the missing functionalities that everyone wants to have in their application. you can use third party open source reporting tool, JasperReports, to solve this issue
    Printing in Web Dynpro using JasperReports
    PART 1 - /people/jawed.ali/blog/2009/02/09/part-i-print-web-dynpro-java-applications-using-jasperreports
    PART 2 - /people/jawed.ali/blog/2009/02/09/part-i-print-web-dynpro-java-applications-using-jasperreports
    PART 3 - /people/jawed.ali/blog/2009/10/30/part-iii-print-web-dynpro-java-applications-using-jasperreports
    Hope this will fulfil you requiremnt.
    Thanks
    Arun

  • Print button disabled on webdynpro application

    Hi
    I have a requirement to have 'PRINT' button on PDF form generated from webdynpro application.[POWL],whereas my 'SAVE' button enabled.
    Please suggest me where I need to check for this settings?
    I have checked in POWL_UI_COMP, not found any related stuff.
    Please help me.
    Thanks

    Follow the first 19 steps in below link
    http://wiki.sdn.sap.com/wiki/display/WDABAP/POWL+CONFIGURATIONS
    Regards
    Srinivas

  • Exit button in ABAP Webdynpro doesnot work with SPNEGO

    Dear Webdynpro Gurus,
    we are in weird situation where we have webdynpro application in ABAP with exit button.
    we have ABAP System and EP System and SSO configured for these two systems.
    We configured EP system with Microsoft Active directory for single-signon with SPNEGO.
    this configuration is working fine.
    the situation is when we click on exit button, it is not redirecting to the main iview and there is no action taking place.
    please find the code for the exit button:
    *METHOD onactionexit .*
      *CONSTANTS lc_uri TYPE string VALUE 'ROLES://portal_content/com.sap.pct/every_user/com.sap.pct.erp.ess.bp_folder/com.sap.pct.erp.ess.roles'.*
      *constants lc_url type string value '/com.sap.pct.erp.ess.employee_self_service/com.sap.pct.erp.ess.employee_self_service/com.sap.pct.erp.ess.area_employee_search'.*
    'ROLES://pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.ess.bp_folder/com.sap.pct.erp.ess.pages/com.sap.pct.erp.ess.overview'.**
    *   Call New portal Page or iView**
      *TYPES: BEGIN OF navigation,*
        *target       TYPE string,*
        *mode         TYPE string,*
        *features     TYPE string,*
        *window       TYPE string,*
        *history_mode TYPE string,*
        *target_title TYPE string,*
        *context_url  TYPE string,*
       *END OF navigation.*
      *DATA: wa_navigation TYPE navigation.*
      *data : lv_url1 type string.*
      *DATA lo_api_component  TYPE REF TO if_wd_component.*
      *DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.*
      *lo_api_component = wd_comp_controller->wd_get_api( ).*
      *lo_portal_manager = lo_api_component->get_portal_manager( ).*
      *concatenate lc_uri lc_url into lv_url1 respecting blanks .*
      *wa_navigation-target = lv_url1.*
      *wa_navigation-mode   = '0'.*
      *CALL METHOD lo_portal_manager->navigate_absolute*
        *EXPORTING*
          *navigation_target = wa_navigation-target*
          *navigation_mode   = wa_navigation-mode "IF_WD_PORTAL_INTEGRATION=>CO_SHOW_INPLACE*
          *post_parameters = ABAP_TRUE.*
    *ENDMETHOD.*
    Please help me to get out of this situation.
    Thanks & Regards,
    Khurshid.

    It is calling the workflow program exit before the SAP_WAPI_WORKITEM_COMPLETE function module.
    So closing the thread.

  • How to find function codes of the buttons in ABAP Webdynpro

    I had 2 buttons in my input screen of the WebDynpro, for both buttons some piece of logic is common. So i wrote that common logic in the default method 'WDDOBEFOREACTION', which will be triggered always before the corresponding methods got triggered.
    Now my problem is the method 'WDDOBEFOREACTION' triggering even when user hits ENTER in the input screen, to prevent the common logic not to execute need to write some condition based on the user action. But unfortunately was not able to find the way. Could any one suggest me on this.

    For your specific requirement :
    you should first determine the current action which triggered this WDDOBEFOREACTION method,
    as this method triggers for every action performed on the webdynpro view.
    For that below is the code
      DATA lo_api_view_controller    TYPE REF TO if_wd_view_controller.
      DATA lo_action                 TYPE REF TO if_wd_action.
      lo_api_view_controller = wd_this->wd_get_api( ).
      lo_action = lo_api_view_controller->get_current_action( ).
      IF lo_action IS NOT BOUND.
              IF lo_action->name EQ 'BUTTON1'   OR   lo_action->name EQ 'BUTTON2'.
    Where BUTTON1 and BUTTON2 are the actions associated with both the buttons.
    Write your common logic here and now it would get executed only for both these button cliks only
               ENDIF.
    ENDIF.
    Edited by: Avasarala Sampath on Oct 28, 2011 7:26 AM
    Edited by: Avasarala Sampath on Oct 28, 2011 7:29 AM

  • How to disable Print button on WebDynpro ABAP ALV

    In WebDynpro ABAP, a standard menu appears around the ALV,  that has a PRINT button and an EXPORT button.
    Is there anyway to disable those buttons????
    Thanks
    John

    Hi John,
    Check the interface if_salv_wd_std_functions. It contains methods which are used to hide the standard ALV toolbar buttons.
    Also refer : Removing "print version" button in alv
    How to hide Print and Filter option from dynamic ALV

  • Print Button in webdynpro abap?

    Hi Gurus,
                 I have created a custom button on my webdynpro screen . When I click that button I want to take print out of the particular screen and at the same time I need to hide the buttons (buttons are displaying on print screen option). Can anybody please help me out .
    Thanks & Regards
    Suman Kumar

    Hi Suman,
    To print WDA application, please refer the below document
    Printing Web Dynpro ABAP Applications - Web Dynpro for ABAP - SAP Library
    I don't think there is a standard method to hide the button from being included in snap shot of print.
    Work around solution1:
    Create a button BTN_PRINT and on click of button write the below code before call print_page( )
              i.e. hide the button,
      DATA lo_view TYPE REF TO if_wd_view.
      DATA lo_btn TYPE REF TO cl_wd_button.
      lo_view ?= wd_this->wd_get_api( ).
      lo_btn ?= lo_view->get_element( 'BTN_PRINT' ).
      lo_btn->set_visible( value = cl_wd_button=>e_visible-none ).
              " Print page
    data:
    l_api_componentcontroller type ref to if_wd_component,
    l_appl type ref to if_wd_application.
      l_api_componentcontroller = wd_comp_controller->wd_get_api( ).
    l_appl = l_api_componentcontroller->get_application( ).
    l_appl->print_page( ).
    Note: this hide the button PRINT and on subsequent action, you can make it visible again
    Work around solution2 :
    you can just create a button with access key ( CTRL + P ), without button text... So that it will not be visible in printing. Users can print by using short cut keys CTRL+P
    Hope this helps you.
    Regards,
    Rama
    Message was edited by: Ramakrishnappa Gangappa

  • Print Button in Web Dynpro ABAP

    Hi Everybody,
    i hope that someone know or have a code sample how i can set a print button to the Web Dynpro for ABAP. On click on this it should open the print window from the Internet Explorer.
    Please let me know if there is any information about this.
    Thanks
    Best regards
    Markus

    Hi,
    If you are using the Internet Explorer 7, you can use CTRL + P to invoke print directly on any WebDynpro ABAP view.  This is IE 7.0 browser featute & always has print preview & print options available from File Menu's. So you dont require any additional buttons on view :).
    For table data if you use ALV you get options to export data to excel or fire print directly
    Greetings
    Prashant

  • Printing lists in ABAP without using the standard button

    Dear community,
    i've got a little problem and I can't fix it on my own.
    Some user in our company gave me the instruction to extend an existing SAP Programmm with some defined functionalities.
    They want to implement an new button for printing in the gui status and when someone uses the buttons they want to count down a number and print the generated list of the report.
    I created also the new button in the gui status with a own functioncode and in the report i implemented an own AT USER-Command event:
    **&   Event
    AT USER-Command.
      CASE sy-ucomm.
        WHEN 'PRVR'.
          CALL FUNCTION 'PRINT_REPORT'
            EXPORTING
              report = sy-cprog
           EXCEPTIONS
             OTHERS = 99.
    When I push my own print button th reports jumps in the At-user-command event.
    The window for chosing the print properties will appear immediatly and I cn start printing.
    But only the spool-order will only appear when I leave the list-view with the button "back", "exit", or "cancel".
    Has anyone an idea why the output appears only when I go back to the selection screen?
    Can anybody tell me how to create an printing function to print out the list of an abap-report? I don't wnt to use the normal print-button!
    Many thanks in advance.
    Michael

    Hi Michael,
    sy-lsind is the list-id. If you set it to 0 or 1 it jumps (when using BACK)
    to the first output-list.
    Here a short demo-code to understand it.
    Make severeal time doubleclick in the outputline and
    look at the changing output.
    try it with:
    sy-lsind = 1
    and
    sy-lsind = 1.
    REPORT ZGRO_TEST1.
    data: dc type i value 1.
    START-OF-SELECTION.
      WRITE: / 'List:', dc, 'SY-LSIND:', SY-LSIND.
      HIDE:    SY-LSIND.
    AT LINE-SELECTION.
      dc = dc + 1.
    sy-lsind = 1.
      WRITE: / 'List:', dc, 'SY-LSIND:', SY-LSIND.
      HIDE:    SY-LSIND.
    Hope it helps.
    Regards, Dieter

  • Inactivate the print button is the ABAP list

    How can I inactivate the print button in the report program (ABAP list)?
    I can inactive the print button on selection screen by using 'RS_SET_SELSCREEN_STATUS'. But can't achieve the same effect after the program jumped to the list output screen.
    Thanks!

    hi,
    To achieve this you need to create your own custom pf-status. The tcode for creating new pf-status is se41. Goto SE41, enter the program name and click create.
    Enter the menu bar buttons, application tool bar button and Function key as per your requirement. Active the pf-status. Once the pf-status is created, use this in your program using the statement.
    set pf-status 'ZPF'.
    Regards,
    Richa.

  • Print button in Webdynpro

    Hi all,
    This is a very old functionality am stuck with..
    I need to print the Table in Webdynpro Screen.
    Donts :
    I dont have a PrintButton UI element present in my NWDS7.0 Version.Sp13.
    I dont have the "com.sap.tc.webdynpro.clientserver.print.api" API to get the Print Service.
    I dont want to export the Table into EXCEL and then give a print, due to some performance issues.
    Could anyone pls suggest if there is any solution for this.
    Thanks & Regards,
    Sirisha.RS

    hi,
    Overwrite the following javascript to the click event of the print button...
    xfa.host.print(0, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
    By
    Parthi

  • How to launch an ITS screen from an ABAP WebDynpro Button Action

    Hello All,
    I have a requirement to launch an ITS Screen from ABAP WebDynpro. There will be abutton on the WebDynpro screen and when the user will click on that button, the ITS Screen will be launched.
    Can anyone please provide us some sample applications or sample code to achieve the above functionality.
    Points will be rewarded.
    Thanks
    Shyam

    Hi Shyam,
    You can achieve by using Launchpad Customizing and the Launchpad Navigation API's. Just make and entry on transaction LPD_CUST, create a launchpad role, add you target application there.
    At run time under the UI button you can call the API provided by CL_APB_LAUNCHPAD_API -->LAUNCH_APPLICATION to open the application. You can find many material on Internet for the same, with examples, even try some where-use in your system.
    I found one more helpful link.
    http://sapignite.com/call-sap-tcode-using-webdynpro-for-abap/
    Regards
    Vineet

  • Can ABAP Webdynpro use interactive form or just print only

    I saw a diagram in the ADS configuration Guide for SP10 what shows that the ABAP side of the configuration is only for print forms. Now my question is: can ABAP Webdynpro include an interactive Adobe form in the view? Has anyone done it before? It seems that it is only for Java Webdynpro that the interactive part is working.
    If you have done one, can you share some information?
    Thanks

    Hi Jeff,
    Sure, Web Dynpro ABAP can also embed Interactive Forms.
    Help is available on help.sap.com: http://help.sap.com/saphelp_nw04s/helpdata/en/aa/940ee5331b4b8fa0a6cb6714dc5db4/frameset.htm
    There are also some nice videos of this following https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/7c3bc67e-0c01-0010-dbb3-908315896909?rid=/webcontent/uuid/24b9e126-0b01-0010-e098-f46384fad9f3">this [original link is broken] [original link is broken].
    Cheers,
    Francois

  • Printing ABAP webdynpro IFRAME + OfficeControl

    Hello,
    In my webdynpro application I have an iframe with a html page as content and an office control containing a word document.
    And now I want to implement and printing button when I click on the button the content of the iframe (html page) and the content of the word document is printing on one page. Is it possible to send an byte array to a printer and how can I implement this?
    Thanks for your support.
    BR,
    Christoph

    Hi Df,
    Create one attribute of type WDUI_VISIBILITY and bind this to PRINT button VISIBLE property.
    In your button action before  printing code...first write code to invisible button by using SET_ATTRIBUTE method
    passing value '01' for invisible '02' for visible.
    wd_context->set_attribute(
    name = 'VISIBLE'  // your attribute name here..
    value = '01' ). // for invisible
    Cheers,
    Kris.

  • Your opinion on:  BSP or Java Webdynpro or ABAP Webdynpro?

    Could you please give me your opinion on the business scenario we have here:
    We are implementing SRM 4.0 with backend R/3 4.6C, WAS 6.4 and Portal 6.0. SRM has its typical shopping cart applications mainly for procurement and the workflow trail displaying the approval. The client wants us to build a few custom forms on the web frontend of SRM (or may be in Portal). The idea is to store these forms and display when needed with the status info just like a shopping cart.
    <b>Now the requirements for these forms are as follows:</b>
    1. These forms will have multiple fields which need to have the F4 kind of help. (the F4 options will reside in SRM or R/3)
    2. The form should have some kind of a ALV grid  (autoexpanding feature) which will allow the user to put in multiple line items so that they could submit more items on one form.
    3. Users need to be able to attach a spreadsheet to the form which should not be editable once the form is submitted. The attached spreadsheet should be stored. (We are planning on using Archivelink Filenet for this)
    4. Upon submission, a workflow will be kicked off as per the defined Org structure for approval of the form.
    5. After submission, the user should be able to go and view the approval status of the form and also print the summary of the values that he entered in the form. (may be a smartform could be provided for this)
    We looked at different options to accomplish this task:
    <b>BSP:</b>
    Creating BSP pages and giving access as links to the user on the webfrontend of SRM. Now, if we go the BSP route, we need to develop in SRM as the R/3 4.6 c does not have BSP development capabilities. If we take this approach, I am not sure if all the above requirements (specially like attaching spreadhseets) will be met with BSP pages.
    SAP Webdynpro Java: 
    It seems that the Webdynpro is easier to use because of the graphical tools available. But the only problem if we go this route is that we will have to find a java guy.
    SAP Webdynpro ABAP:
    We currently have WAS 6.4. As per the documentation, the ABAP Webdynpro development tool is available from NW04s onwards. So, we are still not sure if we could use it. But, we want to push towards upgrading if necessary. Being an old time ABAPer, developing ABAP Webdynpro seems do-able. (i know it may not be that easy).
    Last but not the least, DIALOG Program:
    Creating a dialog program in R/3 or SRM seems fairly simple. Then, an iview could be created on the portal for this transaction, though at this point I am not sure how a spreadsheet could be attached and stored within a dialog program.
    The creation of the workflow may not be that bad after the original form is designed. The graphical display of the approval trail might be difficult, but we might get away with a report for that. For printing the details of the form, I guess I could develop a smartform and put out a button on the screen to print it out in the display view.
    Could you please give me your opinion /  best approach for accomplishing this task, keeping in mind the complexities of these new dimension products?
    Thanks
    Sri

    I would say that all four solutions to solving your tasks are technically feasible.  Here are some thoughts that I had however:
    First ABAP Webdynpro: it is true that ABAP webdynpro is only available with Netweaver04s.  04S is still in ramp-up which means that only a subset of the customer base is allow to implement it.  It will not become generally available until later this year (check the service marketplace for current release estimates).  That being said, it probably elimintes WDA as a possiblity for your project unless you are will to wait and to upgrade.
    However having worked with WDA for a while it is probably the best tool to custom develop what you describe.  It has excellent built-in F4 value help.  It also has a damn fine ALV grid implementation.  The spreadsheet could be just as simple as file upload in binary or your could try your hand at office integration.  Finally for the form you could use Adobe Interactive Forms which also has very nice integration into WDA. 
    Now to Dialog Programming: You could of course use dialog programming.  It seems a little bit of a waste to custom build something so large if WDA is in your near future.  There are obvious disadvantages (little OO structure, no MVC, etc).  You would have ALV grid, office integration and of course F4 help.  You could still use Adobe forms if you implement this on the 640 system.  However there are integration points with dialog and Adobe Interactive Forms.  You could still use printed forms however. If you did the dialog program on the 640 system, you could use the integrated ITS to expose it to the web.  The integrated ITS in my experience has quite nice performance although the look and feel remains just like the SAPGui.
    The Java Webdynpro route:  Well you hit the nail on the head - if you don't have a Java programmer already and you don't have the bandwidth to invest in learning Java, this can be a problem.  The Java Webdynpro environment is quite nice.  There are some things I like better than ABAP and some things that ABAP is defintely still better at.  However when it comes to heavy integration with an ABAP backend - ABAP Webdynpro is still the way to go.  Java Webdynpro does have a help feature (OVS), but it isn't "for free" or nearly as nice as the ABAP Webdynpro (perhaps it will get there some day).  That is one of the major advantages of WDA - its closeness to the business data brings several framework advantages like F4 and field help.  WebDynpro Java in 640 also doesn't have an ALV grid implementation.  I am sure that this is something both environments will eventually have, but right now ABAP has the advantage.  On the other hand, Webdynpro Java has equal support when it comes to office integration, file upload, and Adobe Forms support.  You would have a more difficult time integration SmartForms however.
    Finally we come to BSP.  Honestly if I were in your position I would probably choose BSP (unless you could wait for the ABAP Webdynpro upgrade).  You could build a nice MVC OO application using BSP (stateful or stateless).  The BSP product is mature and quite well documented thanks to SDN.  You have the BSP Extensions which when used in Design2003 use the Unified Renderer.  That means that your output will look nearly identical to the same UI elements in Webdynpro.  Also BSP supports portal integration (session management, eventing, and themes). 
    The downside to BSP is that it isn't a full framework (also one of its advantages).  You can insert all your own html and javascript (unlike webdynpro). But this also means that SAP doesn't delivery as many framework services.  For instance there is no ALV or Value Help.  There is no Office Integration or Adobe Forms integration.  There is some farily good Smart Forms integration.  Now the upside- many people have already hit these limitations and overcame them.  In the weblogs on SDN and in a certain SAP Press book (cough, cough) you will find out of the box solutions for many of these problems.  You can find ready to use solutions for Adobe Integration, Office Integration (using Microsoft Office Web Controls), and F4 help.  It will mean investing a little more time up front to get this "home grown framework" up and running - but it is perfectly feasible. 
    There is a learning curve to all these new technologies however.  This sounds like an abmious project.  I wouldn't want to try and tackle this project in any of these technologies if I was new to them.  With Webdynpro or BSP - consider giving yourself time to learn the environment and cut your teeth on some demo apps before jumping into such a huge development.

Maybe you are looking for