19
Email Output to Multiple Recipients Functionality in SAP Introduction: In most of the industries it is common practice to send the copy of Delivery Note along with the Goods and also a Copy to the Customer’s Mail ID prior the Goods are received. This email copy will help the customer to be prepared in allocating the Warehouse Space for the Goods that are expected and also to arrange for the Funds to make payment, in case of Payment against Delivery terms. We have a possibility in Standard SAP for sending the Delivery Output automatically to the mail ID maintained in the Customer Master. However, this is restricted only to one mail ID and will not allow you to send to more than one mail ID. As now-a-days, it is required to send the communication of any official information like Delivery Output to more than one mail ID in Customer side (“TO” and “CC” Address mail Format), as each person may have to follow up different activities of Delivery. Fortunately there was a similar requirement from our client and the same has been achieved using Techno – Functional enhancements. Requirement: Delivery Output must be sent automatically to multiple recipients in PDF Format when Delivery Document is Created – T. Code “VL01N”. Repeat Delivery Output must be triggered only if there are changes to certain specific fields in the Delivery Document – T. Code “VL02N”. Must fetch email IDs in “TO” address and “CC” address format while sending the Email Delivery Output automatically? Standard SAP Functionality for Sending Email Output: Even though we have the possibility of maintaining more than one Mail ID in Customer Master of Sold to Party, Standard SAP will allow you to send the Email Delivery or Order Output automatically only to one Mail ID, for which the Radio Button is enabled as shown in the Screenshot: Transaction Code – XD02:

79545844-Email-Output-to-Multiple-Recipients-Functionality-in-SAP (1).docx

  • Upload
    shuku03

  • View
    145

  • Download
    1

Embed Size (px)

Citation preview

Email Output to Multiple Recipients Functionality in SAP

Introduction:

In most of the industries it is common practice to send the copy of Delivery Note along with the Goods and also a Copy to the Customer’s Mail ID prior the Goods are received. This email copy will help the customer to be prepared in allocating the Warehouse Space for the Goods that are expected and also to arrange for the Funds to make payment, in case of Payment against Delivery terms.

 

We have a possibility in Standard SAP for sending the Delivery Output automatically to the mail ID maintained in the Customer Master. However, this is restricted only to one mail ID and will not allow you to send to more than one mail ID. As now-a-days, it is required to send the communication of any official information like Delivery Output to more than one mail ID in Customer side (“TO” and “CC” Address mail Format), as each person may have to follow up different activities of Delivery.  Fortunately there was a similar requirement from our client and the same has been achieved using Techno – Functional enhancements. 

Requirement:

Delivery Output must be sent automatically to multiple recipients in PDF Format when Delivery Document is Created – T. Code “VL01N”.

Repeat Delivery Output must be triggered only if there are changes to certain specific fields in the Delivery Document – T. Code “VL02N”.

Must fetch email IDs in “TO” address and “CC” address format while sending the Email Delivery Output automatically?  Standard SAP Functionality for Sending Email Output: Even though we have the possibility of maintaining more than one Mail ID in Customer Master of Sold to Party, Standard SAP will allow you to send the Email Delivery or Order Output automatically only to one Mail ID, for which the Radio Button is enabled as shown in the Screenshot: Transaction Code – XD02:

 

 

In the above Screenshot, you can see that more than one Mail ID has been maintained for this customer however the Standard SAP functionality is restricted to send auto email output only to the mail ID for which the Radio button is enabled / checked. No mail will be sent to the other 2 Mail IDs maintained in the Customer Master, as the Radio Button is not enabled for these 2 IDs.

 

Hence, if we need to send the Email Delivery Output to [email protected] in “TO” address and the other 2 mail IDs in “CC” address of the email, we need to do appropriate Configuration and technical changes to achieve the above requirements.

Let us see the Functional and Technical requirements to achieve this functionality.

 

 

 

Functional Configuration Settings: 

For this requirement, it is better to create a new Delivery Output Type for sending Email Delivery Output to multiple Recipients (Mail IDs). This new Delivery Output Type can be used exclusively for this particular Functionality with Transmission Medium as “External Send”.

Define Delivery Output Type

The new Delivery Output Type can be defined from the below menu path:

IMG - Logical Execution - Shipping - Basic Shipping Functions - Output Control - Output Determination - Maintain Output Determination for Outbound Deliveries - Maintain Output Type:

 

 

 

For example, we have maintained New Delivery Output Type “ZSPM” with appropriate Access Sequence “ZSPL” with required Fields.

