Excel宏读取SAP数据
方法一: 使用WSDL实现不登陆SAP输出Excel报表.
实现直接从EXCEL输出报表数据的关键是sap Web Services
SAP 创建 Web Services
Web service 就是一个应用程序,它向外界暴露出一个能够通过Web进行调用的API。也就是说,可以利用编程的方法通过Web来调用这个应用程序。
Web services是建立可互操作的分布式应用程序的新平台。Web service平台是一套标准,它定义了应用程序如何在Web上实现互操作性。你可以用任何你喜欢的语言,在任何你喜欢的平台上写Web service ,只要我们可以通过Web service标准对这些服务进行查询和访问。
SAP 的Web Service 分为ABAP and Java Web Services。
创建Web Service
方法1.T-Code:SE80 选择Package,然后右击在菜单中选择,Create ? Enterprise Services / Web Services ? Web Service.
方法2.T-CODE :SE37 选择一个function module,显示,菜单,Utilities ? More Utilities ? Create Web Service ? From the Function Moduleor From the Function Group , 这也是我们较为常用的一种方法.
方法3.T-CODE:BAPI BAPI Explorer , BAPI也是Function,所以此方法实际上与方法2一致.
在创建Web service 时,首先要创建Virtual interfaces Virtual interfaces ( 实际使用中此步骤并不是必须的)
Using virtual interfaces, you can define several views of an implementation and publish these separately as a Web service. When you create virtual interfaces, you can rename or hide operations and parameters. You can also define standard values for parameters and convert parameter types. 创建Virtual interfaces
T-CODE:SE80 选择Package 右击:Create ? Enterprise Service / Web Service ?Virtual Interface
Release Web Service T-CODE:WSConfig
选择web service Service Definition ,Variant , 创建 release web service.
保存后列表中会出现已release 的web service.
生成WSDL 服务管理
T-CODE:sicf 管理SAP服务(包含web service) 在这里可以定义此SAP服务的登陆信息-用户名 密码.
T-CODE:WSADMIN
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库Excel宏读取SAP数据在线全文阅读。
相关推荐: