Application Development and Automation 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: 
Read only

Changing the Error message in the background

Former Member
0 Likes
983

Hi Experts,

Is there any way to catch the Error message in the background apart from changing the message type.

Because the error message is coming from a standard function and I want my program should handle the error message. Whether this can be possible if possible can anyone please let me know the process.

Thanks in advance.

Regards,

Srinivas

Edited by: Srinivas Hari on Jun 23, 2009 10:08 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
865

Hi Srini,

The question is not very clear still I am trying to answer this.

If my understanding is correct you are trying to run a standard function module in background task in your custom program and that FM is giving some error messages but not raising any exceptions and you are trying to catch those exceptions in your program. If that is be the case then yes you can definitely catch that error messages.

Step 1 : Call function 'XXXX' IN BACKGROUND TASK

Step 2: Call function 'ID_OF_BACKGROUNDTASK'

Step 3: COMMIT WORK and WAIT.

Step 4: Call function 'STATUS_OF_BACKGROUNDTASK' ---> passing the id number which you will receive in Stpe 2.

Basically the step 4 would return you the error messages which would be visible in Transaction SM58.

Regs,

Somnath

Hi Experts,

Is there any way to catch the Error message in the background apart from changing the message type.

Because the error message is coming from a standard function and I want my program should handle the error message. Whether this can be possible if possible can anyone please let me know the process.

Thanks in advance.

Regards,

Srinivas

Edited by: Srinivas Hari on Jun 23, 2009 10:08 AM

3 REPLIES 3
Read only

Former Member
0 Likes
866

Hi Srini,

The question is not very clear still I am trying to answer this.

If my understanding is correct you are trying to run a standard function module in background task in your custom program and that FM is giving some error messages but not raising any exceptions and you are trying to catch those exceptions in your program. If that is be the case then yes you can definitely catch that error messages.

Step 1 : Call function 'XXXX' IN BACKGROUND TASK

Step 2: Call function 'ID_OF_BACKGROUNDTASK'

Step 3: COMMIT WORK and WAIT.

Step 4: Call function 'STATUS_OF_BACKGROUNDTASK' ---> passing the id number which you will receive in Stpe 2.

Basically the step 4 would return you the error messages which would be visible in Transaction SM58.

Regs,

Somnath

Read only

Former Member
0 Likes
865

Hi Srinivas,

You can capture all the error messages in ur program and either download it as a file or capture them on the screen using WRITE statements.

This screen you can see in the SPOOL after the background jiob is executed.SPOOL transaction: SP01.

Regards,

Vimal.

Read only

Former Member
0 Likes
865

Thanks for the answers.