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: 

A question About SUBMIT statement

Former Member
0 Kudos

Hi,

By SUBMIT statement, i can trigger another report. If the called report runs into dump, how can i detech/catch the dump in the calling report? I tested. It seems impossible to catch the dump. The calling report will also dump.

My question is, if the called report runs into dump, how to detect the dump and avoid dump in calling report?

Thanks in advance,

Best Regards, Johnney.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

This is only untested suggestion.

Use:


TRY.
    submit....
    catch exeption .....
ENDTRY.

The statements TRY...ENDTRY is used to handle the Exceptions at the Runtime so the program will not go into the Dump.

J.S.

Edited by: John Smith on Oct 21, 2008 12:26 PM

Edited by: John Smith on Oct 21, 2008 12:31 PM

6 REPLIES 6

Former Member
0 Kudos

hello friend,

check the submit program is present in ut system r not ....

and by using ST22 tcode for dump Analysis ...

thank u,

santhosh.

Former Member
0 Kudos

Hi

Good

I dont think it is possible to detach/catch the the error of the SUBMIT report when you are running the main report in the foreground. You can catch the error of the SUBMIT program if you run the main program in background, and debug the main program in background using the tcode sm50.

Thanks

mrutyun^

Former Member
0 Kudos

hi

you can catch this kind of error or exeption from the respective report

then pass this error or exeception to the calling report

go through the example I am giving , ti have done it like this only

SUBMIT zgurep03 AND RETURN WITH SELECTION-TABLE li_seltab .

then in the called reprot

*Check ledger

SELECT SINGLE * FROM t881 WHERE rldnr = p_rldnr.

IF sy-subrc NE 0.

SET CURSOR FIELD 'P_RLDNR'.

MESSAGE e448 WITH p_rldnr

MESSAGE e446 INTO lv_text .

lv_type = 'E'.

  • Capturing the error messages.

EXPORT lv_text TO MEMORY ID 'TX'(004).

EXPORT lv_type TO MEMORY ID 'TP'(005).

in calling report

IMPORT gv_type1 TO gv_type FROM MEMORY ID 'TP'.

IMPORT gv_text1 TO gv_text FROM MEMORY ID 'TX'.

  • preparing error message in the callge report for the calling report

PERFORM prepare_message

USING sy-msgid

lv_msgno

lv_msgv1

lv_msgv2

lv_msgv3

lv_msgv4

CHANGING gv_text.

  • preparing error message

FORM prepare_message USING p_sy_msgid

p_sy_msgno

p_sy_msgv1

p_sy_msgv2

p_sy_msgv3

p_sy_msgv4

CHANGING p_gv_text.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

id = p_sy_msgid

lang = 'EN'

no = p_sy_msgno

v1 = p_sy_msgv1

v2 = p_sy_msgv2

v3 = p_sy_msgv3

v4 = p_sy_msgv4

IMPORTING

msg = gv_text

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

I guess this will solve your problem

Regards

Prashant

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi

This is only untested suggestion.

Use:


TRY.
    submit....
    catch exeption .....
ENDTRY.

The statements TRY...ENDTRY is used to handle the Exceptions at the Runtime so the program will not go into the Dump.

J.S.

Edited by: John Smith on Oct 21, 2008 12:26 PM

Edited by: John Smith on Oct 21, 2008 12:31 PM

0 Kudos

Hi,

i have same problem. how did you solve this problem? Can you help me please?

Thanks.