Also enabled “Multiple Issuing” field for this Output Type, as the requirement is to repeat sending the Delivery Output vide email if there is Changes made to the specific fields in the Delivery Documents. However, no need to select this “Multiple Issuing” field if no such requirement.

 

 

Dispatch Time: You can maintain the value of this field depending upon the requirement. In the above screenshot, we have maintained “Send Immediately (when saving the application)” which will trigger the Output Type immediately upon saving the Delivery Document.

 

Transmission Medium: It is the Message Output Medium specifies how the output has to be produced like Fax, EDI, email, etc.

 

 

Assign the appropriate Driver Program and Smart form with the Delivery Output Type as shown in the above screenshot.

 

Then complete the Condition Technique procedure by assigning the New Delivery Output Type with the appropriate Output Determination Procedure and assign the Output Determination Procedure with the Delivery Type.

  

Define Access Sequence:

IMG - Logical Execution - Shipping - Basic Shipping Functions - Output Control - Output Determination - Maintain Output Determination for Outbound Deliveries - Maintain Access Sequence 

 

 

The Access Sequence can be defined through the above shown Menu path and can be assigned with the required Condition Tables.

 

For Ex: Here, We have defined the access sequence ZSPL with Condition Table “721” with Key Combination of Shipping type/Shipping Point/Delivery Type.

 

 

 

Assign Access Sequence with the Delivery Output Type:

IMG - Logical Execution - Shipping - Basic Shipping Functions - Output Control - Output Determination - Maintain Output Determination for Outbound Deliveries - Maintain Output Types

 

The Access Sequence ‘ZSPL’ has been assigned with the Email Delivery Output type ‘ZSPM’ as shown below.

 

 

 

Define and Assign Output Determination Procedure with the Delivery Output Type:

 

IMG - Logical Execution - Shipping - Basic Shipping Functions - Output Control - Output Determination - Maintain Output Determination for Outbound Deliveries - Maintain Output Determination Procedure

 

Assign the Email Delivery Output type ZSPM with the Output Determination Procedure ‘Z10000’ with the requirement as per business needs.

 

Here we have assigned Requirement as ‘3’ for this output type which will restrict triggering output if there is any Credit Block for the document.

 

 

 

  

Assign Output Determination Procedure with the Delivery Type:

IMG - Logical Execution - Shipping - Basic Shipping Functions - Output Control - Output Determination - Maintain Output Determination for Outbound Deliveries - Assign Output Determination Procedure

 

Assign the output determination procedure with all the Delivery types as per requirement. For instance, we have shown the screenshot of the Assignment of Output Determination Procedure "Z10000" with the Delivery Type "ZLF":

 

 

 

 

 

 

 

Define New Communication Strategy:

IMG - Logical Execution - Shipping - Basic Shipping Functions - Output Control - Determine Communication Strategy

 

 

 

 

Communication Strategy is used to find the Communication Methods for transmitting the communication data to the customer / partner. This communication strategy will be proposed while creating the condition record for the Output Type with transmission medium as “External Send”. 

 

 

 

 

 

For example, we have created a new Communication Strategy “ZSBD” with communication method “INT” – Email and this Communication Strategy has to be assigned while maintaining Condition Records for the Delivery Output Type “ZSPM”.

 

 

 

 

Technical Requirements:

In order to send Smart form Output as PDF attachment to more than one Mail ids (TO and CC format) automatically upon saving the Delivery Document, appropriate changes has to be made to Driver Program ‘ZRLE_DELNOTE’ which is assigned to the Delivery Output Type “ZSPM” used for this purpose.

 

 

Driver Program Modifications:

 

Reason for the Change: Since Standard SAP allows sending mail only to one Mail id for which radio button is enabled in Customer Master; we have to do the following technical changes to pick all the mail IDs from customer master for sending Delivery Output automatically via email. Hence following modifications were made to the Driver Program “ZRLE_DELNOTE” which is assigned to the Email Delivery Output Type “ZSPM”:

 

 

Technical Overview:

 

Get all the Mail Ids present in ADR6 table for KNA1-ADRNR = ADR6-ADDRNUMBER.

The Mail ID with field value as “X” for field ‘FLGDEFAULT’ in the customer master will reflect in ‘TO’ address and the remaining Mail ids in ‘CC’ address of the Delivery Output mail.

Call the Smart form with CONTROL_PARAMETERS-GETOTF as ‘X’ (Remaining other Export Parameters are similar to RLE_DELNOTE program’s smart form call) and Import the following structures ‘DOCUMENT_OUPTUT_INFO’, ‘JOB_OUTPUT_INFO’ and ‘JOB_OUPTUT_OPTIONS’.

