Skip to Content

 

   Recently we had a requirement wherein the client wanted a purely offline adobe form to trigger a BAPI call and save back the BAPI results to the form after execution of the call.

By “purely offline” I intend to say that though the end user will have connectivity to the server running the web service, he will not have any live webdynpro application/environment to host the pdf.

 

Required Scenario:

The adobe form (saved on a user’s local machine) should be opened, input values for a BAPI call need to be entered in the form, the BAPI should be triggered via a button (or any other suitable UI element) in the form, the BAPI output should be obtained back in the form – all of this without the support of any WebDynpro/Portal/VC application i.e. the adobe form should be standalone.

 

Pictorial Representation: 

image

 

I am sure many people out there must have already done this scenario, but I wanted to consolidate all the steps in one single place so that it might help others seeking solution for similar requirements. Experts please take this as a beginners blog! 🙂 

 

Pre-requisites for the application:

 

    • ACF, Adobe Livecycle Designer and NWDS needs to be installed on the client system where the application is to be developed.

    • The end user must have Adobe Reader.

Note : Ample documentation and version details have been provided in SDN for the above.

 

 

So here we go with the implementation:

 

1) Create a Web Service for the required BAPI/RFC in the Web Service Browser of the R/3 server. The Web Service Browser can be reached at :

http://<server* FQDN>:/sap/bc/bsp/sap/WebServiceBrowser/search.html</u></p><p>A WSDL will be created; this will be used in the adobe form.</p><p>2)* Open NetWeaver Developer Studio; create a new WebDynpro Project / DC.

3) In the above project create a new application, corresponding component, window and view.

4) Open the view; insert an Interactive form UI element in the view Layout.

5) Open the interactive form for editing.

6) Create a new Data Connection for the WSDL (generated in the first step) as shown below :

!https://weblogs.sdn.sap.com/weblogs/images/39664/datacon1.JPG|height=width: 493px; height: 296px|alt=image|width=550|src=https://weblogs.sdn.sap.com/weblogs/images/39664/datacon1.JPG|border=0!”

 

 !https://weblogs.sdn.sap.com/weblogs/images/39664/datacon2.JPG|height=323|alt=image|width=452|src=https://weblogs.sdn.sap.com/weblogs/images/39664/datacon2.JPG|border=0!

 

image

 

Select required operations from the Web Service and click “Finish”:

 

!https://weblogs.sdn.sap.com/weblogs/images/39664/datacon4.JPG|height=325|alt=image|width=453|src=https://weblogs.sdn.sap.com/weblogs/images/39664/datacon4.JPG|border=0!</body>

To report this post you need to login first.

23 Comments

You must be Logged on to comment or reply to a post.

  1. Anonymous
    During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
    (0) 
  2. Alvaro Tejada Galindo
    Hi Lisha:

    I don’t know if I ever going to have the need of do something like this…But thanks! Your blog is really good, and well explained -:D Keep blogging!!!

    Greetings,

    Blag.

    (0) 
  3. Martin Lass
    thank you for your very useful blog.

    Your approach still requires manual authentication, doesn’t it?

    Can you give me a hint how to do the authentication automatically?

    (0) 
    1. Lisha Peter Post author
      Hello,

      I have included the “SOAP.connect..” script for authentication purpose itself as we had a requirement to authenticate the user before he can submit data to SAP system.
      In case you do not require authentication, then rather that using webservices created through  WebService browser tool, you can manually create a non secure webservice for the required BAPI, and then use this WSDL while developing the form application’s data connection, but ofcourse security will be an issue then.

      Thanks
      Lisha

      (0) 
    2. Lisha Peter Post author
      Sorry Martin, I guess I misread your query, please ignore the earlier reply.
      Hmmmm.. automatic authentication : probably there can be some scripting for that as well, but have not tried that, let me try about it and get back to you.

      Thanks

      (0) 
  4. Bala Baskaran
    Hi Lisha,
         Very useful blog for a begineer like me in Adobe forms.I was trying to use webservices in adobe forms and your blog helped me to implement.I hope this will be useful in my project.

    Regards,
    Bala Baskaran.s

    (0) 
    1. Diego Gaudenzi
      Hello,

      I wonder if all you explained in your blog can be done without using the Netweaver Developer Studio and the J2EE. I am asking you this because I just got a word document explaining a similar scenario using Adobe LiveCycle Designer and a Webservice created out of a BAPI and the whole exercise is the same as your but on this one you create the connection on the Adobe Live Cycle. The problem I am having is that my word document does not mention anything about the java script for the button where you click to execute de BAPI and right now it is not working. =) I just tried to include the jave script into my form but I am getting a error saying the the SOAP.connect(“http://…..” is unknown.
      Any feedback will be appreciate.
      Thanks in advance,
      Diego.

      (0) 
      1. Lisha Peter Post author
        Hi Diego,

        As far as my observation goes, this form needs a deployment on an SAP WebAS server atleast once before you can save and use the form any number of times as an offline one.
        So we need to build it inside NWDS’s livecycle designer and deploy the form application.

        Thanks
        Lisha

        (0) 
        1. mingbin chen
          Hi Lisha,
          i’ve followed your instruction mentioned in the blog to create a data connection with WSDL(based on the RFC RFC_GETINFO),and it execute successfully. But there two problem. First,the table(binded with the response) display only one row, even if the response has several rows(Repeat Row for Each Data Item has been checked). Second, how to access the node under WSDLConnection in the data view of adobe designer(WSDLConnection is the name of the data connection created with WSDL)?

          Regards!
          Callen Chen

          (0) 
  5. Matthias Potthoff
    Hi Lisha,
    i’ve followed your instruction mentioned in the blog using a webservice based on the RFC BAPI_USER_GETLIST.
    I’ve placed the input parameters MAX_ROWS and WITH_USERNAME on the adobe form, but the only field that i’m able to show on the form is the export-parameter ROWS. If i put values in the input parameters the RFC always read all users and gives the value back in MAX_ROWS. I took the field bindings from the data view as described in the blog. 
    Have you got an idea what is going wrong? We are using NW04s SPS15 and LifeCycleDesigner 8.01.
    Thanks a lot for your help.
    (0) 
  6. amita bajaj
    Hi Lisha,

    This is a very helpful blog. Thanks for writing this.

    I tried implementing the thing, it worked fine. It was fabulous to see that working, as i was trying the thing since long, finally it worked with  your help, thanks to you. But there is one thing where i’m facing issues is: the form prompts for userid & password only once at one machine. i.e. if i have run my webdynpro application on my machine, then saved that pdf on the same machine, on executing the webservice through the form it prompts for userid pwd to me. but if i try to execute the webservice from the same form later, it doesn’t prompt for any user id & pwd.
    Can you please tell me if there is a way that Form should prompt for userid & pwd every time & every user who is trying to attempt to execute the service.

    Thanks,
    Amita

    (0) 
  7. Aditya Deshpande
    Hi Lisha,
    I have tried the following the code.
    First shot, it all worked but again when i tired doing the same, it is throwing exception atline

    xfa.connectionSet.” Connection Name”.execute(0);

    The description in catch is : UNDEFINED.

    Very strange bcos i just changed the code and reverted back to the same code and it does not work.

    Any clues how can it happen

    (0) 

Leave a Reply