SAP Customer Exit

全文参考:http://it.toolbox.com/wiki/index.php/Implement_a_screen_exit_to_a_standard_SAP_transaction

先讲点理论上的东西。SAP中增强的作用不用说,经过了几代的发展,SAP总共有四代增强:

1. Source Code(User Exit)

2. Function Module(Customer Exit)

3. BADI

4. Switch Framework

现在用的比较多的是第2,3两种,SAP中有三种增强:Program Enhancement、Menu Enhancement、Screen Enhancement。

这次是用第二种方式实现的屏幕增强,T-code是as01。

Requirment:

添加一个字段到Asset master(General)。

Find out the enhancement:

我是按照http://scnblogs.techweb.com.cn/tcsapbw/archives/573.html来寻找的。

另外还有使用T-CODE:SMOD来查询。贴图如下:


按照上图所示的步骤能大致的找到Exit。

Studying the function exits

使用T-code:SE37键入查到的Function Module,里面有些许信息可以获知。

在这个例子中,输入参数I_ANLU表示从数据库表ANLU中提取的数据,因此在增强时同时也要对ANLU表进行增强。输出参数E_ANLU表示用户输入的参数,我们可             以使用这个参数将用户输入的数据存入数据库中。

Development

Creating a Project to include the enhancement

   T-code:CMOD进入新建一个项目,填写相应的内容,点击Enhancement输入找到的上步中找到的Function Module。如下图所示:


在点击Components进入,里面有相应的Include Tables和Function exit:


表的增强这里不说。点击EXIT_SAPLAIST_002进入,加入语句:anlu = i_anlu;点击EXIT_SAPLAIST_003进入,加入语句:e_anlu  = anlu。新建屏幕,在layout中加入字段和输入框,激活。

接着要将配置连接到子屏幕,这部分要到后台配置,不过也可以由业务顾问直接给出T-CODE进入(aolk,aola)。不想写了,看英文吧。

Determine the Layout

To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class ‘1000’ and click on folder ‘General Assignment of Layout’.

Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout ‘SAP’ cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.

Create new tab layout

Go to transaction AOLA. Copy the tab layout ‘SAP’ to create another layout, say, YSUB.

System will copy all the settings and will inform you about that.

Select your newly created layout and double-click on the folder ‘Tab page titles’.

You want to put your custom fields in the tab page “General”. So, select this tab page entry and double-click on the folder "Position of Groups".

Here, all the field groups currently residing in the tab-page “General” are shown. Add an entry for your newly created fields.

Select the group box from the list. An entry will come with “U” padded with the custom subscreen prepared by you.

Then, save and come out.

Assign the new Layout to Asset Class

Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.

Save and come out.

最后测试下!!@

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值