cancel
Showing results for 
Search instead for 
Did you mean: 

Write to Process Chain Protocol via SE38 ABAP Program

mschaeufler
Explorer
0 Kudos

Hello folks,

I have an ABAP program that runs in a process chain.

I want to be able to write custom messages to the process chain job log of the respective variant. E.g. "Step 1 successful."

How can this be achieved?

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

MESSAGE TYPE 'I'

mschaeufler
Explorer
0 Kudos

Sometimes the solution is too easy. Like in your case. The message did the job. However the WRITE did not help (as suggested by eugeniy.lancev). Here is the result of the different types:

WRITE 'Step 1 successful.'. "Does nothing
MESSAGE i003 WITH 'Info'. "Writes 'Info' to OC Job Log
MESSAGE w003 WITH 'Warning'. "Writes 'Warning' to OC Job Log
MESSAGE e003 WITH 'Error'. "Ends execution and sets Variant Status to RED. Doesn't actually print 'Error'

Thank you raymond.giuseppi for your good and quick response!

matt
Active Contributor

In background, WRITE will create a spool. (If you look at your job in SM37. you'll see it has generated a spool file, that you can look at). Messages in background though, always write to the job log, which is what you are seeing.

I'd have been able to give that answer if I'd notice that although you wrote "Write to Process Chain Protocol" which I interpreted as the first tag, what you meant was the background protocol. 🙂


Answers (3)

Answers (3)

dob1
Participant
0 Kudos

I know this question is a little bit old, but for others who search for the same solution:

MESSAGE s666(rspc) WITH 'Your message for RSPC log'.
former_member231709
Active Contributor
0 Kudos

You can use a WRITE statement in your ABAP program for this.

P14397410
Participant
0 Kudos

Hi Markus,

I don't have an answer to your question, but would like to discuss in detail to see if it leads to some conclusion.

As far as I know, there is no way to view the log of the entire process chain (other than SLG1). You can see the log of individual process (variant) like in your image. I have never seen anybody writing to the log of another program. In your example, you are asking to insert a message within the log of the start process of the PC. I don't think that is possible.

It is possible to display the log of entire process chain if it is a local chain within a meta. Each of those messages already indicate that the step (process) is successful. If you still want to insert your own custom message there, it _may be_ possible by writing another ABAP program, but I haven't tried or tested that.