Archive

Posts Tagged ‘Email’

How to Send Smartform in PDF by Email – Configuration

September 5th, 2011 No comments

The smartform is often printed out directly in the company daily process. But in some cases, the business requires to convert the smartform into PDF and will be sent by email. For example, if one customer wants to receive the billing form by email, this requirement can be done by SAP output control. Below gives a step by step tutorial and analysis.

Step 1. Set up a customer master with email address.

Go to transaction XD01 and create a new customer with email address. Save the customer and record the customer number.

Read more…

SAPconnect Configuration

January 19th, 2011 No comments

SAPconnect provides a standard interface for external communication, which supports sending using telecommunication services, such as FAX, text messages (pager/SMS), Internet mail and X.400, as well as sending to printers and between different SAP Systems.

Read more…

Examples – Send Email with Attachment

January 8th, 2010 No comments

In the ABAP development, we always get the requirement to send emails outside with attachment. Below is the example to send email with a SAP shortcut as an attachment.

Read more…

ABAP Email Traditional API

January 7th, 2010 No comments

SAP provides several function modules to send email to the external world. The interfaces of them are more or less the same, just with some minor difference.

Function Group: SOI1 – API Function Modules for Externals

Function Module:

SO_DOCUMENT_SEND_API1 – SAPoffice: Send new document with attachments using RFC
SO_NEW_DOCUMENT_SEND_API1 – SAPoffice: Send new document
SO_NEW_DOCUMENT_ATT_SEND_API1 - SAPoffice: Send new document with attachments using RFC

In the implementation, all above function modules will call another function module ‘SO_OBJECT_SEND’ to send email.

Differences among these function modules:

SO_DOCUMENT_SEND_API1 - In this FM u can specify the sender address. Means u can hardcode any ID and system will display that sender only irrespective of who is running the report.

SO_NEW_DOCUMENT_SEND_API1 – Through this system will pick sender based on from which id running the program. This function module also enables you to send a new document, which has not yet been created, internally and externally. During the send process the document is created, along with the attributes and content that is to be transferred.

SO_NEW_DOCUMENT_ATT_SEND_API1 - This function module enables you send a new document including any existing attachments. The document and the attachments are transferred in the same table. They are created when sent and can also be placed in the sender’s outbox.

Except these function modules, SAP provides a simplified one named HR_FBN_GENERATE_SEND_EMAIL. If you check the function module interface, you will find it is quite easy to use.

I will give some useful examples with actual scenario recently. But above function modules are more or less not state of the art and difficult to handle. Meanwhile, SAP introduced the BCS (Business Communication Services), a much more flexible and future-oriented OO attempt to Mail. We will discuss it later.

ABAP and Email – Set Up SAP Enviroment

December 29th, 2009 No comments

Before we start to write ABAP code to send email, we first need to configure the SAP system. SAP note 455140 document the detail steps of this activity. If you don’t have the access to SAP service marketplace, please refer to this link Note 455140 – Configuration of e-mail, fax, paging or SMS using SMTP. Here, I summarised the SMTP configuration steps.

Related Transaction Code

RZ10 – SAP Profile Maintenance
SU01 – SAP User Management
SICF
SCOT – SAPconnect Administration
SOST – Administration of External Send process
SMICM – ICM Monitor

Configure the profile parameter (RZ10)

For SMTP, you must set the profile parameters listed below. The placeholder <*> stands for a number with which the parameters that can occur several times are numbered sequentially, starting with 0.

icm/server_port_<*> = PROT=SMTP,PORT=<port>
This opens a TCP/IP port for receiving mails by the SMTP Plug-In.

is/SMTP/virt_host_<*> = <host>:<port>,<port>,…;
This defines a “virtual mail host” for receiving mails.

Read more…

ABAP and Email – SMTP Protocol

December 28th, 2009 1 comment

Actually, this post has nothing to do with the ABAP. It will make a brief introduction to SMTP protocol. If you have already familiar with this, please just skip it. We will discuss ABAP in next post.

 Introduction

Simple Mail Transfer Protocol (SMTP) is an Internet standard for electronic mail (e-mail) transmission across Internet Protocol (IP) networks and is the protocol in widespread use today. SMTP is specified for outgoing mail transport and uses TCP port 25. 

SMTP is a relatively simple, text-based protocol, in which a mail sender communicates with a mail receiver by issuing simple command strings and supplying necessary data over a reliable ordered data stream channel, typically a Transmission Control Protocol (TCP) connection. An SMTP session consists of a series of commands, initiated by the SMTP client, and responses from the SMTP server through which the session is opened, operating parameters are exchanged, the recipients are specified, and possibly verified, and the message is transmitted, before the session is closed. The originating host is either an end-user’s email client also known as mail user agent (MUA), or a relay server’s mail transfer agent (MTA).

SMTP Transport Example

Below diagram shows how emails are transported in the Internet using SMTP protocol.

mailserver

 

A typical example of sending a message via SMTP to two mailboxes (alice and theboss) located in the same mail domain (example.com) is reproduced in the following session exchange.

Read more…

ABAP and Email – General

December 28th, 2009 No comments

I plan to write a series of posts about abap and email. As we all know,email is a very convenient tool to communicate with others in working enviroment. Using SAP to send emails seems to become a common requirement for ABAPer. In this tutotial, I would like to introduce it in below topics:

1. SMTP Protocol

2. Set Up SAP Enviroment

3. ABAP Email Traditional API

4. BCS(Business Communication Service)

5. Examples – Send Email with Attachment

6. Trouble Shooting

Stay tuned and hope you will enjoy these topics. :-)