如何实现PO的输出向客户发送邮件的增强

Enhance Email – NACE – Purchasing

Emailing outputs to partners is a standard out-of-the-box feature in SAP Output Control. This blog explains enhancement options available in case you want to control various aspects of email (subject, recipient, sender etc) before its sent.

Before we begin I am assuming that you are using output control (NACE) in purchasing application, specifically, you are using program SAPFM06P (or a copy of) as your processing program. This processing program supports a number of standard output types NEU (Purchase order) , LPET (SchedAgrmtSchedLine), LPH1 (ForecastDlv schedule) , LPH2 (ForecastDlv schedule) , LPJ1 (JIT Delivery Sched.), LPJ2 (JIT Delivery Sched).

Before you think of enhancing the email first make sure you can send output as email i.e. generate output with transmission medium 5 – External Send. If this is not working then there are few things it worth checking.

Prerequisite

1. Check if ‘5 External send’ medium is specified in Processing routine under output type.

 

2. Check communication strategy specified in the output type.

If comm strategy is not specified then you can create one under SPRO path SAP NetWeaver->Application Server->Basis Services->Message Control->Determine Communication Strategy. Define a comm strategy with communication type ‘INT Email’.

3. Check email address is specified in Business Partner, it would be a supplier in case of Purchasing.

Enhance using BADI

Once you have standard email functionality working through output control you can go ahead and implement BADI BADI_MM_PO_OC_EMAIL.

After BADI implementation, you would be able to write code in methods CHANGE_SENDER, CHANGE_RECIPIENTS, CHANGE_SUBJECT and CHANGE_BODY to enhance email before it sent out.

Debugging

Put a breakpoint in program SAPFM06P subroutine  ADOBE_PRINT_OUTPUT (assuming you are using adode form). Code to call BADI is in this routine so you should be able to see what’s happening with BADI call.

Also make sure when you add output type to document (purchase order, outline agreement etc.) using Dispatch time as ‘1 – Send with periodically scheduled job’ in the Further data section. Then use program RSNAST00 to issue your output. Execution should then stop at the breakpoint.

source link :

https://www.samplecodeabap.com/enhance-email-nace-purchasing/

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值