Offline Interactive Form

Hi everyone,
I'm currently working on the UploadDownloadInteractiveForm for WD Java Example.
The Example from SDN is working successfully. What I don't understand is, can I only use a ready made PDF Document that is downloaded from the server like the TravelRequest.pdf?
I tried to create my own interactive form document, but in the implementation of the download view the TravelRequest.pdf is explicitly downloaded from the server. I thought I can edit the interactive form element with the built-in Adobe Lifecycle Designer and call it via the pdfSource Attribute.
How can I create my own interactive form with references to my Context in an offline scenario.
Thanks in advance,
Olaf

Hello Michael,
thank you for your answer. I checked on my project and gave you points.
Do the same while uploading this pdf,but using FileUpload element and usePdf mode on your InteractiveForm element.<
I only have one interactive form element in the form view. The download and the upload view have a FileDownload and FileUpload element. Do you mean, I should use a FileDownload element and an InteractiveForm element in the DownloadView?
I have one last question:
In the implementation of UploadDownloadInteractiveForm there are these lines of code inside wdDoInit():
String fileName = "temp//webdynpro//web//local//TutWD_UploadDownloadInteractiveForm//Components//com.sap.tut.wd.uploaddownloadinteractiveform.UploadDownloadInteractiveFormComp//TravelRequest.pdf";
     try
       File file = new File(fileName);
       FileInputStream in = new FileInputStream(file);
       ByteArrayOutputStream out = new ByteArrayOutputStream();
       int length;
       byte[] part = new byte ;
       while ((length = in.read(part)) != -1)
          out.write(part, 0, length);
       in.close();     
       wdContext.currentContextElement().setPdfSource(out.toByteArray());
I don't want to use the pdf form "TravelRequest.pdf" but the form I created in the NW Developer Studio. How can I reference my own form.
Thank you,
Olaf
Edited by: Olaf Böttcher on Jan 16, 2008 10:00 AM

