Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

In part 1 (http://scn.sap.com/docs/DOC-42813), I discussed the following scenario: you have an interactive form embedded on the ABAP WebDynpro view and want to email a static copy of the form to an internet email address.

In this document, I will extend the emailing of the form to actually send an interactive form to the email address.  This will allow the recipient to edit the form and submit a call to SAP for updating or retrieving form values.  You will need the WSDL from a web service which exists in the SAP environment.  The form will call the web service and will send/retrieve values to/from SAP.  If you have already looked at Steps 1 through 11 in part 1, go directly to Step 12 for the additional steps for emailing an interactive form.

Step 12:  Emailing an Interactive Form

Now that we have a working form that is able to be emailed, let’s make the form interactive and allow the emailed receiver able to interact with the form and send or receive data to/from SAP.

In one of my web service demo documents (http://scn.sap.com/docs/DOC-38805), I created a web service, which I will also use to call in this forms example.  The web service requires authentication by a valid user to access it.  The WSDL for the service, which I obtained from SOAMANAGER, is as follows:

http://<your server>/sap/bc/srt/wsdl/srvc_5139057D1E052530E10080000A0D9C1F/wsdl11/allinone/ws_policy/document?sap-client=222

Go into the form editor for form:  ZADB_FRM_EMAIL_1 and right click in the data view to select “New Data Connection”:

Select “WSDL File” and give the connection a name (then choose “Next”):

Enter the WSDL (then choose “Next”):

Select the Operation (then choose “Next”):

Select the Security (then choose “Finish”):

*Since my Web Service is required to only accept a valid login, I’m choosing to pass credentials.

Here is some more information on the types of security options available:

Now drag the “DataConnection1” Node from the Data View onto your form:

Notice you get the button which is the action trigger to call the web service.  I also got one output field to display the contents of the value returned by the web service.  Activate the form.

Back in the ABAP WebDynpro editor, enable the InteractiveForm element (set Enabled):

Remember the one line of code which was commented out in the ONACTIONEMAILFORM?  Now it’s time to uncomment that line so the form is editable by the person receiving the email.

fp_docparams-fillable = 'X'. "Only Use this is Form is Fillable by receiver.

Activate everything and test:

First:  Email the Form

When the form arrives in the email, try selecting the Hello World Button:

Notice, a popup opens requesting credentials:

After logging in, the SAP Web Service is called and the form is updated with the data from SAP:

Labels in this area