exposing rfc as web service and consuming web service in interactive forms in abap

12
7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 1/12  SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP Applies to: SAP Interactive Forms by Adobe and Web Service in ABAP. For more information, visit SAP Interactive forms by Adobe Home page. For more information, visit the Web Services homepageSummary This document explains step by step procedure to expose RFC Function module as web service and consuming that web service in Adobe interactive forms for offline use. Author: Sanjeeva Reddy Gujjula Company: Yash Technologies Pvt Ltd Created on: 08 October 2009 Author Bio Sanjeeva Reddy Gujjula is currently working with Yash Technologies Pvt Ltd as Consultant. He has over four years of experience in SAP technologies like ABAP, Enterprise Portal, WebDynpro for JAVA and WebDynpro for ABAP and Adobe interactive forms.

Upload: alexvladim

Post on 14-Apr-2018

232 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 1/12

 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 1

Exposing RFC as Web Service andConsuming Web Service inInteractive Forms in ABAP

Applies to:

SAP Interactive Forms by Adobe and Web Service in ABAP. For more information, visit  SAP Interactiveforms by Adobe Home page. For more information, visit the Web Services homepage. 

Summary

This document explains step by step procedure to expose RFC Function module as web service andconsuming that web service in Adobe interactive forms for offline use.

Author: Sanjeeva Reddy Gujjula

Company: Yash Technologies Pvt Ltd

Created on: 08 October 2009

Author Bio

Sanjeeva Reddy Gujjula is currently working with Yash Technologies Pvt Ltd as Consultant. He has over four years of experience in SAP technologies like ABAP, Enterprise Portal, WebDynpro for JAVA andWebDynpro for ABAP and Adobe interactive forms.

Page 2: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 2/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 2

Table of Contents

Introduction ................................................................................................................................................... 3 Creation of Web Service .......................... .......................... ......................... ........................ ....................... 3 

Creation of Interface...................................................................................................................................... 9 Creation of Form Layout ........................... ........................ ......................... .......................... .......................... 9 Related Content .......................... ......................... ......................... ......................... ........................... .......... 11

 Disclaimer and Liability Notice .......................... ......................... ......................... ......................... ................ 12 

Page 3: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 3/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 3

Introduction

 Adobe forms can be used for online and offline purpose. In the case of offline usage we can integrate webservice, so user can save adobe form locally and can fill data and submit data by clicking button. By callingWeb Service on clicking submit button, it will connect to SAP System and process data. For this purpose wecan use RFC enabled function modules as web service. If we provide logon details while configuring WebService, user will not prompt for password other user will be prompted for password. Based on theapplication usage proper security can also be implemented here.

This document is divided into 3 steps and explained with screen-shots.

1. Creation of Web Service

2. Creation of Interface

3. Creation of Adobe Layout

Creation of Web Service

Go to SE80 and select Package in Dropdown and right click on package and choose Create->EnterpriseService/Web Service->Web Service

Web Service Wizard will open as shown below

Page 4: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 4/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 4

Give Service Name and Short Text and specify Endpoint Type (This case it is Function Module)

Enter Function Module and choose check box Maping der Namen

Page 5: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 5/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 5

Leave Basic Authorization as it is and select Check box Release for Runtime 

Page 6: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 6/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 6

Finally Complete

Create or assign to a request number in pop-ups after complete

Go to WSCONFIG and provide Service Definition and Variant

Double click on Service and screen will look like as fallows and click on ICF Details in new screen

Page 7: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 7/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 7

In new screen double click on the service opened

Change from display mode to Change mode and provide Logon Data (Client user id and password) and savethe changes.

Page 8: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 8/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 8

Go to WSADMIN and Select your Service in Tree and press button WSDL on tool Bar, pop up will come asshow on screen Shot and leave as it is and press ok.

Browser will start with URL like:

http://<FQDN>:8000/sap/bc/srt/rfc/sap/ZBANKDETAILS1?sap-client=900&wsdl=1.1

Page 9: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 9/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 9

Creation of Interface

Create one dummy interface using SFP without any parameters.

Creation of Form Layout

Create form using Interface created in above step

In data view Palette right click and choose New Data Connection

Specify Data Connection name and choose radio button WSDL as shown below

Enter URL Generated in End of Step1 and press next

Choose Operation and Press Finish

Page 10: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 10/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 10

 After Finishing, Data View Palette will get updated with some data along with one button. That button used toexecute Function Module wrapped in Web Service

Design Layout with Import and Export Parameters and Button as shown above.

Now By executing the form in Form Builder you can get PDF Generated and by saving locally use that PDFfor Offline Interactive form.

Page 11: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 11/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

© 2009 SAP AG 11

Related Content

SAP Interactive Forms by Adobe 

Creating a Web Service 

PDF-Based Print Forms

For more information, visit the Web Services homepage. 

For more information, visit SAP Interactive forms by Adobe Home page 

Page 12: Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

7/30/2019 Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP

http://slidepdf.com/reader/full/exposing-rfc-as-web-service-and-consuming-web-service-in-interactive-forms 12/12

Exposing RFC as Web Service and Consuming Web Service in Interactive Forms in ABAP 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not

supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,

and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and

services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this

document.