Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in background job

Former Member
0 Kudos

Hello abap Gurus,

I am scheduling a back ground job for goods issue against work orders, using BAPI now i need to post the error returned to the error log, i.e., when BAPI returns 'E' type than the message should be posting to error log and should be viewable from there with timestamp, please be quick to reply.

<removed_by_moderator>

Thanks

devender.

Edited by: Julius Bussche on Sep 3, 2008 9:56 AM

5 REPLIES 5

former_member745780
Active Participant
0 Kudos

Hello Dev,

Check this FM

RSLG_WRITE_SYSLOG_ENTRY

Thanks

Former Member
0 Kudos

Hi,

As my understanding it should write in error log.If it is not in error log then simply use WRITE for those error you can able to view in spool.

Thanks,

radha.

0 Kudos

Hi,

I am elobrating the problem a bit more see i u can help.

I have to schedule a job which is a z program which will execute a bapi,

now want that the bapi RETURN should be read and if the return type is 'E' than i can see that message in my job log, please tell me if i am still unable to clear my problem.

Thanks

Devender

0 Kudos

Just make a loop at return itab and use command WRITE to write the log. It will appear in the JOB log.


LOOP AT return INTO wa WHERE type EQ 'E'.
  WRITE: /1 wa-MESSAGE, wa-message_v1, wa-message_v2. "and so on ...
ENDLOOP.

Regards.

Valter Oliveira.

0 Kudos

Hi ,

As our friend said After excuting Bapi , loop at return table for Record whic have error message, but insted of writing them directly use 'FORMAT_MESSAGE' function module to get the correct message