1

ABAP は stdout と stderr への書き込みを許可しますか? ジョブ スケジューラ (クロナクル) を介して SAP システムへのインターフェイス接続をテストする小さなプログラムを作成する必要があります。たとえば、「He​​llo World!」と開始/書き込みます。+ 日付 + stdout/exit までの時間。私はこの一見些細なプログラムを担当する .net プログラマーですが、行き詰まっています。

4

4 に答える 4

1

I am assuming that your running SAP on a UNIX / Linux based system with an ABAP stack. SAP tries to abstract away as much of the underlying OS as possiable. This technique would hold on Windows with some minor modifications.

To interact with the OS have a look in SM49 "External OS Commands" from here you can set up a command to run cat and pass in the values you want written out to the console.

I would think you would be better off writing your messages to a file on the host system through. To do that;

OPEN DATASET i_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

then write data into the file using;

TRANSFER wa_text TO i_file.

then when your done don't forget

CLOSE DATASET i_file.

You can then look at the contents of the file in AL11 or pick it up directly off the host. If you want to see the messages as they are being printed on the unix host. Connect in with a console and use less +F /var/log/ or tail. On windows I am sure there is an equal substitute.

于 2011-03-29T21:27:20.387 に答える
1

Appliaction Log (Transaction SLG0, SLG1) Tables BAL* は、トレースに非常に優れています... バックグラウンド タスク、異なるユーザー アカウント、ユーザーから見えない、古いトレースの消去にも適しているため、とても楽しいですエントリは作成中に定義できます。もうデバッグする必要がないのは天国です。

于 2011-02-06T22:43:04.343 に答える
1

あなたが求めているような「デバッグ情報」を書くためのいくつかのオプションがあります。ここで以前の回答で言及された 2 つの可能性は、アプリケーション ログ (SLG1 および SBAL* 関数モジュール) とファイルへの書き込みです。

ただし、あなたの状況では、バックグラウンドでプログラムを実行していると述べています。その場合、最善の策は、MESSAGE を使用して単純にメッセージを発行することです (SY-BATCH の値をチェックすることにより、メッセージの発行をバックグラウンド処理に制限することができます)。

SM37 に移動すると、バックグラウンドで実行されているプログラムによって発行されたメッセージがジョブ ログに表示されます。

于 2011-04-05T07:24:17.370 に答える
0

アプリケーション ログを参照してください - http://help.sap.com/saphelp_nw04/helpdata/en/d3/1fa03940fab918e10000000a114084/frameset.htm

于 2010-03-29T17:56:04.950 に答える