cancel
Showing results for 
Search instead for 
Did you mean: 

OS commands to run t-codes

Former Member
0 Kudos

Hi Gurus ~

Is is possible to run a t-code and get its report from the OS command line? Specifically, I want to get the batch list that is displayed from t-code SM37. Please let me know if there's a way to do this from the OS command line.

Thanks in advance,

Denny.

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Thanks for the responses, everyone.

After much reading and rubbing of my eyes, I don't have the capability to install the CCMS agents. So, that's a route that I can't take.

However, I came across a couple of OSS feeds that asked me to update my Support Packs (Note 176492 & Note 617547). If I update the Support Packs, will I have some access to the alert monitoring or do I still have to install the CCMS agents?

Please let me know.

Denny.

Former Member
0 Kudos

Yes, but I'm still pursuing other alternatives. Right now, it looks like I can use RZ20, but I'm not really sure how it works. Still doing some research into it. Has anyone worked with CCMS before?

Denny.

former_member204746
Active Contributor
0 Kudos

you will need to read http://service.sap.com/monitoring

Former Member
0 Kudos

So, from what I understand, I should create an ABAP program that will place the results of t-code to a file. Then I should use SAPEVT to call that program from the OS. Is that correct?

I'm not an ABAPer, would it be hard to create a program to do this task?

Denny.

Former Member
0 Kudos

Hi ~

I tried the "startrfc" command and I don't seem to have the executable file. How do I acquire it? I've also seen a comment that my task can be done through SQL. Is that possible?

Denny.

Former Member
0 Kudos

Have you thought about doing this in reverse? It is generally easier to write an ABAP program that would generate a report that can be written out to a directory or emailed than it is to create an executable that makes calls via RFC.

Did not know if you had thought about that.

Thanks,

J. Haynes

Former Member
0 Kudos

Hi Joe ~

The main idea was to run a batch job from the OS and then retrieve the output into a file. I wanted to eliminated the part of me logging onto the server and being redundant with my work.

I'm not an ABAPer so I'm not sure that coding a program would enable me to retrieve the results from the OS. If there is a way, I would love to hear your views.

Denny.

Former Member
0 Kudos

>

> The main idea was to run a batch job from the OS and then retrieve the output into a file. I wanted to eliminated the part of me logging onto the server and being redundant with my work.

> I'm not an ABAPer so I'm not sure that coding a program would enable me to retrieve the results from the OS. If there is a way, I would love to hear your views.

>

> Denny.

Denny,

In this case you could you could schedule an ABAP program to run as scheduled background task (within SAP) and have it generate the report you need (without having to login to the app server itself).

How you do this externally also depends on the DB and the language. For most DB's, you can use your choice of scripting lang (PERL/Python) and use a DB library to connect and select from tables as needed.

- Joe

Former Member
0 Kudos

Hi Joe ~

Now I understand what you meant. Thanks for the clarification. I've done some research and come across a command "SAPEVT". Would this be helpful to me? If not, do you have any documentation on how to do the scripting for an Oracle DB?

Denny.

Former Member
0 Kudos

With SAPEVT you can trigger an event in SAP.

You can create a job in SAP which is started when the event is triggered.

This job can generate the file yhat you need. Of course you need a report able to generate the file..

Regards,

Olivier

Former Member
0 Kudos

Hi Olivier ~

Can you provide me with more details or documentation on how to use the STARTRFC executable?

Denny.

former_member204746
Active Contributor
Former Member
0 Kudos

Hi,

For a transaction, I don't think so but it is possible to run a function module using the STARTRFC executable.

Regards,

Olivier