0
Essential         SAP ABAP TutorialHow To Use WEB Services In SAP ABAP         By Eugene Ostroumov                  1     ...
Tutorial OverviewIn this tutorial you will learn how to create and call WEB Services inABAP. Tutorial consists of two part...
How to create WEB Service based on FM Step 1Creating afunction modulewithimport and exportparameters                      ...
How to create WEB Service based on FM Step 2As an example offunctional modulelogic let’s extractactive users              ...
How to create WEB Service based on FM Step 3Mark the functionmodule as aRemote-EnabledModule                      5       ...
How to create WEB Service based on FM Step 4Create aWeb Servicebased on thefunction module                      6         ...
How to create WEB Service based on FM Step 5Enter a name anddescription for theWeb Service                          Name  ...
How to create WEB Service based on FM Step 6The name offunctional moduleis enteredautomatically                      8    ...
How to create WEB Service based on FM Step 7Choose aprofile forSecurity Settings                      9              Copyr...
How to create WEB Service based on FM Step 8Enter the name ofthe package andtransport requestor chooseLocal Object        ...
How to create WEB Service based on FM Step 9Creation of WebService is finishedIt will be activatedafter pressing“Complete”...
How to create WEB Service based on FM Step 10After creation of Web Service it is important to get WSDL document. It ismain...
How to create WEB Service based on FM  Step 11The correctnessof the WSDLdocument can bechecked in thetransactionSOAMANAGER...
How to create WEB Service based on FM Step 12Web Service canbe found in thetransaction SICFPath:default_host =>sap => bc =...
How to call WEB Service using ABAP Step 1To call WebService it isnecessary tocreate a proxyobjectUse transactionSE80 to do...
How to call WEB Service using ABAP Step 2Choose“Service Consumer”type of proxy                      16              Copyri...
How to call WEB Service using ABAP Step 3Select a source ofWSDL. In our caseit is “URL/HTTPDestination”                   ...
How to call WEB Service using ABAP Step 4Define URL ofWSDL Document(Step 10 of creationof Web Service)                    ...
How to call WEB Service using ABAP Step 5Enter the name ofthe package andtransport requestor chooseLocal Object           ...
How to call WEB Service using ABAP Step 6Creation of Proxyis finished. Youshould activate itafter pressing“Complete” butto...
How to call WEB Service using ABAP Step 7Enter User name andPassword to readWSDL DocumentThis step doesn’texist is case of...
How to call WEB Service using ABAPStep 8 Activate the Proxy                      22             Copyrighted 2012 by LeverX...
How to call WEB Service using ABAP Step 9Now we need to             Choose “Consumer Proxy”create a locallogical port intr...
How to call WEB Service using ABAP Step 10Enter generalconfigurationsettingsYou can useWSDL documentor do it manually     ...
How to call WEB Service using ABAP Step 11Save logical portafter it isgenerated              Save                      25 ...
How to call WEB Service using ABAP Step 12                               REPORT    zws_call.Now everything is done        ...
ConclusionWeb Services allow to increase functionality of your systemand leverage your investments    Mobile applications ...
Contact InformationPlease contact us for more information about our services or solutions available.                      ...
Upcoming SlideShare
Loading in...5
×

LeverX SAP ABAP Tutorial - Creating and Calling Web Services

4,359

Published on

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.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,359
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
157
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "LeverX SAP ABAP Tutorial - Creating and Calling Web Services"

  1. 1. Essential SAP ABAP TutorialHow To Use WEB Services In SAP ABAP By Eugene Ostroumov 1 Copyrighted 2012 by LeverX, Inc.
  2. 2. 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.
  3. 3. How to create WEB Service based on FM Step 1Creating afunction modulewithimport and exportparameters 3 Copyrighted 2012 by LeverX, Inc.
  4. 4. How to create WEB Service based on FM Step 2As an example offunctional modulelogic let’s extractactive users 4 Copyrighted 2012 by LeverX, Inc.
  5. 5. How to create WEB Service based on FM Step 3Mark the functionmodule as aRemote-EnabledModule 5 Copyrighted 2012 by LeverX, Inc.
  6. 6. How to create WEB Service based on FM Step 4Create aWeb Servicebased on thefunction module 6 Copyrighted 2012 by LeverX, Inc.
  7. 7. How to create WEB Service based on FM Step 5Enter a name anddescription for theWeb Service Name Description 7 Copyrighted 2012 by LeverX, Inc.
  8. 8. How to create WEB Service based on FM Step 6The name offunctional moduleis enteredautomatically 8 Copyrighted 2012 by LeverX, Inc.
  9. 9. How to create WEB Service based on FM Step 7Choose aprofile forSecurity Settings 9 Copyrighted 2012 by LeverX, Inc.
  10. 10. How to create WEB Service based on FM Step 8Enter the name ofthe package andtransport requestor chooseLocal Object 10 Copyrighted 2012 by LeverX, Inc.
  11. 11. 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.
  12. 12. 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.
  13. 13. 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.
  14. 14. 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.
  15. 15. 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.
  16. 16. How to call WEB Service using ABAP Step 2Choose“Service Consumer”type of proxy 16 Copyrighted 2012 by LeverX, Inc.
  17. 17. How to call WEB Service using ABAP Step 3Select a source ofWSDL. In our caseit is “URL/HTTPDestination” 17 Copyrighted 2012 by LeverX, Inc.
  18. 18. How to call WEB Service using ABAP Step 4Define URL ofWSDL Document(Step 10 of creationof Web Service) 18 Copyrighted 2012 by LeverX, Inc.
  19. 19. How to call WEB Service using ABAP Step 5Enter the name ofthe package andtransport requestor chooseLocal Object 19 Copyrighted 2012 by LeverX, Inc.
  20. 20. How to call WEB Service using ABAP Step 6Creation of Proxyis finished. Youshould activate itafter pressing“Complete” button 20 Copyrighted 2012 by LeverX, Inc.
  21. 21. 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.
  22. 22. How to call WEB Service using ABAPStep 8 Activate the Proxy 22 Copyrighted 2012 by LeverX, Inc.
  23. 23. 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.
  24. 24. How to call WEB Service using ABAP Step 10Enter generalconfigurationsettingsYou can useWSDL documentor do it manually 24 Copyrighted 2012 by LeverX, Inc.
  25. 25. How to call WEB Service using ABAP Step 11Save logical portafter it isgenerated Save 25 Copyrighted 2012 by LeverX, Inc.
  26. 26. 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.
  27. 27. 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.
  28. 28. 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.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×