0% found this document useful (0 votes)
314 views6 pages

Improvement Note - Enhancements To Email Functionality With Output Control in SAP ERP Sales and Distribution

This document outlines enhancements to email functionality in SAP ERP Sales and Distribution, allowing customization of email settings such as sender, recipient, and subject through BAdI implementations. The improvements address customer needs for better email control, including the ability to add multiple recipients and keep records of communications. The enhancements are delivered via support packages and are applicable only to standard SAP programs, with detailed implementation instructions provided for developers.

Uploaded by

spsuman05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
314 views6 pages

Improvement Note - Enhancements To Email Functionality With Output Control in SAP ERP Sales and Distribution

This document outlines enhancements to email functionality in SAP ERP Sales and Distribution, allowing customization of email settings such as sender, recipient, and subject through BAdI implementations. The improvements address customer needs for better email control, including the ability to add multiple recipients and keep records of communications. The enhancements are delivered via support packages and are applicable only to standard SAP programs, with detailed implementation instructions provided for developers.

Uploaded by

spsuman05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2022-01-07 2153962

2153962 - Improvement Note: Enhancements to Email


functionality with Output Control in SAP ERP Sales and
Distribution
Version 14 Type SAP Note
Language English Master Language English
Priority Correction with high priority Category Advance development
Release Status Released for Customer Released On 18.03.2016
Component SD-BF-OC ( Output Determination )

Please find the original document at https://launchpad.support.sap.com/#/notes/ 2153962

Symptom

Improvement Request

SAP shall provide the possibility to enhance the email capability (such as the sender, recipient, cc, bcc, and
title) using output control through BAdI(s).

Request Reason

The current system behavior, where the login user is the default email sender in transactions using the Sales
and Distribution (SD) output control, is not suitable for some customers due to their specific roles and
responsibilities. The sender requires additional features such as having a copy of the email, changing the
subject line, receiving a copy of the email in their outlook mailbox (including other email services, such as
Gmail) and keeping a record of all communication.

Other Terms

Output control, email enhancements, change sender, cc, subject, Customer Connection, 6468, Improvement
note

Reason and Prerequisites

In the existing implementation, it is not possible for a customer to have the enhanced email functionality using
the output control in SD transactions.

Solution

Scope:

The improvement request "Email Output Control Part 1 (SD Sales Order, Invoice)" for ERP 6.0 EhP7 SP09 is
delivered only via SP. The full functionality is not available to be installed via Notes. However, "Email Output
Control Part 2 (SD Delivery)" is fully available both via SP delivery (ERP 6.0 EhP7 SP11) and via Notes
install.
If you wish to implement the full functionality of the "Email Output Control Part 2 (SD Delivery)" via Notes on
top of ERP 6.0 EhP7 SP09 (or SP10), then first implement Note 2291353 for DDIC changes, then second
implement Note 2219370 for the source code changes.

For EhP6, both Parts 1 and 2 (SD Sales Order, Invoice, and Delivery) are delivered only via SP17. The Notes
are only available as Interface Notes for correction dependencies.

© 2022 SAP SE or an SAP affiliate company. All rights reserved 1 of 6


2022-01-07 2153962

For EhP8, both Parts 1 and 2 (SD Sales Order, Invoice, and Delivery) are delivered only via SP01. The Notes
are only available as Interface Notes for correction dependencies.

This improvement is only applicable for SAP standard delivered programs. Please note that customer
adapted Z programs are out of scope for support.

Improvement:

The requirements have been fulfilled with these BADIs:

BAdI: Modify Email Settings (BADI_SD_SLS_EMAIL)

This BAdI allows the customer to modify the sender, recipient, subject, text and attachments. The
modification can be customized depending on the business data such as from an invoice or sales order that
is transferred by the BAdI: Mapping for Business Data.

BAdI: Mapping for Business Data (BADI_SD_OBJ_MAPPER)

This BAdI enables the transfer of business data such as from sales orders and invoices to the BAdI: Modify
Email Settings to support customized implementation.

Sample BAdI Implementations:

Object Name Description


