Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7118367
  • 博文数量: 655
  • 博客积分: 10264
  • 博客等级: 上将
  • 技术积分: 8278
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-04 17:47
个人简介

ABAP顾问

文章分类

全部博文(655)

文章存档

2017年(2)

2014年(8)

2013年(3)

2012年(2)

2011年(18)

2010年(102)

2009年(137)

2008年(274)

2007年(134)

分类:

2007-12-15 22:30:08

转载自:http://jgtang82.javaeye.com/blog/128474

 
关键字:   User Exits, Customer Exits, BAdI    

Basic Concepts:
1. User Exits: 是系统中预留的一些空的Form/Subroutine, 获得Access key后可以在Form中写入自己的逻辑.
2. Customer Exits :
    a. FM Exits: 在FM中include customer namespace程序来提供功能扩展点
    b. Menu Exits: 在GUI status中预留+Fcode menu item, 在程序中预留对应的Handling FM Exits
    c. Screen Exits: 在Screen 中预留 Subscreen, 在程序中预留transport data to subscreen & return / retrieve data from subscreen 的 FM Exits
3. Enhancement & Enhancement Project :
    a. Enhancement: 把系统程序中的相关Customer Exits收集起来成为一个Enhancement, 一般情况是按功能和类型来收集的, 比方说几个相关的FM eixts组成一个enhancemnet, 或就一个 screen 或 menu exits 形成一个enhancement.  查看/修改 Enhancement的t-code为: SMOD
    b. Enhancement Project: 在使用Enhacement时, 要先建立一个Enhancement Project, 可以将多个Enhancement assign给一个enhancement project去管理, 对应t-code: CMOD.
4. BADI (Business Add-in), 通过面向对象的方式来提供扩展点,它支持Customer Exits所有的enhancement 类型,因目前Class中不能包含subscreen所以在用BADI enhance screen时比用Customer Exits要复杂些.相关机制请参考我以前的blog.
5. Other
User Exits与Customer Exits的区别在于User Exits的使用需要Access Key但Customer Exits不要.
FM exits在关联的Function Group中的命名规则为: EXIT_program name_nnn
Customer exits的调用方式为:
     a. FM Exits: CALL CUSTOMER-FUNCTION 'xxx' EXPORTING ... IMPORTING ...
     b. Subscreen: Call CUSTOMER-SUBSCREEN INCLUDING

How to find user exits?
Using t-code: SE93 and specify the transaction code. from here goto the main program and click on the FIND button. Specify USEREXIT and select find in main program radio button and click search... if any user exit is used, it will list all the places as in SAP if any user exit is used, a comment is been written above the user exit.

How to find customer exits?
     1. 通过一些专门的程序,见附件
    2. Search string “call customer” in the main program source code;
    3. SE80 -> Repository Infomation System -> Enhancements -> Customer Exits -> Input search condition -> Execute
    4. SE11 -> Database table: MODSAPVIEW -> Display Contents -> Input "*program name*" into Enhancement field -> Execute -> 得到的SAP extension name 即为 Customer Exits Enhancement Name

How to find BADIs?
     1. 通过一些专门的程序,见附件
     2. Search string “type ref to” in the main program source code, then check if there is BAdi used in the program;
     3. Set break-point in the method CL_EXITHANDLER=>GET_INSTANCE.
      4.  SE80 -> Repository Infomation System -> Enhancements -> Business Add-ins

Customer Exits and BADI implementation.
      1. Customer Exits: SMOD, CMOD
       2. BADI: SE18, SE19.

Attachment is an ABAP program which can find customer exits and BADIs conveniently.

阅读(5484) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~