Skip to Content
-2

ABAP CODE background task log read from SM37

Apr 11, 2017 at 08:54 AM

170

avatar image

i have updated mara table in a background task and i need to display error details of each record with sequence number .i know we can see log details in SM37 but its showing only error or success details but how to get record sequence number ?

Example

i need result as below

record status message

1 success material created

2 error rejected

.

.

thanks & Regards,

Priyan R.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

John Vo Apr 11, 2017 at 10:49 AM
0

Try to raise message type 'S'. if you raise message type 'E' will stop program.

Then these info will write to job log

Ex:

Loop at it_mara.

update to table mara.

If sy-sy-subrc = 0

message 'success material created' TYPE 'S'

else.

message 'error rejected TYPE 'S'

endloop

Show 1 Share
10 |10000 characters needed characters left characters exceeded

thanks for your answer John vo,

log is created in a background mode which is a LSMW direct input project we cant change the code in loading program the only option is i have to read the log from SM37 with correct record sequence number .

thanks in advance

0
Raymond Giuseppi
Apr 18, 2017 at 01:13 PM
0

Perform some search on Application Log in online help and sample reports like SBAL_DEMO_*.

Then adapt your creation program and allow users to transaction SLG1.

Share
10 |10000 characters needed characters left characters exceeded