Similar Messages

  • Get form values from an uploaded offline interactive form.

    Hi,
    I have created a simple offline interactive form with 2 text input elements Email and PhoneNumber.
    I have created a button on the view. In the action, I have to get the values of the Email and PhoneNumber
    How to capture input values from an offline interactive form.
    Thanks
    Srinivas

    Hi Arafat,
    I followed the how to do document https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/offline%20interactive%20pdf%20form%20using%20download.pdf , and it mentioned what you just said. But I couldn't understand your suggestion "In second view you need to embed the IF element and create the required context attributs mapping for fields. Set the pdfMode as usePDF."
    In the second view, I have created another interactive form for previewing the offline form.
    I am able to preview the offline form. On submit action (submit button is on the view), when I print the context values, I get nulls.
    Thanks
    Srinivas

  • Help for-offline interactive forms based on sending receiving mails in ABAP

    hello friends i am struck with a requirement of my client.
    I am new to Forms and WEBDYNPRO and I have to cover a scenario where I have to develop,'offline interactive forms based on sending receiving emails '..
    i browsed a bit and with all the luck found a very good resource.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cacb9a7d-0c01-0010-1281-be4962c9ab3e
    but the problem is it is in JAVA.. I dont know JAVA..I know ABAP..
    can any one give me similar tutorial in ABAP or any other related links ..
    waiting to give Big Reward Points...

    Try these links...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/lw/uuid/90e279fe-0107-2a10-bc85-bd96ab9738a7
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5087262b-59ef-2910-abb1-957000b7c3d4
    Hope they help.....
    Rao

  • Missing code in "Offline Interactive Forms Using ABAP" SDN document?

    I am trying to build a sample offline form scenario using the code published in the SDN document "Offline Interactive Forms Using ABAP" written by Vani Krishnamoorthy. Everything works perfectly up to the point where we instantiate the PDF Object to extract the data from the form. Then there seems to be some code missing just before we call the method SET_DOCUMENT. We are supposed to export the parameter pdfdata = pdf_data , but I cannot find where pdf_data variable is declared or assigned. Also, an ENDTRY statement seems to be missing.
    Has anyone had success with Vani's offline scenario, and if so, do you know what code is missing, if any?
    Thanks in advance for any help you can offer.

    I found the missing code in sample program FP_PDF_TEST_06. Everything works well now.
    The PDF file that was uploaded from the PC first needs to be converted from binary to XSTRING before you can create the PDF object:
    data: lt_rawtab type standard table of raw255,
            g_pdfdata type xstring,
            l_len type i.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = l_filename
          filetype                = 'BIN'
        importing
          filelength              = l_len
        changing
          data_tab                = lt_rawtab   "PDF file (binary)
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          etc. etc.
    Convert binary tab to Xstring
      call function 'SCMS_BINARY_TO_XSTRING'
        exporting
          input_length = l_len
        importing
          buffer       = g_pdfdata              "converted to Xstring         
        tables
          binary_tab   = lt_rawtab
        exceptions
          failed       = 1
          others       = 2.
      if sy-subrc is not initial.
        message id sy-msgid type sy-msgty number sy-msgno
                   with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    Instantiate PDF object..
      data: l_fp     type ref to if_fp value is initial,
            l_pdfobj type ref to if_fp_pdf_object value is initial,
            l_fpex    type ref to cx_fp_runtime,
            l_type    type string,
            l_errmsg  type string.
    Get FP reference
      l_fp = cl_fp=>get_reference( ).
    Handle exceptions with Try..Endtry
      try.
      Create PDF Object using destination 'ADS' (<--this is how it is
      defined in SM59)
          l_pdfobj = l_fp->create_pdf_object( connection = 'ADS' ).
      Set document
          l_pdfobj->set_document( exporting pdfdata = g_pdfdata ). 
      Tell PDF object to extract data
          l_pdfobj->set_extractdata( ).
      Execute the call to ADS
          l_pdfobj->execute( ).
        catch cx_fp_runtime_internal
              cx_fp_runtime_system
              cx_fp_runtime_usage into l_fpex.
          case cl_abap_classdescr=>get_class_name( l_fpex ).
            when '\CLASS=CX_FP_RUNTIME_INTERNAL'.
              l_type = 'INTERNAL ERROR'.
            when '\CLASS=CX_FP_RUNTIME_SYSTEM'.
              l_type = 'SYSTEM ERROR'.
            when '\CLASS=CX_FP_RUNTIME_USAGE'.
              l_type = 'USAGE ERROR'.
          endcase.
          l_errmsg = l_fpex->get_short( ).
          message e010(ad) with l_type ':' l_errmsg.
      endtry.

  • Offline interactive forms based on sending receiving emails in ABAP

    hello friends i am struck with a requirement of my client.
    I am new to Forms and WEBDYNPRO and I have to cover a scenario where I have to develop,'offline interactive forms based on sending receiving emails '..
    i browsed a bit and with all the luck found a very good resource.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cacb9a7d-0c01-0010-1281-be4962c9ab3e
    but the problem is it is in JAVA.. I dont know JAVA..I know ABAP..
    can any one give me similar tutorial in ABAP or any other related links ..
    waiting to give Big Reward Points...

    Hi,
    Go thru this [Article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9051b07e-0c01-0010-87bc-e3d527153a31].
    Regards,
    Padmam.

  • Create offline interactive forms using webdynpro java with XML data source

    Hi Gurus,
    I am having a scenario like below:
    Sales guy request for order list online from portal- Sytem receives the request and creat XML file- from xml file need to create a Offline interactive form-Sales guy fills it offline at customer site- uploads in portal -on submit xml has to be generated with captured data at customer site-Process to  ECC.
    So my questions are:
    How to create the offline interactive form  from XML?
    Once filled offline interactive form uploaded into portal how to create XML again from pdf ?
    Please give some idea on this as this is my first Offline interactive form using XML datasource.
    Thanks
    Ravi
    Edited by: Ravi Sunkara on Jul 27, 2010 5:25 PM

    Hi Otto,
    Sorry for replying lately. First of all  I did not get your suggestions as your are editing the same posting.
    Secondly we will be using WDJ. Actually in between SAP Portal and ECC we are having adobe LCES so we need to create Interactive form using XML only. Once it is filled again the form will be submitted to another application which is running on FLEX, which will process the order.
    if you can give me your personal id i can send you the detailed process
    Thanks
    Ravi

  • Offline Interactive Forms (Web Dynpro for ABAP)

    Hi Everyone.
    Please help me!!!
    Upload Offline PDF file to xstring context attribute by file upload in Web Dynpro parts.
    Set Offline PDF file uploaded via xstring context attribute in 'pdfSource' property of interactive form.
    I wish to view Offline PDF file and get data to context in 'dataSource' property of interactive form.
    Below restriction.
    - Web Dynpro for ABAP
    - Offline Interactive Forms
    - Zero Client Installation
    - ABAP Dictionary-Based Interface
    NetWeaver 7.0 (NW 7.0) SPS16

    Hi Daisuke,
    As per your requirement, to get done your work you need to create two Adobe Forms , one is for Offline Interactive Form and other is Online Interactive Form.
    In offline Interactive you design your form and define the Layout type as zci layout and Abap Dictionary Based interface. And by executing the form you can save the form to your desktop.
    Now in online Interactive Form you create the context similar to the one which has been created in the Offline Interactive Form. Now in one view you define the file upload functionality and in other view you define the adobe interactive form, for this the interface is automatically as it asks for the context and its of type XML based interface, also do maintain the context variable something like "PDFDATASTRING" with type XSTRING in the Component Controller and now in adobe view you give the property pdfstring as "PDFDATASTRING" and dont forget to provide the navigation of these two view, and set the File Upload View as default view.
    The above functionality can help you in some way or the other.
    Regards
    Pradeep Goli

  • Sending Offline Interactive Form Via Email

    Hi,
    I am running NW 2004s SPS09 and trying to configure GP to use offline adobe interactive forms.  As of now, I am able to create a callable object from an Adobe template, prefill fields from other background execution/web service callable objects, and launch a process when the form is submitted via email.  I am having trouble routing the form to the next processor through email.  I created an interactive form callable object, checked 'Enable Use In Guided Procedures' and selected 'Create Offline Interactive Form And Send By E-Mail'.  My first thought was that there was some delay in the sending of emails, but callable objects in other processes that send plain text notifications work fine.  The process does not enter an erroneous state and waits at that action.  Looking at the GP monitor under NW administration, the correct processor is set for the action, but the task does not appear in the user's UWL or GP runtime center (I figure this is because the task is meant to be completed offline).  Any suggestions would be much appreciated.  Thanks!
    ~Greg

    Turned out the 'switchToNewMailCommunication' property for the GP service was set to true when it should have been false.
    ~Greg

  • Problem In offline Interactive Form

    Hi All,
    I have created a offline Interactive form application based on download functionality, using Adobe form in  NWDS  WDJ . So In my application I have created one download view & In the implementation part, I have written the code in wdInit() method as,
    public void wdDoInit()
        //@@begin wdDoInit()
        IWDAttributeInfo attInfo = wdContext.currentContextElement().node().getNodeInfo().getAttribute("pdfsource");
        ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
        IModifiableSimpleValueSet binaryType = type.getSVServices().getModifiableSimpleValueSet();
         binaryType.put("FileName","TravelRequest.pdf");
         binaryType.put("MimeType","WDWebResourceType.PDF");
         String Filename =  "C:
    Shital
    offlineInteractiveForm
    src
    mimes
    Components
    com.sap.offlineinteractiveform.shital.UploadDownloadformComp
    TravelRequest.pdf";
    //@@end
    When I am trying to deploy & run my application ,It's giving me the Exception as,
    java.io.FileNotFoundException: C:\Shital\offlineInteractiveForm\src\mimes\Components\com.sap.offlineinteractiveform.shital.UploadDownloadformComp\TravelRequest.pdf (The system cannot find the path specified)
    Help me to  solve this problem..?
    Thanks & Regards,
    Shital.

    Hi Shital,
    try to change the filename location mentioned below, replace the code below
    String Filename = "temp\\webdynpro\\web\\local\\offlineInteractiveForm\\Components\\com.sap.offlineinteractiveform.shital.UploadDownloadformComp\\TravelRequest.pdf";

  • F4 help in Offline Interactive form

    Hi Experts,
    I have got the F4 help in online interactive form created by Web Dynpro using value help.
    I need to get F4 help in OFFLINE interactive form where the user even need not to connect to SAP system.
    Plz Help
    Thanks & Regards
    Arvind

    Hi,
    I am using value help in following way:
    1) Value help drop down list: I have field which is linked to MARA-MATNR in my context. When I try to create a value help drop down list and bind it to MARA-MATNR field, the value help drop down does work but just only once. After that I am not able to use F4 help on that field. Can you please let me know if I am missing any other settings as I am not doing any settings apart from what I wrote. or please provide me link for step by step screen shot,
    Note. I search many site but they are give same method but i am unable to take f4 help in adobe form

  • Error while submitting offline Interactive forms to GP

    Hello experts,
      I get the following exception when i press the 'submit' button of the interactive form. The required configuration is correct and the URL generated is also correct.
    "Error while processing document via ADS
    com.sap.caf.eu.gp.base.exception.EngineException: Error while processing document via ADS
    at com.sap.caf.eu.gp.model.iforms.adapter.pdf.AdobePDFAdapter.processPDF(AdobePDFAdapter.java:825)
    Any help would be apreciated.
    regards,
    Anup

    Hi Hanoz,
    As you said, I have created an online application with 2 input fields. Name and CostCenter. I am saving the blank pdf on my desktop. In another project i have 2 views. Upload and Form View. In Upload View, using a FileUpload, i am able to fetch the pdf from desktop and on action of submit, it goes to Form view. The Form is opening with the Data which i entered Offline. Thatz because i gave (Interactive Form Mode - "UsePDF". If i give UpdateDatainPDF, it is showing a blank pdf. Hence i used "USEPDF". After that i have a Submit button to which an "ONACTIONsubmit" is mapped to Interactive Form PDF submit property. 
    OnactionSubmit()
    wdComponentAPI.getMessageManager().reportSuccess("hai");
    String name = wdContext.currentTravelDataElement().getEmployeeName();
    String costcenter = wdContext.currentTravelDataElement().getCostCenter();
    wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Form submitted: Name="+ name+ " costcenter="+ costcenter +"");
    PDF
    Name - Form
    CostCenter - 1000
    Initially if i click Submit, Output Comes as ......
    hai
    Form submitted: Name=null costcenter=null
    If i enter some space inside the name field like name - "Form " or even "Forma".....
    the output  comes as
    hai
    Form submitted: Name=Form costcenter=1000 (though i have used interactive form mode=usepdf).
    or
    hai
    Form submitted: Name=Forma costcenter=1000    (though i have used interactive form mode=usepdf).
    If i enter some value inside the form field, how it is able to take the correct value on action submit. I tried many blogs. But i am not able to fetch the values unless i change the field values inside the form? What else can i do? how did your project work? Can you please help in resolving this issue?
    Thanx and Regards,
    Divya

  • About dynamic offline interactive form

    I have a request for working with pdfs in netweaver java, but the requisites are quite tight and I don't know if it will be possible to achieve with interactive forms.
    I need to:
    1- Generate a pdf file (many in fact) using preloaded data from backend for offline use.
    2- The pdf must be interactive so the user can introduce new data or modify the preloaded data.
    3- The user should be able to change dynamically the format of the pdf: add rows to tables, make visible/invisible parts of the document, fire different events...
    4- The user should be able to save his work in the file including the format (if he has added rows to a table or made invisible an object it should be saved).
    5- The user should be able to send the data to the server through a send button.
    In short, strange as it may sound, I need to simulate a web dynpro application using an offline pdf.
    I've been searching and I think 1 and 2 are not a problem. I would just need to use a template created in LiveCycle Designer and link the data source to Web Dynpro context. Please correct me if I'm wrong.
    I think 3 can be done using scripting and events set in LiveCycle Designer, though I have 0 experience with it.
    I don't know if I can achieve 4. From what I've read dynamic content can't be saved. That is, if the user changes dynamically the pdf format and saves it will be lost when opened again. Is it true?
    I don't know about 5 either. With online interactive form of course, but with offline? I've seen examples that use and upload control in a Web Dynpro application as an alternative but I'd like to avoid that if possible.
    I'd like to get some indications about if these points can be done or not, if possible with some references that illustrate it (links to blogs, sap help...)
    Some tips and references about how to implement the different parts of this scenario (specially from point 3 and beyond) would be really welcome.
    Thanks in advance.

    Almost all things you mentioned are quite possible with Adobe Forms.
    1- Generate a pdf file (many in fact) using preloaded data from backend for offline use.
    You can do this by creating a Interactive Form using ABAP or create an online form using WD ABAP and just save the required form when done to be used for offline use
    2- The pdf must be interactive so the user can introduce new data or modify the preloaded data.
    You need to have Adobe forms License in case you want your forms to be interactive. In ABAP I think in the driver program you need to set FILLABLE = X or something like that and for WD there is enabled property which needs to be set true.
    3- The user should be able to change dynamically the format of the pdf: add rows to tables, make visible/invisible parts of the document, fire different events...
    The user can add rows to table and depending upon conditions you can set the required fields as visible/invisble
    4- The user should be able to save his work in the file including the format (if he has added rows to a table or made invisible an object it should be saved).
    If your form is fillable and interactive the data can be saved by end user.
    5- The user should be able to send the data to the server through a send button.
    There are different types of Submit options available. You can use Submit by email so that the user can submit the form via email.
    Also I would strongly advise just try Search on forum and I am sure that you would get plenty of links/examples to work with.

  • Problem with native offline Interactive Forms in webdynpro java.

    I have a java webdynpro project build like the one in this tutorial:
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/how-to-guides-rig-official/netweaver-2004/web-application-server/how%20to%20create%20online%20and%20offline%20forms%20in%20web%20dynpro%20(NW2004).pdf
    The "Online" part of the tutorial is working but in the offline scenario I get no data in WebDynpro from the Interactive form (all of Context Attributes have a value "null") after the use of "Submit to SAP" button. this is the button from the Web Dynpro Native Library in the LC Designer.
    the versioning information:
    Netweaver 7.0 WAS on SP13
    ADS SP13
    Lifecycle designer 7.1
    We updated the ZCI template according to the SAP notes.
    Does anyone know this problem and how to fix it ?

    Hi niru,
    To work on adobe forms in webdynpro java you need to install ALCD(Adobe Life Cycle Designer) along with NWDS(NetWeaver Developer Studio).
    To know about adobe forms in webdynpro check the following link
    http://wwwimages.adobe.com/www.adobe.com/enterprise/partners/pdfs/solution_in_detail_interactive_forms.pdf
    https://www.sdn.sap.com/irj/scn/elearn?rid=/webcontent/uuid/f5718380-0c01-0010-aebf-8786fb890302 [original link is broken]
    For example check the follwoing link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0401535-f81c-2a10-0192-ffd41e8e8d59
    /docs/DOC-8661#section20 [original link is broken]
    Regards,
    Sam Charles J.

  • Offline Interactive Form Upload for creating Business Transaction

    Hi All,
    I am using CRM Web Request for creating Business Transaction through Offline Interactive Adobe Form.
    For that i have done PDF upload coding and then converting the PDF form to XML format.
    Now the XML format of form is converted to string from xstring.
    And then passing the XML to function module CRM_WEBREQ_EXTERN_CREATE_DOC along with the corresponding request category configured for the web request.Created the corresponding request category structure also.
    still the business transaction is not getting created, the following error message is coming "XML incompatible for data structure of request category" .
    Please respond if anybody has done the same scenario.
    Or is there any other process that can be followed to upload offline interactive adobe form to create one order object.
    Regards,
    Madhu

    Hi Maarten,
    Is that aatribute binded to Dropdown field lying under a node of cardinality 1..1??
    I think if that's so, ur error can be resolved by just putting this attribute in a node with cardinality 1..n.
    Hope this helps..!!
    Thanks,
    Amita

  • Security for Offline Interactive Form in Guided Procedure

    Hi,
    I have a senario that require a form to be able to downloaded as an offline form from Guided Procedure with security mechanism. I know that Adobe interactive form able to contain scripting like FormCalc and Javascript.
    I was thinking whether is it possible to get the initiator & approver information like User ID and Password and assign it to the variable in the form using javascript, so that only the authorise personnel able to login to the form whereas the unauthorise personnel who have the form but unable to login and edit the form. Please advice. Thanks
    Best Regards,
    Rayden

    Hi,
    I also have a similar issue where i have to validate whether the user submitting the offline form is an user who has authorisation ( a table storing user credentails) .
    Were you able to solve this issue of security in offline form.
    Appreciate if you can throw some light.
    Regards
    Jayesh

Maybe you are looking for

  • Can I Use Time Machine Restore Files to a New Computer?

    I use Time Machine to backup my data to an external drive. Let's say that my computer crashes and I buy a new computer with Leopard installed. Two Questions: If I plug my Time Machine drive into the new computer, will I be able to recreate the old fi

  • Problems installing CS 1.1

    I am trying to install CreativeSuite Premium on a new computer.  I've called customer service, and received some help, but am at a point where they say they cannot help me. My husband purchased CS Premium in a regular store about 4-5 years ago.  We i

  • Parsing HTML returned from CFHTTP

    I am trying to create a function that will parse out individual pieces of information returned by a cfhttp request. I need the name of the city, country, and state returned. I need the script to start at the word " CITY: ", " STATE: ", and " COUNTRY:

  • Display not staying put

    My shiny new iMac doesn't seem to want to stay at the angle I put it at. Does anyone know any way of tightening up the stand or is it an Applecare job? Thanks

  • Please guide me for Architecture

    Dear All, We have 7 Machines with good specs installed win 2003 server. We need to make Architecture for messaging servers. Let me guide for feasible architecture..How many machines to be used as database and how many for Middle-tier(oracle wireless)