This guide contains information of the steps to setup web services for integration of CloudSnap.
Step 1 – Create Function Module in SAP ECC
Copy code and paste in your SAP ECC system to create and activate function modules in the system.
There are two more structures needed to be created when creating function moduleZFM_NUVOLA_GET_VENDORS_V1 followed in Appendix in the last part of this document. Also see Naming conventions in the same appendix
Step 2 – Build Service Definitions
- Right-click Service Definitions in your package and choose “Create-> Enterprise Service“.
- Choose “Existing ABAP Object (Inside Out)”.
- Input Service Definition name and Description.
- Choose “Function Module”.
- Input function module created.
IMPORTANT: Please note that for Service Definition ZNUVOLA_GETAPINVOICE_BY_ID_V3 ituses standard function module FI_DOCUMENT_READ. Other Service Definitions uses functionmodule customized. - Choose SOAP Appl and Profile as below.
SOAP Appl: urn:sap-com:soap:runtime:application:rfc:710
Profile: Authentication with User and Password, No Transport Guarantee - Input your package and TR and finish your setup.
- After finishing, you should find a Service Definition as below.
Step 3 – Configure Web Service in SOAMANAGER
- Access the t-code: SOAMANAGER
- Search the Service Definition by inputting Object Type and Object Name
- Object Type: Service Definition
- Object Name: ZNUVOLA*
- Here use ‘ZNUVOLA_GETVENDOR_BY_ID_V1’ as the example (Get vendor by ID and Company Code),Click the link mentioned above.
- Click ‘Create Service’, fill the Service Name, Service Description Text and New Binding Name. Here we input same name with Service Definition in field Service Name and New Binding Name. Then click ‘Next’button
Tip: To re-enable the existing webservice that we have already published, when defining the ServiceName and New Binding Name, we should ref to the WSDL which we introduced before. - In next page, authorization part, select ‘User ID/Password’ which means that when accessing the web service, user and password are needed.
- Then click ‘Next’ button until finished.
- Test the webservice. Make sure the metadata can be returned.
- Input the user and password
- Test in SOAP UI.
- Access the existed webservice or add the new webservice by WSDL.
- Add authorization part
- Input user and password, then execute. Check the result
Appendix – Create Structure for Function ModuleZFM_NUVOLA_GET_VENDORS_V1
- Create a structure ZNUVOLA_VENDORS_S following below.
- Create a Table Type ZNUVOLA_VENDORS_T with line type ZNUVOLA_VENDORS_S
Naming conventions:
1. Create Service Providers
When you create a Service Provider, you need to check ‘Map Name’ for all the service providers. Choose username and password authentication with no transport guarantee for all of the Service Providers.
Create Service Provider: (Step 2, on page 1 of document)
Service Provider Definition: ZNUVOLA_GETVENDOR_SRV_V1
Reference Function Module: ZFM_NUVOLA_GET_VENDORS_V1 (Check ‘Map Name’)
Service Provider Definition: ZNUVOLA_GETVENDORBYID_SRV_V1
Reference Function Module: ZFM_NUVOLA_GET_VENDOR_BY_ID_V1 (Check ‘Map Name’)
Service Provider Definition:ZNUVOLA_POSTAPINVOICE_SRV_V1
Reference Function Module: ZFM_NUVOLA_POST_AP_INVOICE_V1 (Check ‘Map Name’)
Service Provider Definition: ZNUVOLA_POSTAPINVOICE_SRV_V2
Reference Function Module: ZFM_NUVOLA_POST_AP_INVOICE_V2 (Check ‘Map Name’)
Service Provider Definition: ZNUVOLA_POSTAPINVOICE_SRV_V3
Reference Function Module: ZFM_NUVOLA_POST_AP_INVOICE_V3 (Check ‘Map Name’)
Service Provider Definition:ZNUVOLA_GETAPINVOICE_BY_ID_SRV_V3
Reference Function Module: FI_DOCUMENT_READ (Check ‘Map Name’)
2. Create Web Services (Page 9 of document)
Service Name: ZNUVOLA_GETVENDOR_SRV_V1
New Binding Name: ZNUVOLA_GETVENDOR_SRV_V1
Reference Service Provider: ZNUVOLA_GETVENDOR_SRV_V1
Final WSDL URL should something like this:
http://devap2-:8000/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/znuvola_getvendor_srv_v1/150/znuvola_getvendor_srv_v1/znuvola_getvendor_srv_v1?sap-client=150
Service Name: ZNUVOLA_GETVENDORBYID_SRV_V1
New Binding Name: ZNUVOLA_GETVENDORBYID_SRV_V1
Reference Service Provider: ZNUVOLA_GETVENDORBYID_SRV_V1
Final WSDL URL should something like this:
Service Name: ZNUVOLA_POSTAPINVOICE_SRV_V1
New Binding Name: ZNUVOLA_POSTAPINVOICE_SRV_V1
Reference Service Provider: ZNUVOLA_POSTAPINVOICE_SRV_V1
Final WSDL URL should something like this:
http://devap2-:8000/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/znuvola_postapinvoice_srv_v1/150/znuvola_postapinvoice_srv_v1/znuvola_postapinvoice_srv_v1?sap-client=150
Service Name: ZNUVOLA_POSTAPINVOICE_SRV_V2
New Binding Name: ZNUVOLA_POSTAPINVOICE_SRV_V2
Reference Service Provider: ZNUVOLA_POSTAPINVOICE_SRV_V2
Final WSDL URL should something like this:
http://devap2-:8000/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/znuvola_postapinvoice_srv_v2/150/znuvola_postapinvoice_srv_v2/znuvola_postapinvoice_srv_v2?sap-client=150
Service Name: ZNUVOLA_POSTAPINVOICE_SRV_V3
New Binding Name: ZNUVOLA_POSTAPINVOICE_SRV_V3
Reference Service Provider: ZNUVOLA_POSTAPINVOICE_SRV_V3
Final WSDL URL should something like this:
http://devap2-:8000/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/znuvola_postapinvoice_srv_v3/150/znuvola_postapinvoice_srv_v3/znuvola_postapinvoice_srv_v3?sap-client=150
Service Name: ZNUVOLA_GETAPINVOICE_BY_ID_SRV_V3
New Binding Name: ZNUVOLA_GETAPINVOICE_BY_ID_SRV_V3
Reference Service Provider: ZNUVOLA_GETAPINVOICE_BY_ID_SRV_V3
Final WSDL URL should something like this:
http://devap2-:8000/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/znuvola_getapinvoice_by_id_v3/150/znuvola_getapinvoice_by_id_srv_v3/znuvola_getapinvoice_by_id_srv_v3?sap-client=150
Comments
0 comments
Article is closed for comments.