Skip to Content
0
Former Member
Feb 11, 2012 at 12:57 PM

exceptions handling for "submit of Insert Report "

106 Views

Dear Experts,

i need to handle Exception "syntax Error" when Submit the inserted report.

i tried " try and Catch " but failed to catch Dump Error.

for example:

Data CODE TYPE TABLE OF String .

APPEND 'REPORT ZDYN.' TO Code .

APPEND 'Data Var1 type I .' TO Code .

append 'if var > 10 ' to Code .

append 'Write ''Success'' . ' to Code .

append 'else. ' to Code .

append 'Write ''Failed'' . ' to Code .

append 'EndIf . ' to Code .

TRY .

data Prog TYPE c LENGTH 50 VALUE 'ZDYN'.

INSERT REPORT Prog FROM CODE .

SUBMIT Prog AND RETURN .

CATCH CX_ROOT .

raise SYNTAX_ERROR .

ENDTRY.

" in the inserted Report the Variable Name is Var1 NOT Var So it will be Syntax error " DUMP Error ".

Thanks in advance