Display sapscript form in Web Dynpro Java

Hi,
Is it possible to print an existing sapscript form i.e. PO from ECC to my Web Dynpro application? I have successfully created a Web Dynpro Java application to create POs but now have a requirement to display or print the PO?
Can someone provide me with a sample code? I'm hoping to be able to do this without using Adobe.
Again, thanks for all your help.
Best regards,
Jaypee

Hi mark,
Without Adobe also u can display PO order.
Below is the code to open a HTML window from WDJava, with data from WDJava...
Inside DoInit()
IWDAttributeInfo attr1 =
wdContext.getNodeInfo().getAttribute("htmlfile");
ISimpleTypeModifiable mtype1 = attr1.getModifiableSimpleType();
IWDModifiableBinaryType btype1 = (IWDModifiableBinaryType) mtype1;
btype.setFileName(attr.getName() + ".html");
btype.setMimeType(WDWebResourceType.HTML);
_contentType = mtype;
Where htmlfile is a context attribute of type binary... and do a global declaration like this
ISimpleTypeModifiable _contentType = null; (This declaration can be done at the end of your view's coding between Begin Others and End Others)
Now,
inside on action print
public void onActionPrintData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String videoName )
//@@begin onActiondisplayVideo(ServerEvent)
byte[] content = new byte4028;
try {
content = this.displayPrint().getBytes("UTF-8");
wdContext.currentContextElement().setHtmlfile(content);
wdContext.currentPrintElement().setAttrUrl(
_contentType.format(content));
//Where content is loaded with data from displayPrint() method, which is holding the HTML *page to be displayed to the user *
IWDWindow win =
wdThis
.wdGetAPI()
.getComponent()
.getWindowManager()
.createNonModalExternalWindow(WDWebResource
.getWebResource(content, WDWebResourceType.HTML)
.getURL(),"ShowVideo");
win.setWindowSize(445,460);
win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
win.removeWindowFeature(WDWindowFeature.TOOL_BAR);
win.removeWindowFeature(WDWindowFeature.MENU_BAR);
//win.open();
win.show();
// wdComponentAPI.getMessageManager().reportSuccess("444444444444");
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportException ("Unable to open window"+e,false);
//@@end
Now finally, design your HTML Page inside the method displayPrint() like this
public java.lang.String displayPrint( java.lang.String strVideoName )
//@@begin displayPrint()
String htmlcontent=null;
htmlcontent="content what you want to show in print window";
use script inside the html content to do a print... like window.print();
return htmlcontent;
//@@end
Regards,
Sunaina Reddy T

Similar Messages

  • Adobe forms in web dynpro java

    hi
    I am working in adobe interactive forms in web dynpro java .I want to use File upload and Download option in adobe interactive form .Can anyone please help me out.
    The submit button is also not working.Can anyone tell me the right code or pdf's related to above two problems.

    Hi,
    Please have a look at this blog,
    /people/amit.rai4/blog/2008/02/01/demystifying-attachments-with-sap-interactive-forms
    Regards
    Saravanan K

  • Adobe interactive forms in web Dynpro java

    Hi Everyone,
    I am new to webDynpro development and as I am working on Interactive forms, I need pdf's and related materials for the same.
    I mean pdf's for how to create Adobe interactive forms in web Dynpro java.
    Thanks in advance.

    Go Through the following document.
    It will give you good overview.
    Interactive Forms-->Functionality
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0401535-f81c-2a10-0192-ffd41e8e8d59
    Cheers
    Satya

  • Problem when generating an non-interactive form in Web Dynpro java.

    Hi,
    I'm trying to create a PDFDocument using a creation context in java. Everything works fine when the Interactive property of the creation context is set to true. When I change it to false however, the Web dynpro application hangs and eventually throws the following exception:
    java.net.SocketTimeoutException: Read timed out
       at java.net.SocketInputStream.socketRead0(Native Method)
       at java.net.SocketInputStream.read(SocketInputStream.java:129)
       at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
       at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
       at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:806)
    I'm wondering why this exception occurs when i'm generating a non interactive form and never appears when i'm generating a form with the Interactive property set to true.
    Any ideas?
    Edited by: Arjan Nieuwenhuizen on Feb 25, 2008 3:24 PM

    Yeah I know changing the form properties will solve my problem, but since i'm developing a training for Interactive Forms in Web Dynpro Java, I wanted to figure out why the (static / non-interactive) combination didn't work, turned out to be a template problem, which i still didn't figure out, except the fact that having flowed content on your template is not the problem.
    My ideas about your question:
    When we have the layout of an Interactive Form, its clear if it's meant to be static or dynamic, we don't know however, if it's interactive or non-interactive.
    I don't think we can judge a layout to have an Interactive or non-interactive purpose, can depend on the situation in which the same form is shown/used:
    - One moment it can be interactive, e.g. user is filling in the form, can enter data etc.
    - Next moment it can be non-interactive, e.g. form is shown to another user.
    So it's more the scenario/situation that determines if the form is interactive or non-interactive.

  • Problems with Adobe PDF forms in Web Dynpro Java

    As of now , I have two major issues in developing Adobe PDF forms in Web Dynpro Java .
    1.Text getting wrapped and repeated from the first line :
    Any text field that flows to the next page gets wrapped at the end of the page and is again printed on the next page beginning from the first line .
    For eg:
    If I have 4 lines in a text field that is at the end of the page
    1111111111111111111111
    2222222222222222222222
    3333333333333333333333
    4444444444444444444444
    and the page holds space for only two lines it prints the lines
    1111111111111111111111
    2222222222222222222222
    in the first page and then proceeds to the next page and prints
    1111111111111111111111
    2222222222222222222222
    rather than printing
    3333333333333333333333
    4444444444444444444444
    2.No way to hide a page at runtime:
    It is not possible to hide a page in a PDF form at runtime . If scripting is used , the page turns into a blank page but not hidden .
    Any pointers on this????????
    Helpful answers will be suitably rewarded with points!!!!

    Yes,I am using the versions that you mentioned.
    I have a node called <b>MasterData</b> which is the root node for my PDF Form.I have a node called <b>GenData</b> inside this node whose <b>ctx_Appraisal_Type_Num</b> attribute is bound to a hidden TextField in my form.In the <b>docReady</b> event of this TextField, I am writing the following FormCalc script to hide my SubForm whose Id is <b>MngrCmptnc</b>
    if(MasterData.GenData.ctx_Appraisal_Type_Num == "2")
    then
    MasterData.MngrCmptnc.presence = "visible"
    MasterData.MngrCmptnc.MngrCmptnc.presence = "visible"
    MasterData.StrImp.presence = "visible"
    else
    MasterData.MngrCmptnc.presence = "hidden"
    MasterData.MngrCmptnc.MngrCmptnc.presence = "hidden"
    MasterData.StrImp.presence = "hidden"
    endif

  • About Adobe Form and Web dynpro Java development

    Hello experts,
    We had  a requirement to display different Adboe Forms dynmaticlly in Web dynpro Java application.
    There is only one Web dynpro Java application, but 10 Adobe Forms . If user "a" access the application ,display form 1 ; if user "b" access the application , display form 2 ;  if user "c" access the application , display form 3.... just like this.
    There are about 30 fields in BAPI which Web dynpro Java application called . Form 1 mapping to field 1 to field 3, Form 2 mapping to field 4 to field 6, Form 3 mapping to field 7 to field 9 ....
    Is it possible ? If it is possible , could you please give me a solution ?
    Thank you in advance !
    Best Regards,
    Louis

    Siva,
    I referred to the website, but still having issues with generating tables in Adobe Form. I can get all the table rows in the adove form, but the pdf doee not add new pages to display all the table rows. It just createa one page with the table inside it, display few of the rows and truncates rest of the table data.
    Here is the heirarchy of the page with the properties set
    Master Pages ---
            ||--> Page 1
                     ||--> content area
                     ||--> subfrom (properties:: Content - Flowed / Flow direction - top to bottom...pagination tab is greayed out completly)
                                ||--> Table
                                          ||--> HeaderRows (Object: Row - Type: Header Row)
                                          ||--> Row1 (Object Tab/Binding: Repeat Row for each data item - checked)
    Can't make it wor, not sure what's wrong here
    I am using NDS 7.0 SP18 and Adobe LiveCycle 8.0. Does that could be a problem.
    Appreciate your help
    John

  • Problem with table in Adobe Form in Web Dynpro JAVA??

    Hello all,
    I have an issue with the table displaying all the node values in the Adove Form. Right now it displays only the first element of the Node even if there are multiple entries.
    Not sure what is going wrong here.
    How is the table created in a interactive form? Any help is appreciated.
    Thank you, John

    Siva,
    I referred to the website, but still having issues with generating tables in Adobe Form. I can get all the table rows in the adove form, but the pdf doee not add new pages to display all the table rows. It just createa one page with the table inside it, display few of the rows and truncates rest of the table data.
    Here is the heirarchy of the page with the properties set
    Master Pages ---
            ||--> Page 1
                     ||--> content area
                     ||--> subfrom (properties:: Content - Flowed / Flow direction - top to bottom...pagination tab is greayed out completly)
                                ||--> Table
                                          ||--> HeaderRows (Object: Row - Type: Header Row)
                                          ||--> Row1 (Object Tab/Binding: Repeat Row for each data item - checked)
    Can't make it wor, not sure what's wrong here
    I am using NDS 7.0 SP18 and Adobe LiveCycle 8.0. Does that could be a problem.
    Appreciate your help
    John

  • Adobe Interactive forms in web dynpro java and BPM

    Dear all,
    I am able to design forms in adobe life cycle and consumed it in BPM but i am unable to send pdf  to the potential owner of that task . i just want to know about server side configuration which we need to do for sending mails . although i tried it in NWA/configuration wizard but i am not sure whether it is right or wrong and also about credentials .
    can anyone help me with this plzzz
    Thanks in advance
    vinit sharma

    Go Through the following document.
    It will give you good overview.
    Interactive Forms-->Functionality
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0401535-f81c-2a10-0192-ffd41e8e8d59
    Cheers
    Satya

  • Adobe Forms using Web Dynpro Java

    Hi,
    I am new to ADOBE, can you please provide some URL's where I can get some documents.
    Thanks,
    Usha

    HI Usha,
    Please check the below URl's.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/d1088b7e-0c01-0010-c78e-984c0537e3ec [original link is broken]
    Thanks,
    Archan

  • SUBMIT(to SAP) Button in Adobe Interactive Forms (Web Dynpro Java)

    Hi ,
    I m using Adobe Interactive Forms with Web Dynpro Java
    But submit to SAP button is not working
    i m using NWDS 7.2 with adobe lifecycledesigner 6.0
    with adobe reader 9.0
    when i click submit to SAP button in interactive form nothing happens and
    data is not transfered into web dynpro Context
    Can anybody help me out................

    Hi Adi,
    The evniorment and versions you posted seems to be quite scattered, make sure all are of compatible and to the lates.
    Anyways this was not the reason for your problem.
    Can you tace if the button click event is triggered ....?
    1) when the PDF is published can you see any of the fields editable...? reason behind is generally when you create a form in ADLC it comes up in static PDF format if its so you need to make it dynamic.
    I dont know if adding the webdynpro script to your form might fix.
    Regards,
    Sai

  • InteractiveForm UI Element in Web Dynpro Java - Image not displayed on form

    Hello Experts,
    Using: NetWeaver Developer Studio 7.0.1_06; Adobe Livecycle Designer 8.1.
    I have an image "image.png" in my src/mimes/components/com.mm.InteractiveFormComp folder within my web dynpro java project.
    I load the image into my context in wdDoInit method in the comp controller:
    wdContext.currentContextElement().setImage("image.png");
    In the interactiveform I have an ImageField on the form and have set its properties as follows:
    Field - URL = http:[host]:[port]/webdynpro/dispatcher/InteractiveFormComp/src/mimes/components/com.mm.InteractiveFormComp/image.png
    Field - Embed Image Data = "checked"
    Binding - Default Binding = Image
    However, no image ever shows up on the form. I have also been through many threads in the forums but havent found a solution. Can anyone please assist me?
    Regards,
    MM.

    Hello,
    I tried using jpg and bmp. Didn't work.
    Any other suggestions?
    Regards,
    MM
    Solved it!
    Edited by: Marshall Mathers on Mar 9, 2011 9:53 PM

  • How to display smartform as PDF in web dynpro java

    Hi,
    Where can I find sample program to display smartform as PDF in web dynpro java.
    Thanks.
    Regards,
    Henry

    1. Create a smart form in the R/3 side
    2. Now create a function module with the corresponding export parameter:
    3. Make sure that the function module is marked remote enabled. 
    4. In NWDS  create an Adaptive RFC model which points to the FM created in R/3 under the webdynpro application
    5. Now create an application and view inside it to display the PDF and Insert a frame inside the view
    6. Create a  value node and an attribute say url of type string inside that node and bind it to the source
    7. In the doInit() method place the following code
    >    ZTest_Pdf_1_Input input = new ZTest_Pdf_Input();
    >    wdContext.nodeZTest_Pdf_Input().bind(input);      
    >    try {                       
    >            wdContext.currentZTest_Pdf_InputElement().modelObject().execute();
    >            }
    >  catch (Exception e) {
    >                        e.printStackTrace();
    >            }          
    >  wdContext.currentInternalElement().setUrl(convert(wdContext.currentOutputElement().getBin_File()));       
    Inside that view create a method to convert the string to url so that it can be passed as a string to the setUrl method of the currentContextElement() , say convet(byte[] doc_content) which return a string.
    Inside that methos write the following code,
    >         String url = "";
    >           WDWebResourceType webResType = WDWebResourceType.PDF;
    >            IWDWebResource webResource = WDWebResource.getWebResource(doc_content, webResType);
    >            try {
    >                        url = webResource.getURL();
    >            }
    >  catch (Exception e) {
    >                        e.printStackTrace();
    >            }          
    >            return url;
    Hope It will be helpful
    Regards,
    Sam Charles J.

  • Reading and displaying Ms.Word document with web dynpro java

    Hi,
    I'm using NetWever developer studio 7..0.21.
    I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
    If possible , is there a blog etc.?
    Thanks.

    Hello,
    You have to use the Office Integration Library. Please, follow the documentation below:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
    I hope this helps you.
    Regards,
    Blanca

  • Where Web Dynpro Java version of Adobe Forms are used in ESS MSS

    Hi, SDN Expert.
    I am working on research the use of Adobe Interactive Forms in the current processes of HCM ESS MSS.
    We are on ECC5.0, EP7.0, and ESS MSS SP21. We are in the midst of upgrading to ECC6.0.
    Do you know where Web Dynpro  Java version of Adobe Forms are used in ESS MSS are used? OR are they all in Web DYnpro ABAP version in ECC6.0?
    Thanks,
    KC

    Sergio,
    FYI.
    I am trying to see how the form I design/modify in TCode: SPF are working together to these piece of codes I found in NWDI WD4J pcui_gpisrsap.com --> VcISRShowForm DC --> ShowForm view:
    public void wdDoInit()
        //@@begin wdDoInit()
              InteractiveForm form =
                   (InteractiveForm) ((View) wdThis.wdGetAPI()).getElement("IsrForm");
              form.setDynamicPDF(true);
              form.bindPdfSource((IWDAttributeInfo) null);
        //@@end
    public static void wdDoModifyView(IPrivateShowForm wdThis, IPrivateShowForm.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
              logger.pathT("Entering: wdDoModifyView");
              // Dynamic context generation
              // Bind context
              if (wdContext.nodeNewGenericChildNodes().size() > 0) {
                   if (wdContext.currentContextElement().getContextToBeReset())
                        wdContext.nodeData().getContext().reset();
                   IWDNodeInfo genericNode = wdContext.nodeData().getNodeInfo();
                   IWDNodeInfo origNode =
                        wdThis
                             .wdGetVcISRShowFormController()
                             .wdGetContext()
                             .nodeGenericNode()
                             .getNodeInfo();
                   IWDNodeInfo childNode;
                   IWDNodeInfo deepChildNode;
                   for (int i = 0;
                        i < wdContext.nodeNewGenericChildNodes().size();
                        i++) {
                        childNode =
                             origNode.getChild(
                                  wdContext
                                       .nodeNewGenericChildNodes()
                                       .getElementAt(i)
                                       .getAttributeValue("name")
                                       .toString());
                        deepChildNode = childNode.getChild("DATA");
                        genericNode.addMappedChild(
                             childNode.getName(),
                             null,
                             childNode.isSingleton(),
                             childNode.isMandatorySelection(),
                             childNode.isMultipleSelection(),
                             childNode.getPathDescription(),
                             false,
                             true);
                        genericNode.getChild(childNode.getName()).addMappedChild(
                             deepChildNode.getName(),
                             null,
                             deepChildNode.isSingleton(),
                             deepChildNode.isMandatorySelection(),
                             deepChildNode.isMultipleSelection(),
                             deepChildNode.getPathDescription(),
                             false,
                             true);
                        genericNode
                             .getChild(childNode.getName())
                             .getChild(deepChildNode.getName())
                             .addAttributesFromDataNode();
              // Avoid another context generation - all context have been generated
              wdContext.nodeNewGenericChildNodes().invalidate();
              InteractiveForm form = (InteractiveForm) view.getElement("IsrForm");
              //Set the template source of the form (if necessary)
              if (wdContext
                   .currentIsrParamsElement()
                   .getSetTemplateSourceNecessary()) {
                   form.setTemplateSource(
                        wdContext.currentIsrParamsElement().getTemplateSource());
                   wdContext.currentIsrParamsElement().setSetTemplateSourceNecessary(
                        false);
              logger.pathT("Exiting: wdDoModifyView");
        //@@end

  • DM152 - Creating Interactive Forms in Web Dynpro for Java

    Hi,
    I'm looking for the "initial" Web Dynpro project used in "DM152 - Creating Interactive Forms in Web Dynpro for Java". Does anyone know where I can get this zip file?
    Thanks in advance,
    Geraldo.
    [email protected]

    Hi Geraldo,
    Refer the forum and ask Abdul or Ken to send the code
    /thread/24464 [original link is broken]
    Regards,
    Santhosh.C

Maybe you are looking for

  • Hard Drive Is Flickering:

    I have been podcasting...downloading lots of the free ones... and some of them are a few megabytes but some are 1/2 of a gigabite. This takes up space, and also OS X And OS 9 on the same 10gb hard drive. There is 1.5 gb left. My 80gb samsung hard dri

  • How do i share libraries and how do i transfer to external drive

    hi all, im fairly new to itunes and had 2 questions i was hoping to get insight on. first here is the background. i would like to be able to transfer all of my friends music into my itunes. but i now see that i do not have the drive space to do that.

  • How to add an extra page to the index.html page on dreamweaver CS6?

    How to add an extra page to the index.html page on dreamweaver CS6?

  • Streaming video over WiFi very slow

    Hi, I started to dealing this unpleasant issue since I guess I updated to last firmware on my Apple TV. Now when I want to stream video from my MacBook or iPad over wifi, the picture is not fluent at all. It is cut (not sure about this word). When I

  • How to map when the Context node has more than one element

    Dear SDN Community,   I am develping a WebDynpro java application with Adobe forms. My goal is to present a user a screen with 10 records of customer details and submit. I have created a context element for the customer(Cust#, address details etc) an