| Import Parameters Name and Description |
Field name |
Field function |
| Commandname
Name of unix shell script or command to be executed by SAP
|
|
Name of unix shell script to be invoked |
| Parameters |
|
The parameters to be sent to unix shell script ($1, $2 etc). Send parameters as a concatenated string separated by space and length not exceeding 128 characters
For eg in UNIX environment the above shell script would be executed as
Sndmail
We will be simulating this command using the FM from SAP system
sender@a.com receiver@b.com Trial /home/test.doc testmail. |
| Table Parameters Name and Description |
Field Name |
Field function |
| Exec_protocol (structure)
Table to get messages from unix server after shell script is executed
|
Length |
Length of the message from external program i.e unix |
| |
Message |
Log message from external program i.e unix |
| Export Parameters Name and Description |
Field name |
Field function |
| Status
Contains the status of execution of external program
|
|
Scheduling status of external program i.e unix |
Once the above FM is invoked with the necessary parameters the unix program sendmail will send a mail to the inbox of the recipient in Microsoft.
The restriction on the parameter string length of 128 characters can be removed to make way for very long email addresses and subjects. Build the parameters into an internal table and download it as a file on the unix server. Instead of passing each parameter individually, pass the unix server path of this file as the parameter to the unix shell script (sndmail mentioned above). Modify the shell script to read every line of this parameter file as variables to be used in the shell script.
In the next article we will see an example of the ABAP code you can use to send SAP Mails.
|