SAP allows you to trigger an OS command or script through a job step. A very common usage of this facility is to write FTP scripts and use them as a job step to transfer files. When the background process wants to trigger the script, it sends the request out to SAP gateway (local sapgwXX) through the dispatcher. The gateway calls sapxpg with the OS script/command as an argument. sapxpg then executes the OS command/script. When the command/script finishes or outputs intermediate messages, it passes the information to sapxpg; sapxpg passes that to sapgw; sapgw to the background process via dispatcher. If any of the commands in your script fails and you do not handle them with proper exit codes from the script, the job will be shown as successful as the script exits with an exit 0 command. For example: If we use the following ftp script : #!/bin/ksh ftp -vn $HOST <<END_FTP > /ftp_working_directory/ftplog 2>&1 quote USER sapnwnewbie quot...