CL_SD_SAMPLE_EMAIL_IMPL Sample implementation for the BAdI: Modify
Email Settings as a reference for your
implementation
CL_SD_SAMPLE_EMAIL_OBJ_MAPPER Sample implementation for the BAdI: Mapping
for Business Data as a reference for your
implementation

Benefit:

The customers will have enhanced emailing capabilities through output control such as changing the sender,
adding multiple recipients, copying the email (using cc and bcc) and changing the subject and body by
implementing the above-mentioned BADIs.

Delivery:

The improvement is delivered with Support Package 09 for Enhancement Package 7.

The functionality is enhanced by implementing the BADI. You can also refer to the sample implementation.

This improvement only supports sales orders and invoices. Outbound deliveries will be delivered in the next
support package (SP).

Please refer to Note 2171824 for the Material Management (MM) part of the enhancement.

Solution Details:

New Development Objects:

Development objects that support output control email enhancements are listed below.

© 2022 SAP SE or an SAP affiliate company. All rights reserved 2 of 6


2022-01-07 2153962
Object Name Description
IF_BADI_SD_SLS_EMAIL Interface for the BAdI: Modify Email Settings
IF_BADI_SD_OBJ_MAPPER Interface for the BAdI: Mapping for Business Data
SD_PDF_HELPER Function module to convert OTF data to PDFand get the internet
address used in SAPScript programs
CL_SD_EMAIL_HELPER Helper class to add recipients, a sender, edit email text/subject,
and modify/add multiple attachments
IF_SD_EMAIL_PROCESS_CONSTANT Sales and Distribution email process constants used as BAdI filter
values

BAdI Implementations:

Both BAdIs are multi-use and designed with filters. They are called by programs using filter values, which are
maintained in IF_SD_EMAIL_PROCESS_CONSTANT. The execution will depend on runtime filter values,
which are validated against the domain object fixed value ranges (EMAIL_PROGRAM_FILTER).
Enhancement spots enforce the user to create one filter for each enhancement implementation and the filter
value is selected from the fixed value range of the domain object. To add a new entry to the domain object,
create a 'fixed value append' on the domain object, after which you can use the new value in the
enhancement implementation.

Example:

The print program that calls sales orders (SD_SDOC_PRINT01) passes "SDOC_PRINT01" as a filter. This
value is maintained in the interface constants IF_SD_EMAIL_PROCESS_CONSTANT which calls the
matching BAdI implementation for this filter.

To add a new entry to domain object, follow the steps outlined in the documentation below:

http://help.sap.com/saphelp_nw74/helpdata/en/6e/d5574168ef7d47e10000000a1550b0/content.htm

You can also refer to the attached PDF document in Note Attachments for the same documentation.

BAdI: Modifying Email Settings

The BAdI enables you to add recipients, edit the sender, subject and text, add attachments, and send the
email. The print programs call corresponding BAdI interface methods. This BAdI can be implemented as
follows:

Interface Methods

The implementation for the BAdI: Modify Email Settings can be reused between SAP Script and PDF
programs by passing the corresponding filter value in the enhancement implementation. Implement all
required methods by referring to the sample class CL_SD_SAMPLE_EMAIL_IMPL as follows:

• The IF_BADI_SD_SLS_EMAIL->set_mapper method enables you to provide the mapper type to get
the business data from the BAdI: Mapping for Business Data. Copying the set_mapper method
implementation from the sample class will set gs_type_map with business data.

• The IF_BADI_SD_SLS_EMAIL->modify_email method enables you to add multiple recipients,


senders, set the cc and bcc functionality, and update them to BCS object as follows:

1. Copy the modify_email implementation from the sample class.


2. To modify or add multiple recipients depending on business data, use gs_type_map as used in the

© 2022 SAP SE or an SAP affiliate company. All rights reserved 3 of 6


2022-01-07 2153962

sample class.
3. Set the email address in the recipient structure ls_email_rcp-email_addr and other required fields.
Repeat this step to add multiple recipients.
4. Repeat the previous step to add the sender.

Note that when the helper class method modify_email is called using the class instance go_cl_helper_obj
by passing the table type of recipient and sender, it sets the required email addresses on the BCS class
instance.

• The IF_BADI_SD_SLS_EMAIL->process_document method enables you to add multiple


attachments, edit subject/ text and update them to the BCS class instance (used in the above method)
as follows:

