• 20170520 BADI增强学习



    一、要求:
    Tcode:FF_5 导入数据运行时,产生财务凭证之前修改某些字段值。
    Exmp:
    FEBRE-VWEZW
    BKPF-XBLNR
    FEBEP-CHECT
    BSEG-ZUONR

    there is a business Add-in(BADI) with the definition name FEB_BADI
    that
    is called immediately before the standart posting in program
    RFEBBU00.
    In the case, you can change the procedure of the standard posting
    or make additional account assignments by changing the tables that
    are to be transferred to the posting interface( FTPOST,FTCLEAR. )

    To do this ,go to the sap menu and follow the path tools
    ->ABAP->Workbench->business Add-ins,
    create an enhancement that you assing to the FEB_BADI Badi
    and then implement and enhancement that
    you activate the BADI, you receive a message ,

    telling you that active the BADI, you receive a message ,telling you
    that active implementation of this BADI already exists ,


    步骤:
    1.SE18: FEB_BADI
    基本视图中 TYPE - with in SAP 没有打勾,
    表明:自建BADI 是不可直接用的。

    二、BADI 增强。
    有的存在于标准程序出口,是使用的类,
    我们创建的程序都是其中的方法。它有一些系统标准的东西,每当使用的时候,
    系统可以给它很多参数。

    测试:
    1.SE19 创建Classic BADI: LE_SHP_DELIVERY_PROC
    2.输入自定义名称 Implementation Name: Z_SW_TEST

    3.保存出现:已移植试试Z_SW_TEST(参阅指令的长文本)
    表示自动把创建的badi使用新技术,创建到new badi 中,所以需要输入自己定义的要使用的new badi 的名


    4.新建一个新的技术增强点, 点击create,

    5.新技术增强点名称 Enhancement Implementation z_save_test

    6.再回到这个屏幕后可以选择自己建立的增强点来保存 badi,


    编程注意点:1.由于使用新技术, 在定义数据或者使用语句时候不支持旧ABAP
    语言。
    必须使用新的定义方法或者取数据方法。

    进入之后的显示界面,如果没有显示出来可以使用的内表,需要点击Signature,
    可以使用的内表全是取出的数据,
    不用再自己查询,
    如果没有的再查数据库,

    尽量使用X的,不使用Y的。例如使用IT_XLIKP,不使用IT_YLIKP,X的表示最新的数据。


    SE19:
    classic badi:ZEH_DELIVER_SAVE
    New badi: ZEH_DELIVER_SAVE_N

  • 相关阅读:
    umeng社交分享最新版5.0的跨进程使用崩溃的问题及解法-Android
    AlertDialog禁止返回键
    一个男人想经商,不读 100本商人自传,怎么会了解商人的思维状态
    Android中使用Gson解析JSON数据的两种方法
    DevExpress gridControl控件动态绑定列 zt
    获得WCF Client端的本地端口 z
    log4net.dll配置以及在项目中应用 zt
    系统交易策略 hylt
    判斷作業系統為 64bit 或 32bit z
    路徑 z
  • 原文地址:https://www.cnblogs.com/rainysblog/p/6911230.html
Copyright © 2020-2023  润新知