Convert internal table JOB_OUTPUT_INFO-OTF[] to PDF by calling FM ‘CONVERT_OTF_2_PDF’.

After converting to PDF, use ‘SO_NEW_DOCUMENT_ATT_SEND_API1’ and send mails in TO and CC Format.

 

Source Code Extract details will be shared upon requests.

 

 

 

Functional Requirements:

Condition Record Maintenance for Delivery Output Type "ZSPM":

 

Go to Transaction Code - VV21

 

Maintain Condition Record for Delivery Output Type “ZSPM” as per your key combination requirement. Here, the Record is maintained based on Shipping Type / Shipping Point and Delivery Type.

 

 

Select the “Communication” button to assign the “Communication Strategy” – “ZSBD”

 

 

Now save the Condition Records maintained.

 

 

Maintain Email ID in Ztable for Customers:

Go to Transaction Code “ZES_MAIL_IDS”

 

 

 

The above screenshot shows the Ztable, where you can Display / Create / Change / Delete the Customer Mail ID by just enabling the appropriate Radio button.

Here, you can see that we have already maintained Email IDs for Customer ‘7600005’:

 

 

 

 

In the above screenshot, there is a box in the ‘To Address’ field which is enabled for [email protected]. This ‘To Address’ has to be enabled for the respective mail IDs which you want to display in “TO ADDRESS” in the Delivery Output Email.

 

 

 

 

Functionality Testing:

Scenario 1 - During Creation of Delivery Document thro Transaction Code - VL01N:

 

Enter the Sales Order Number for which the Delivery has to be created:

 

 

 

 

In main Menu, go to “Extras” à Delivery Output à Header to ensure that our Email Output type “ZSPM” is triggered:

 

 

The below screenshot ensures that the Email Output type “ZSPM” is triggered to process sending Delivery Output email to multiple recipients maintained in the Customer Master:  

 

 

 

Now save the Delivery to ensure that the Email Output Type “ZSPM” has sent out the Delivery Output via Email to the recipients maintained in the Customer Master in “TO” and “CC” format as explained above:  

 

 

 

You can find below the screenshot, where the Delivery Output PDF attachment has been sent to “Viswanathan Thirugnanam” in “TO” address and “Balaji” / “Ravikumar” in “CC” address format:  

 

  

 

Screenshot of Delivery Output received through Email in PDF Format:  

 

  

 

 

 

 

Scenario   2:   Triggering Repeat Delivery Output only for Conditional Field Changes in Delivery Document Change Mode:   

 

Let us take the Conditional Field as "Change in Ship to Party Address" in the change mode of Delivery Document through Transaction "VL02N". So whenever there is a change in the SHIP TO PARTY address in Delivery Document, then the Delivery Output must be triggered and processes after saving the Delivery Document. This ensures that NO Output will be triggered for any changes in the Delivery Document other than SHIP TO PARTY address changes.

 

Go to Change mode of Delivery Document – T. Code “VL02N“:

 

 

 

 

Go to Header Details à Partners Tab to change the Postal Code from “08204” to “59574”. The Postal Code change for SHIP TO PARTY has been shown clearly in the below two successive screenshots:

 

 

    

 

  

 

Now save the Delivery Document to ensure that the Email Delivery Output Type “ZSPM” is triggered again due to SHIP TO PARTY address changes in the Delivery Document change mode.  

 

  

 

 

Go to T. Code "VL02N" - In main Menu; go to "Extras" à Delivery Output à Header' to ensure that our Email Output type is triggered again due to the changes made to SHIP TO PARTY address:

 

 

The below screenshot ensures that the Email Delivery Output type "ZSPM" is triggered again due to the SHIP TO PARTY address change in Delivery change mode:

 

 

 

You can find below the screenshot, where the Delivery Output PDF attachment has to been sent to “Viswanathan Thirugnanam” in “TO” address and “Balaji” / “Ravikumar” in “CC” address format in email:  

 

  

 

Delivery Output received through Email in PDF Format:      

 

 

 

 

Advantages of Conditional Repeat Output: 

 

 

Repeat Delivery Output will be triggered and processed only if there are any changes made to the specific required fields in the Delivery Document.

 

Restricts the Email Output Type trigger and processing for the changes made to the fields other than the specific fields, which are filtered using Technical functionality.

 

Only sends the email with Delivery Output attachment to the customer, if there are any changes to the important fields like Quantity / Ship to Party Address / Deletion of Line Item / Addition of Line Item in the Delivery Document Change Mode.

 

Conditional Fields can be selected as per Business Requirement.