Skip to Content

ABAP CODE background task log read from SM37

Apr 11, 2017 at 08:54 AM


avatar image
Former Member

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 ?


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

avatar image
Former Member Apr 11, 2017 at 10:49 AM

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

Then these info will write to job log


Loop at it_mara.

update to table mara.

If sy-sy-subrc = 0

message 'success material created' TYPE 'S'


message 'error rejected TYPE 'S'


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

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

Raymond Giuseppi
Apr 18, 2017 at 01:13 PM

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.

10 |10000 characters needed characters left characters exceeded