ABAP log

April 18, 2007

Running your ABAP on a particular SAP application server.

Filed under: ABAP, SAP — abaplog @ 3:25 pm

Sometimes we need to perform a task on a particular application server. Most common examples of that are collecting statistics or running SQL Trace, where the data is collected only for one application server and saved locally. I had to extract the statistics data once and do that from all servers. As I could not find any function modules that would help me, I have decided to let the standard report run on each server and grab the output data. There are two ways of doing that. One is to schedule background jobs on each server. You may have noticed that in the job parameters screen of SM36 you can select an application server, where the job will be running. But in my case I would then have to implement job status checking functionality and then read the spool. Another way, which is simpler, is to create an RFC-capable function module that is going to do the job for one server, and then call it for all servers in a loop. This assumes that for each application server, you have an RFC destination, which was so in my case.

The list of available servers can be requested with the function TH_SERVER_LIST, and in my case, to get a name of the RFC destinations, I followed a simple naming convention used on our systems. It can be something like HOSTNAME_SYSID_SYSNUMBER, but surely, it can be different for you.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: