`
evangxli
  • 浏览: 232720 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

转 Debugging SAP events

 
阅读更多

Debugging SAP events

By Saurabh Asthana, Infosys Technologies from Link

 

Overview:

This document explains how receiver Function module can be used as a Substitute of BAPIs and Exits in particular cases and how to debug those events, as general debugging method can not be used for them.  

This document is categorized into:

INTRODUCTION OF EVENTS:

§         Events indicate the occurrence of a status change of a Business objects.

§         Events always belong to an object and are therefore described as definition components in the object type  

§         Events can have parameters & exceptions like methods

§         These events have listeners (outside the BO). E.g., workflow

§         We can create our own events also.

Procedure to create Events:

a) Position the cursor on the entry Events. And then press create

b) Now enter the following texts for the event to be created

C) Give Event, Name, Short description
 

§         Irrespective of whether you use uppercase and lowercase in the event name, the name is always entered in uppercase letters in the event receiver linkage table by the system.

§         The event has now been created and is available in the Business Object Repository.

§         You can now use this event in the other definition tools in SAP Business Workflow.

Position the cursor on the new event and choose Edit Change release status Object component to implement.

§         The object type must first be generated so that it can be instantiated and tested.  

About Receiver FM:

§         If we have a requirement like insertion of an entry in a table when material is changed in a sales order or we want some   functionality to happen when a purchase order or sales order is created, generally in such cases we look for BADIs and exist, these are called after the save events are triggered and we place our logic there.

But we can also have a separate approach in which we link the event to a function module through Transaction SWETYPV and the logic are written in the FM to satisfy the requirement.

§      Now if we want to Debug that code, just by putting the break point there, we cannot reach their directly
So for this purpose below mentioned method should be followed, this procedure is very useful and can be utilized wherever we want to debug the events.

First go to transaction SWETYPV then new entries.

Here on changed event we have written our logic in (This function module is created by copying standard receiver FM   SWW_WI_CREATE_VIA_EVENT) and put the break-point there and this ZRECEIVERFM is linked with the event by using transaction SWETYPV.
Here object type Bus2032 is taken which is for sales order, as here we are taking the case where In a sales order while changing the quantity, the change event is triggered and then we are linking this event to ZRECEIVERFM where we put our logic.


Now we go to our transaction code VA02(change sales order)



How to debug the event:

Now we will change the quantity of item, from 916 to 917 then press enter and start debugger(/h) as shown: 

        

It will come to the following screen there go in setting --> update debugging.

Note: Before switching on the debugger check that the default debugger should be classic debugger (check in SE38-->utilities-->debugging-->ABAP debugger) 

Now press execute, then it will come to following screen, there go in setting --> Breakpoint at --> Method. A pop-up will appear, in that give the class name as CL_SWF_EVT_STRATEGY_BOR_FB and in Method give process.

Now press execute.

Now from here press F5, then after coming to CASE me->process_mode, here change the mode manually as D (for debugging) as shown below.

Then execute, then we come to the our own created ZRECEIVERFM, where break point is set and Logic is written.

  

分享到:
评论

相关推荐

    SAP Workflow Debugging

    sap_workflow_debugging 博文链接:https://zhouwubin.iteye.com/blog/176516

    SAP PO/PI教程 Process Orchestration The Comprehensive Guide

    11.8 Debugging and Troubleshooting SAP BPM Processes 11.8.1 Place Breakpoints in the Process 11.8.2 Add a Debug Configuration 11.9 Tuning SAP BPM-Related Performance Parameters 11.10 Best ...

    DebuggingTools

    Debugging Tools for Windows 是一套强大的开发和调试工具,主要用于对Windows操作系统进行深入的故障排查和性能分析。这个工具集包含了多种实用程序,如WinDbg、KD、CDB、NTSD等,它们都是针对不同场景的专业调试器...

    Advanced.Apple.Debugging.&.Reverse.Engineering.v2.0 Code Part2

    Advanced Apple Debugging & Reverse Engineering, Second Edition ISBN: Learn the powerful secrets of Apple’s software debugger, LLDB, that can get more information out of any program than you ever ...

    SAP Fiori and SAPUI5 - Debugging the User Interface.zip

    sap press doc 解压密码:abap_developer

    Debugging Tools for Windows.zip

    【标题】:Debugging Tools for Windows.zip 【描述】:这个压缩包文件“Debugging Tools for Windows.zip”包含了用于Windows环境下的调试工具,特别针对Qt Creator的调试器配置问题。通常,当Qt Creator的调试器...

    Inside Windows Debugging.pdf

    本书《Inside Windows Debugging》由Tarik Soulami撰写,得到了微软公司的授权,由O’Reilly Media, Inc.出版。该书结合最佳实践和常见的调试与编程技巧,很多技巧在其他书籍中尚未被记录下来。在本书的整个阅读过程...

    Inside Windows Debugging - Practical Debugging and Tracing Strategies 无水印pdf

    Inside Windows Debugging - Practical Debugging and Tracing Strategies 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 ...

    H3C交换机debugging命令入门使用介绍

    ### H3C交换机Debugging命令入门使用介绍 #### 一、概述 H3C交换机作为网络设备的重要组成部分,在日常运维与故障排查过程中扮演着关键角色。通过使用H3C交换机的`debugging`命令,网络管理员可以获取详细的设备...

    Advanced Apple Debugging & Reverse Engineering Code part1

    Advanced Apple Debugging & Reverse Engineering, Second Edition ISBN: Learn the powerful secrets of Apple’s software debugger, LLDB, that can get more information out of any program than you ever ...

    Debugging Tools for Windows

    Debugging Tools for Windows,是为WINDOWS设计的调试程序工具,能够查看软件指令栈等功能。

    Debugging Tools for Windows(X86+X64)

    Debugging Tools for Windows (x64)和Debugging Tools for Windows (x86) 微软Debugging Tools for Windows工具,简称windbg,查看dmp文件,调试驱动程序、应用程序等。

    在SAP中查询TABLE的18种方法

    15. **使用SE24(Debugging)调试程序:** - SE24是SAP系统中的调试工具,可以通过它追踪程序执行流程,了解Table查询的具体实现。 - **步骤:** 设置断点,运行程序并观察变量变化。 16. **通过SE18(Table Lock...

    sap-basis-certification-questions-sap-basis-interview-questions-answers-and-explanations

    - **Step-by-step Debugging**:逐步调试是一种常见的调试方法,可以帮助开发者逐行跟踪程序的执行过程,从而找出问题所在。 - **使用事务代码 ST05**:此事务代码可以用来查看和分析 ABAP 程序的日志记录,这对于...

    debugging_with_gdb(中文版pdf)

    根据提供的信息,我们可以总结并详细解释与“debugging_with_gdb(中文版pdf)”相关的知识点。这份文档似乎是一份关于使用 GDB(GNU Debugger)进行调试的手册或指南的中文版 PDF 文件。GDB 是一个非常强大的开源调试...

    Debugging With GDB 无水印pdf

    Debugging With GDB 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除

    AN-18101200-E2_Telink Burning and Debugging Tool (BDT) .pdf

    "泰凌微 Burning and Debugging Tool (BDT) 用户指南" 泰凌微 Burning and Debugging Tool (BDT) 用户指南是泰凌微公司发布的一份关于 Burning and Debugging Tool (BDT) 的用户手册。该手册旨在帮助用户快速了解和...

Global site tag (gtag.js) - Google Analytics