How to debug ABAP Web services from Microsoft Visual Studio
2016-06-28 11:59
776 查看
原文地址:http://scn.sap.com/people/andre.fischer/blog/2007/02/07/how-to-debug-abap-web-services-from-microsoft-visual-studio
How
to debug ABAP Web services from Microsoft Visual Studio
发贴人 AndreFischer 在 andre.fischer 打开
2007-2-7 9:19:54
inShare
<iframe style="BORDER-BOTTOM: 0px; POSITION: static; BORDER-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; OUTLINE-STYLE: none; OUTLINE-COLOR: invert; PADDING-LEFT: 0px; OUTLINE-WIDTH: 0px; WIDTH: 90px; PADDING-RIGHT: 0px; FONT-FAMILY: inherit; BACKGROUND: none transparent scroll repeat 0% 0%; HEIGHT: 20px; VISIBILITY: visible; FONT-SIZE: 12px; VERTICAL-ALIGN: baseline; BORDER-TOP: 0px; TOP: 0px; BORDER-RIGHT: 0px; PADDING-TOP: 0px; LEFT: 0px" id="I0_1467084450853" title="+1" tabindex="0" marginheight="0" src="https://apis.google.com/se/0/_/+1/fastbutton?usegapi=1&size=medium&origin=http%3A%2F%2Fscn.sap.com&url=http%3A%2F%2Fscn.sap.com%2Fpeople%2Fandre.fischer%2Fblog%2F2007%2F02%2F07%2Fhow-to-debug-abap-web-services-from-microsoft-visual-studio&gsrc=3p&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.zh_CN.fzEAtKWFU5o.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCO6hINZs56QZ5HNj8W6NXOfPccKXA#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh&id=I0_1467084450853&parent=http%3A%2F%2Fscn.sap.com&pfname=&rpctoken=36083165" frameborder="0" width="100%" name="I0_1467084450853" marginwidth="0" scrolling="no" data-gapiattached="true"></iframe>
Introduction
When developing .NET based Web services clients using Visual Studio that call Web services in SAP NetWeaver .NET developers would like to be able to debug inside SAP. In my blog I would like to point .NET developers to the fact that SAP NetWeaver offers theoption of external debugging to perform this task. Though the steps that have to be performed are described in the SAP
Online Help I am sure that this option is not well known amongst the .NET developer community.
Prerequisites
You have to have SAPGUI installed on your desktop where your Visual Studio is running. When debugging a SAPGUI session must be active since SAPGUI is not started automatically as part of the debug process.NetWeaver 2004 and later
How To section
Let us have a look at the following simple scenario:You have published the function module BAPI_FLIGHT_CHECKAVAILIBILITY
as a Web service using the Web Service Creation Wizard and you want to write and debug a C# console application that is calling this Web services.
Step 0: Publish BAPI_FLIGHT_CHECKAVAILIBILITY as a Web service.
The scenario describes assumes that you have published the function module BAPI_FLIGHT_CHECKAVAILIBILITY as a Web service. How to publish an existing BAPI as a Web service using the Web Service Creation Wizard has been described in detail in the document Providingand Consuming Web Services in ABAP
Step 1: Activate external debugging in SICF
Start transcation SICF. Selectthe required service that has been published in step 0 in the service hierarchy. In our example the service Z_FLIGHT_CHECKAVAILIBILITY that is located in the following directory/default_host/sap/bc/srt/rfc/sap/.
Choose Edit -> Debugging
-> Activate Debugging.
In the following screen Activate
Debugging for Users under User,
enter the user with which you perform your Web service request.
Step 2: Set external breaktpoints in the ABAP code of BAPI_FLIGHT_CHECKAVAILIBILITY
Start transaction SE37. Select the BAPI BAPI_FLIGHT_CHECKAVAILIBILITY andpress the Display button.
From the menue choose Utilities -
> Settings. In
the following window User-Specific
Settings select the Tab Debugging. Activate
the check box in the frame External
Debugging.
Now we can select the position in the ABAP code where we want to place our external breakpoint. From the menue choose: Utiliies
-> Breakpoint -> Set/Delete
In the following window you have to press the button HTTP
Breakpoint to set an external breakpoint.
!!!
IMPORTANT !!!
Don't close your SAPGUI session.
Step 3: Start debugging from Visual Studio
In Visual Studio start your project using F5,A new SAPGUI window ABAP
Debugger opens. However the stop at this point is usually NOT the position where we want to stop for debugging.
Therefore we you would like to choose Debugging -> Control -> Run (to cursor) to proceed to the external break point that you have set in step 2.
Here you can start to debug as usual in ABAP.
相关文章推荐
- PHP实现自己的验证码(实例)
- 组合模式(Composite)
- Java NIO FileChannel
- shell printf命令:格式化输出语句
- tomcat 部署正常,Jetty部署失败
- 特征值与特征向量
- 在Abp中执行sql语句
- 《优雅的插入开屏广告》-- 不改动任何一行代码
- android 使用Handler.postDelayed方法实现循环执行定时任务
- Nginx缓存的基本思路
- mark一下。hadoop分布式系统搭建
- 获取状态栏和导航栏高度
- (转)在logcat加入System.out
- ListView 属性详解 - 焦点 descendantFocusability
- 练习四1001畅通工程
- sqlserver数据库18456错误怎么解决?
- iOS中UIKit的外观属性及方法汇总
- ASP.NET通过第三方网站Bitly实现短链接地址程序
- 性能测试流程
- 代码片段 有很多代码工具