The following SAP system components play a part in the processing of external programs in a job:
This figure illustrates how the control program is started from a background work process through RFC and how the control program calls the external program itself. It also shows how the control program sends a message back to the application server through RFC.
The following problems can arise when processing external programs in a job:
· The external program cannot be started correctly.
· The external program is not able to send its results back to the background processing runtime system
Process Flow
These problems can be analyzed as follows:
...
1. Check the system requirements:
Ensure that the target system is set up correctly for running external commands and programs. See Prerequisites for Running External Commands and External Programs.
2. Check the job log for error messages
3. Activate the trace
If the problem is not yet solved, you should activate the trace for the external program. When you schedule an external program in dialog (transaction SM36/SM37), you can activate the SAPXPG trace for a particular job step with the trace option in the Control Flags of the job step. You can also activate the SAPXPG trace as follows, without changing the job step definition:
¡ For a particular external command (all job steps that use the command), with the trace option in transaction SM69
¡ For all processing of external commands on a particular host system by setting the environment variable sapxpg_trace in the host system in which the external job is to be started. Format and values:
sapxpg_trace=
The trace records are written in the trace files listed above.
All of these options activate SAPXPG’s tracing, but have no effect on any tracing facility at the operating-system level or in the external program.
If you use the function module JOB_SUBMIT to schedule a job step, then you must make the following parameter setting: EXTPGM_SET_TRACE_ON = ‘X’
This has the effect of creating the following trace files in the home directory of the gateway ID on the host on which the external program is to be executed:
¡ dev_cp Log of the SAP control program sapxpg
¡ dev_xpg Log of all output from the external program
Check both of these trace files for error messages. You may find error messages in the gateway trace file dev_rdand in the system log on the server on which the job was started.
No comments:
Post a Comment