LeverX SAP ABAP Tutorial - Creating and Calling Web Services
Upcoming SlideShare
Loading in...5
×
 

LeverX SAP ABAP Tutorial - Creating and Calling Web Services

on

  • 4,406 views

The SAP Web Application Server allows companies to extend their solutions by exposing and integrating Web services. The SAP NetWeaver Developer Studio provides an environment for publishing, ...

The SAP Web Application Server allows companies to extend their solutions by exposing and integrating Web services. The SAP NetWeaver Developer Studio provides an environment for publishing, discovering, and accessing Web services. Therefore, it allows the SAP Web Application Server to act both as a “server” and as a “client” for Web services.

Statistics

Views

Total Views
4,406
Views on SlideShare
4,406
Embed Views
0

Actions

Likes
1
Downloads
131
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

LeverX SAP ABAP Tutorial - Creating and Calling Web Services LeverX SAP ABAP Tutorial - Creating and Calling Web Services Presentation Transcript

  • Essential SAP ABAP TutorialHow To Use WEB Services In SAP ABAP By Eugene Ostroumov 1 Copyrighted 2012 by LeverX, Inc.
  • Tutorial OverviewIn this tutorial you will learn how to create and call WEB Services inABAP. Tutorial consists of two parts: 1) how to create WEB Service based on Function Module; 2) how to call WEB Service via ABAPEach part is a step-by-step instruction that will guide you thru thewhole process of creation 2 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 1Creating afunction modulewithimport and exportparameters 3 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 2As an example offunctional modulelogic let’s extractactive users 4 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 3Mark the functionmodule as aRemote-EnabledModule 5 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 4Create aWeb Servicebased on thefunction module 6 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 5Enter a name anddescription for theWeb Service Name Description 7 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 6The name offunctional moduleis enteredautomatically 8 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 7Choose aprofile forSecurity Settings 9 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 8Enter the name ofthe package andtransport requestor chooseLocal Object 10 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 9Creation of WebService is finishedIt will be activatedafter pressing“Complete” button 11 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 10After creation of Web Service it is important to get WSDL document. It ismain key for access to your Web Service. Use the URL or save it to file. URL Save to file 12 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 11The correctnessof the WSDLdocument can bechecked in thetransactionSOAMANAGER:Path:BusinessAdministration =>Web-ServiceAdministration 13 Copyrighted 2012 by LeverX, Inc.
  • How to create WEB Service based on FM Step 12Web Service canbe found in thetransaction SICFPath:default_host =>sap => bc =>srt => rfc => sap 14 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 1To call WebService it isnecessary tocreate a proxyobjectUse transactionSE80 to do this 15 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 2Choose“Service Consumer”type of proxy 16 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 3Select a source ofWSDL. In our caseit is “URL/HTTPDestination” 17 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 4Define URL ofWSDL Document(Step 10 of creationof Web Service) 18 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 5Enter the name ofthe package andtransport requestor chooseLocal Object 19 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 6Creation of Proxyis finished. Youshould activate itafter pressing“Complete” button 20 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 7Enter User name andPassword to readWSDL DocumentThis step doesn’texist is case of localfile for WSDLDocument 21 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAPStep 8 Activate the Proxy 22 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 9Now we need to Choose “Consumer Proxy”create a locallogical port intransactionSOAMANAGER Search your Proxy by name Choose your ProxyPath:Business Apply SelectionAdministration => Create Logical PortWeb-ServiceAdministration 23 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 10Enter generalconfigurationsettingsYou can useWSDL documentor do it manually 24 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 11Save logical portafter it isgenerated Save 25 Copyrighted 2012 by LeverX, Inc.
  • How to call WEB Service using ABAP Step 12 REPORT zws_call.Now everything is done DATA: lr_proxy TYPE REF TO zws_co_z_get_active_users. DATA: o_err TYPE REF TO cx_root.and you can call Web DATA: DATA: output TYPE zws_zws_users_response. input TYPE zws_zws_users.Service from your ABAP DATA: ls_item TYPE LINE OF zws_zws_users_response-users-item. TRY.program CREATE OBJECT lr_proxy EXPORTING logical_port_name = GET_USERS. CATCH cx_ai_system_fault INTO o_err.Here is an example of a MESSAGE o_err TYPE I. ENDTRY. input-rfc_only = space.report that shows all active TRY. CALL METHOD lr_proxy->zws_usersusers EXPORTING input = input IMPORTING output = output. CATCH cx_ai_system_fault INTO o_err. MESSAGE o_err TYPE I. CATCH cx_ai_application_fault INTO o_err. MESSAGE o_err TYPE I. ENDTRY. LOOP AT output-users-item INTO ls_item. WRITE: / ls_item-bname, ls_item-tcode, ls_item-term. ENDLOOP. 26 Copyrighted 2012 by LeverX, Inc.
  • ConclusionWeb Services allow to increase functionality of your systemand leverage your investments Mobile applications Web applications WEB Another systems Your SAP system 27 Copyrighted 2012 by LeverX, Inc.
  • Contact InformationPlease contact us for more information about our services or solutions available. LeverX, Inc. 800 West El Camino Real, Suite 180 Mountain View, CA 94040 USA Tel: (650) 625 – 8347 Web Site: www.LeverX.com 28 Copyrighted 2012 by LeverX, Inc.