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

itab exception handling

Former Member
0 Likes
848

Hi all,

to avoid short dumps due to too large itabs, I wanted to catch an exception. (Consider: The itab size depends on user input). Unfortunately, the following coding doesn’t work:


TRY.
  SELECT *
    FROM dbase
    INTO itab
    WHERE ….

CATCH cx… INTO ref_exc

ENDTRY.

In case of too large itab, the system doesn’t execute the catch command. Has anybody an idea how to avoid a short dump due to few buffers available?

Regards,

Thomas

Hi all,

to avoid short dumps due to too large itabs, I wanted to catch an exception. (Consider: The itab size depends on user input). Unfortunately, the following coding doesn’t work:


TRY.
  SELECT *
    FROM dbase
    INTO itab
    WHERE ….

CATCH cx… INTO ref_exc

ENDTRY.

In case of too large itab, the system doesn’t execute the catch command. Has anybody an idea how to avoid a short dump due to few buffers available?

Regards,

Thomas

6 REPLIES 6
Read only

Former Member
0 Likes
814

Hi

Why don't you create the wright variable?

DATA: MY_WA TYPE REF TO DATA.

FIELD-SYMBOLS: <WA> TYPE ANY.

CREATE OBJECT MY_WA TYPE (DBASE).

ASSIGN MY_WA->* TO <WA>.

SELECT *

FROM dbase

INTO <WA>

WHERE ….

Max

Read only

Former Member
0 Likes
814

As you said that itab size depends on user input why dont u use the variation of select statement as to fetch records up to x rows only.

Read only

Former Member
0 Likes
814

Hi,

I just want to catch the system exception (dump: tsv_tnew_page_alloc_failled) nothing else. However, I didn’t find a predefined exception class like for instance cx_sy_zerodivide. Any ideas ?

Regards

Thomas

Read only

0 Likes
814

Try if you can catch the particular exception class.

CX_SY_SQL_ERROR

Regards

Anurag

Read only

0 Likes
814

Hi,

cx_sy_sql_error doesn't work.

I think I'll be working with the package size statement.

Thanks

Thomas

Read only

Former Member
0 Likes
814

Use the PACKAGE SIZE option of the SELECT statement.

Rob