[转]User Exit for Release Procedure (PR)

本文介绍在SAP采购请求(PR)流程中如何使用用户退出来实现复杂的业务逻辑,特别是在成本中心和工厂级别的策略配置。通过创建特定特性并激活增强功能m06b0002,在不同场景下利用ABAP代码实现动态策略调整。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

User Exit for Release Procedure (PR)

By Willem Hoek  http://www.sap123.com/a/74/


Sometimes either the logic to be used is to complicated to use normal strategies or the field to be used in strategy is not available in Communication Structre (see transaction se12 - table CEBAN). In that case user exit can be used.

Example, lets say we want the following strategy:

For all PR's against a cost centre (account assignment K), base strategy on Cost Centre number and Document Type.

For all PR's not against a cost centre, base stretegy on Plant (in PR) and Document Type.

To set up:

  • Create 2 characteristics:
    one for doc type (linking it to CEBAN-BSART)
    one linking to user define field, say ceban-usrc1

  • Activate enhancement m06b0002 in transaction CMOD

  • Write ABAP code (user exit) in program ZXM06U13 in the case of Purchase Requisitions

When you create / change the PR, the characteristic will get value of ceban-usrc1 from user exit.

This is sample code of user exit

**&---------------------------------------------------------------------

**

**&  Include           ZXM06U13

**&---------------------------------------------------------------------

 

case i_ceban-knttp.

  when 'K'.

    e_ceban-usrc1 = i_ceban-kostl.

  when others.

    e_ceban-usrc1 = i_ceban-werks.

endcase.

e_ceban-bsart = i_ceban-bsart.

 

Activate enhancement will activate the user exit.



Notes based on SAP ECC 5.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值