You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于在Extractor BADI逻辑中按公司代码过滤删数的可行性咨询

Does DELETE c_t_data WHERE bukrs NE t_cc Work for 0FI_GL_14 Extractor BADI?

Hey there! Great question about optimizing your 0FI_GL_14 extractor performance by filtering records in the BADI. Let's break down whether this approach is feasible:

Core Feasibility

Yes, this DELETE statement will work for your scenario, and it's a solid performance-focused choice:

  • The syntax is valid ABAP for filtering internal tables. Assuming t_cc holds the correct company code value, it will remove all records from c_t_data where the bukrs field doesn't match your target company code.
  • By trimming down the dataset early in the extraction process, you reduce the amount of data passed downstream (to BW or other systems), which directly boosts performance—exactly what you're aiming for.

Critical Things to Verify

To avoid unexpected behavior, make sure you check these details:

  • Type Matching: Ensure t_cc uses the exact same data type as c_t_data-bukrs (which is TYPE bukrs, a 4-character string). Mismatched types can cause implicit conversions that lead to incorrect filtering (e.g., a numeric type for t_cc might not match the CHAR4 bukrs values properly).
  • Variable Initialization: Double-check that t_cc is properly populated before running the DELETE statement. If t_cc is empty (space), this command will delete every record where bukrs is not empty—probably not what you want. Always confirm t_cc is set to your target company code (e.g., via configuration tables, selection parameters, or hardcoded values if appropriate).
  • BADI Execution Timing: Ensure you're running this logic in the correct BADI method. For 0FI_GL_14, you'll want to use the MODIFY_DATA method of RODPS_BADI (or the relevant extractor-specific BADI), which triggers after the initial data extraction but before the data is sent to the target system. This ensures you're filtering the full extracted dataset.

Optional Performance Tweak

If you're working with ABAP 7.40 or higher, you can use the newer inline syntax for even cleaner code (though the original statement is already efficient):

c_t_data = VALUE #( FOR wa IN c_t_data WHERE ( bukrs = t_cc ) ( wa ) ).

This creates a new internal table containing only matching records, which can be slightly more readable than a DELETE command, but both approaches offer similar performance.


内容的提问来源于stack exchange,提问作者Rubane

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 18:22:55