Created by Wang, Jerry, last modified on Dec 19, 2014
The following steps demonstrates how to expose a function module as a web service in CRM.
- create a FM to return product description by given product ID.
Just use the following source code:
SELECT SINGLE A~short_text INTO rv_text FROM COMM_PRSHTEXT AS A
INNER JOIN comm_product AS B ON B~product_id = iv_prod_id AND B~product_guid = A~product_guid.
Make sure the FM is marked as "Remote enabled".
-
start the web service creation wizard:
Just follow the wizard to finish creation. Choose the appropriate authentication approach according to your use case.
-
Once creation is finished, you would find your service definition as below:
click tab WSDL, write down your WSDL link:
-
tcode SOAMANAGER, click Web Service Configuration
you can find your service definition created just now:
click the hyperlink and create a new service:
Make sure you use SSL.
Otherwise, you will meet with the following error code in the runtime. This is simply because web service via HTTP protocal is set as forbidden in Suite landscape and all such communication will be redirected, as set up in SMICM.
click Finish button.
Now your web service is ready for consumer. click this icon:
write down this link for later usage:
How to consume web service in CRM
-
tcode SE80, create a new service consumer:
-
Choose external WSDL:
choose the url got from "how to create web service in CRM", step3
activate your consumer proxy and write down the ABAP class name.
-
go back to SOAMANAGER, find the consumer proxy created in step2:
create a new logical point:
-
Make sure you specify URL got from web service creation last step. If you just use the URL got from SE80 in tab "WSDL", you will meet with below error.
choose HTTPS:
- consume the web service in ABAP report:
data: lr_proxy TYPE REF TO CO_ZPRODUCTDESCRIPTION4,
input TYPE ZGET_PROD_DESCRIPTION,
output TYPE ZGET_PROD_DESCRIPTION_RESPONSE.
input-iv_prod_id = 'ARNO_TEST004'.
CREATE OBJECT lr_proxy
EXPORTING
LOGICAL_PORT_NAME = 'ZLP_JERRY1'.
CALL METHOD lr_proxy->ZGET_PROD_DESCRIPTION
EXPORTING
input = input
IMPORTING
output = output.
Now we get the web service execution result:
How to consume public web service in CRM
The steps to consume the public web service is almost exactly the same as consuming SAP internal web service.
Use the public web service http://www.webservicex.com/FinanceService.asmx?WSDLas example.
First it is necessary to verify whether this web service is working correctly for the time being - test it in soapUI:
Just test the consumer proxy class in class builder:
Specify request input just the same as in SoapUI:
Execution result is the same as what we get in SoapUI:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关推荐
该文档介绍了在SAP CRM使用过程中出现的同步问题
SAP CRM系统介绍SAP CRM系统介绍SAP CRM系统介绍SAP CRM系统介绍SAP CRM系统介绍
SAP CRM 2007 IDES
CRM原厂解决方案 SAP标准CRM业务模式介绍,CRM产品
SAP CRM IPC 增强
浅谈SAP CRM开发
SAP公司全套CRM解决方案覆盖了销售、市场营销、售后服务、客户分析、客服中心、电子商务、社交CRM及移动手机等各个方面。客户可按当前业务所需选择的相关功能,应用程序可在6-8周内迅速部署并投入使用。新的SAP CRM...
详细介绍了SAP CRM 营销,销售,服务三大功能模块内容
SAP CR100 用于SAP CRM培训。
SAP CRM 7.0 PA-CR100
sap crm 实施方法。最全面地SAPCRM实施方法。提供下载。
ejb web service sap ejb web service ejb web service
SAP-CRM-系统用户界面操作指导手册
SAP PI RFC-to-Web Service Scenario场景,同步
汇集整理SAP CRM 各类常用表 1、Master Data Tables 2、Transaction Data Tables
sap crm install sap crm 安装手顺 我也是从别人那下载的 不是原创
sap crm 2007 ides 的bt下载 12G安装文件下载
BP主数据是SAP CRM主数据的重要部分,这里简要介绍几个常用的CRM BP主数据透明表 一、BP主数据普通数据部分 二、BP主数据ERP销售数据 三、BP主数据关系部分数据 四、其他业务数据
SAP CRM解决方案概览pdf,SAP CRM解决方案概览