Former Member

Classic BAdi and New BAdi ...

2007年04月27日 04:43 | 1.5k Views

Hi all,

I have a question regarding the new BAdi concept using enhancement spots.

With the classic BAdi's once we create an implementation it will call up our implementation when the BADI class is been called.

But with the new concept we have to explicitly call the BAdi we created right ? doesn't this mean modifiying the standard code ( If there's no ehancement section or point )?

Can someone tell me whether there is another way to call our implementation by using GET BADI and CALL BADI statement without modifying standard code ( by creating an explicit enhancement).

Cheers,

D.

 

2条回复

 
排序

  • Former Member
    2007年04月27日 04:52
    1

    hi,

    Classic and new BAdIs differ in a number of features that are important for migration:

    1. BAdI object

    a. With classic BAdIs, a BAdI object is created by calling a factory method, and referenced via a reference variable of the type of the BAdI interface.

    b. With new BAdIs, a BAdI object is created via the ABAP statement GET BADIas a handle for the calls of BAdI methods, and referenced via a reference variable of the type of the BAdI. A BAdI object is an instance of an internal BAdI class, which otherwise is invisible to the outside.

    2. Passing comparison values for the filter

    a. With the classical BAdIs, the filter values are stored in a structure and passed with the call of the BAdI methods.

    b. With the new BAdIs, the comparison values for the filters used to search for implementations are passed when the BAdI object is created with the GET BADIstatement.

    There is no way of migrating the call of the factory method one-to-one into the ABAP statement, because GET BADI can also return an existing BAdI object, which is not possible with the factory method.

    3. Calling BAdI methods

    Passing comparison values for the filter

    a. A classic BAdI can be called only once and the call positions are registered centrally.

    b. With new BAdIs, multiple calls are possible and the call positions are not registered centrally.

    For the above reasons, an automatic call migration is not possible.

    Have a look at below link.

    http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/6f3b42ea85b26be10000000a155106/content.htm

    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/4d3e42fc94aa04e10000000a1550b0/content.htm

    I hope it helps.

    Best Regards,

    Reshma

    4 Comments
      • Hi,

        If the BAdI is not a migrated BAdI but a new BAdI, it cannot be called via the

        CL_EXITHANDLER. It need to be called via the ABAP commands GET BADI and CALL BADI.

        A call to CL_EXITHANDLER will result in an error. If this coding, is deliverd from SAP and again the BAdI is not an migrated BADI you should create a problem message.

        Regrads

        Michael

     
     
  • Former Member
    2007年10月12日 02:57
    0

    Hi Dhanushka ,

    I have the same issue like yours. But I still don't understand how your issue is solved by the answers given above. Can you please give more specific answer?

    where to write the GET BADI and CALL BADI commands if there are no Enhancement Spot ? Is it correct to do it in implicit enhancement ?

Classic BAdi and New BAdi的更多相关文章

  1. SE18 BADI定义 / SE19 BADI 实现

    明天花30分 再研究下这个: 如果你知道一个BADI名称,可以: 1)使用SE18,输入该BADI名称后,选择Interface,然后查看对应的接口实施样例代码(Example implementat ...

  2. Classic BADI总结

    这里对sap Classic Badi 做一下总结,虽然已经是过时的技术了. Classic BADI的创建 Classic BADI的实施 Classic BADI的调用及运行原理 New BADI ...

  3. 如何从SAP中查找BADI

    如何从SAP中查找BADI   如何从SAP中查找BADI http://blog.csdn.net/CompassButton/article/details/1231652 BADI作为SAP的第 ...

  4. 20170520 BADI增强学习

    一.要求:Tcode:FF_5 导入数据运行时,产生财务凭证之前修改某些字段值.Exmp:FEBRE-VWEZWBKPF-XBLNRFEBEP-CHECTBSEG-ZUONR there is a b ...

  5. 第四代增强 NEW BADI的定义及实现

    NEW BADI 是在第四代增强框架下创建的BADI,是相对于第三代增强Classic Badi 而言的. 根据第四代增强的基本概念,所有显式增强Enhancement options 都必须放在增强 ...

  6. SAP ABAP第一,两,三代出口型BADI实现 解释的概念

    BADI这是第三代用户出口型.让我们来看看如何实现的细节. 一个,用户出口的类型 1,第一代 sap提供了一个空的子程序代码.在这个过程分,用户可以添加自己的代码.为了控制自己的需求.这样的改进是需要 ...

  7. 生产订单BADI实例

    转自:https://blog.csdn.net/wbin9752/article/details/7951390 以生产订单收货为例: 1.BADI的查找方法: SE38在程序中搜索关键字CL_EX ...

  8. ABAP Enhancement:第一部分

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  9. [SAP ABAP开发技术总结]增强Enhancement

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

随机推荐

  1. C语言结构体变量字节对齐问题总结

    结构体字节对齐 在用sizeof运算符求算某结构体所占空间时,并不是简单地将结构体中所有元素各自占的空间相加,这里涉及到内存字节对齐的问题.从理论上讲,对于任何 变量的访问都可以从任何地址开始访问,但 ...

  2. Educational Codeforces Round 67 D. Subarray Sorting

    Educational Codeforces Round 67 D. Subarray Sorting 传送门 题意: 给出两个数组\(a,b\),现在可以对\(a\)数组进行任意次排序,问最后能否得 ...

  3. thinkphp5 数据库查询之paginate: 同时获取记录总数和分页数据

    thinkphp5中要想同时获得查询记录的总数量以及分页的数据, 可以用paginate(), 真的非常方便! 表结构: CREATE TABLE `t_users` ( `id` int(11) u ...

  4. 团队项目评审&课程学习总结

    一:实验名称:团队项目评审&课程学习总结 二:实验目的与要求 (1)掌握软件项目评审会流程: (2)反思总结课程学习内容. 三:实验步骤 任务一:按照团队项目结对评审名单,由项目组扮演乙方,结 ...

  5. Activity间通过Intent交互及系统服务调用

    I. 实验目的通过本实验理解Android开发框架中最核心程序部件Activity间通过Intent交互的原理,掌握通过Intent传递参数和系统服务调用的方法,并通过实验中的3个具体的实验内容加深理 ...

  6. input提示字在有焦点消失或输入改变时消失

    一:获取焦点时 提示字消失 <input type="text" name="textfield" value="这里是提示内容" o ...

  7. 没有内置小鹤双拼的rime输入法就是差劲

    没有内置小鹤双拼的rime输入法就是差劲,还特立独行,搞什么繁体~ 没有内置小鹤双拼的rime输入法就是差劲,还特立独行,搞什么繁体~ 没有内置小鹤双拼的rime输入法就是差劲,还特立独行,搞什么繁体 ...

  8. 进程控制块 与 task_struct

    http://blog.csdn.net/qq_26768741/article/details/54348586 struct task_struct { volatile long state;  ...

  9. RabbitMQ六种队列模式-主题模式

    前言 RabbitMQ六种队列模式-简单队列RabbitMQ六种队列模式-工作队列RabbitMQ六种队列模式-发布订阅RabbitMQ六种队列模式-路由模式RabbitMQ六种队列模式-主题模式 [ ...

  10. CLR Exception---E0434352

    什么是CLR Exception---E0434352 CLR异常是.NET应用程序生成的异常类型.异常被封装在从System.exception类派生的类中.它的异常代码是0xE0434352,代码 ...