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 a submit program

Former Member
0 Kudos

Hello,

In a program, there is a "submit and return" of another program. When they occurs an error in the second program (message error), the traitement stops and don't returns to the first program.

How can it be possible to return to the first program even if there is an error in the second program?

Thanks,

Regards,

Patrice.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Thanks for your answers. The problem is that I can't modify the submitted program. It's a standard program.

Patrice.

6 REPLIES 6

Subhankar
Active Contributor
0 Kudos

Hi...

It is not possible to came in the previous program if there is any error message in the submitted program...

One thing you can do. Instead error message when any error occurred exit from the submitted program.

Thanks

Subhankar

anup_deshmukh4
Active Contributor
0 Kudos

Try using proper message types in just like I E or S A W X etc....the second program...or just ignor the errors in the second program if they are not critical...!

Check for the significance of the message type above ...!

hope it helps...!

Thanks

Edited by: Anup Deshmukh on Feb 12, 2010 12:22 PM

kesavadas_thekkillath
Active Contributor
0 Kudos

instead of raising the error,

try like

if l_v ne 1.

return.

endif. or

if l_v ne 1.

exit.

endif.

Former Member
0 Kudos

In your second program write Error message as

MESSAGE <message text> TYPE I DISPLAY LIKE E

STOP.

Regards,

Mohaiyuddin

Former Member
0 Kudos

Hello,

Thanks for your answers. The problem is that I can't modify the submitted program. It's a standard program.

Patrice.

0 Kudos

Hi,

If your program is not dependent on the SUBMITTED program (Some thing like that standard program doesn't have any output) then you can try in below way.

CALL JOB_OPEN

SUBMIT standard program

CALL JOB_CLOSE.

This creates a batch job for standard program.

If your program is dependent, then i don't see any possibility other than doing the same validations in your program before calling the standard program.

Thanks,

Vinod.