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 We will be simulating this command using the FM from SAP system |
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.
For Further Clarifications, Leave a Comment............