1. Copy the process_document method implementation from the sample class.


2. To modify the file attributes and add multiple files, create new structure of type file_attributes_s.
3. Modify the required files of the structure and append it to the lt_files table type. Repeat this step if you
want to attach multiple files.
4. Copy add_attachment method of the sample class which converts XString to binary and sets the PDF
file.
5. Modify the text of email by changing the lv_text_row-line and append it to lv_text.
6. Modify the subject of email by changing the lv_subject.

Note that when the helper class method process_document is called using the class instance
go_cl_helper_obj by passing the modified subject, text, and table of files to create the document, update the
subject, text and attach the PDF file on the BCS object.

• The IF_BADI_SD_SLS_EMAIL->send_document method enables you to send the updated email


recipients and sender, document using the BCS object. You can copy the send_document method
implementation from sample class.

Note that when the helper method send_document is called using the class instance go_cl_helper_obj, the
BCS class instance is updated with the recipient, sender, and file attributes in the previous methods outlined
above sends the email.

BAdI: Mapping Business Data:

This BAdI transfers the business data to the BAdI: Modify Email Settings. Since the business data is not
available in a uniform structure across the programs, the interface has various methods to support business
data from different programs. Implement all the required methods by referring to the sample class
CL_SD_SAMPLE_EMAIL_OBJ_MAPPER as follows:

Interface Methods:

Depending on the enhancement implementation (sales order or invoice) and on the program (SAP Script or
PDF), the methods to implement differ as follows:

- The IF_BADI_SD_OBJ_MAPPER->set_sd_so_to_generic method enables you to map the sales order


structure to the generic structure
for PDF programs. When you copy the implementation of this method from the sample class, it sets the
gs_type_map with the sales order
data.

- The IF_BADI_SD_OBJ_MAPPER->set_so_to_generic method enables you to map the sales order

© 2022 SAP SE or an SAP affiliate company. All rights reserved 4 of 6


2022-01-07 2153962

structure to the generic structure for


SAP Script program. When you copy the implementation from the sample class if the print program is SAP
Script program, it sets the
gs_type_map with sales order data from the print program.

- The IF_BADI_SD_OBJ_MAPPER->set_sd_inv_to_generic method enables you to map the invoice


structure to generic structure for PDF
program. When you copy the implementation from the sample class for the Invoice PDF print program, it sets
the gs_type_map with
invoice data from PDF print program.

- The IF_BADI_SD_OBJ_MAPPER->set_inv_to_generic method enables you to map the invoice structure


to the generic structure for the
SAP Script program. When you copy the implementation from the sample class for the Invoice SAP Script
print program, it sets the
gs_type_map with invoice data from the SAP Script print program.

- The IF_BADI_SD_OBJ_MAPPER->get_mapper method enables you to transfer business data to the


BAdI: Modify Email Settings. When
you copy the implementation from the sample class, it sets the gs_type_map to the changing parameter of
this method and business data is
made available to set_mapper method of the BAdI: Modify Email Settings.

Software Components

Software Component Release

SAP_APPL 617 - 617

This document refers to

SAP Note/KBA Title

2171824 E-mail enhancement in message determination of purchasing solution

This document is referenced by

SAP Note/KBA Title

2291538 Email output enhancements - BADI_SD_SLS_EMAIL implementation called for Print/Fax/EDI

© 2022 SAP SE or an SAP affiliate company. All rights reserved 5 of 6


2022-01-07 2153962
2219370 Interface Note: Source code changes (SD Delivery) for Note 2153962 (EhP7 & EhP8)

2291353 Interface Note: DDIC objects for Note 2219370 (EhP7 & EhP8)

2265421 Interface Note: Source code changes for Note 2153962 (EhP6)

2265360 Interface Note: DDIC objects for Note 2265421 (EhP6)

2200396 Interface Note: DDIC objects for Note - 2160199

2160199 Interface Note: Source code changes for Note - 2153962

Attachments

File Name File Size Mime Type

creating_fixed_value_appends.pdf 47 application/pdf

Terms of use | Copyright | Trademark | Legal Disclosure | Privacy

© 2022 SAP SE or an SAP affiliate company. All rights reserved 6 of 6

You might also like