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

exception error

Former Member
0 Likes
814

Hi all,

i'm doing validation for tables which is selected dynamically and if table is nt valid then it throw a exception, all things wkging fine up to there but i want that it throw a exception with invalid table names which is selected dynamically.

how to do that?

i have nt to use any type of error msg or any type of msg it's my limitations.

regards,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
781

Hi,

Just wanted to know how u r checking the validity of a table.

If it is through a Function Module, then u can catch the exception of the function and raise a message raising an exception like follows:

message e000(zplm) with 'Table XYZ not valid' raising exception.

Hope it helps.

Regards,

Himanshu

6 REPLIES 6
Read only

Former Member
0 Likes
782

Hi,

Just wanted to know how u r checking the validity of a table.

If it is through a Function Module, then u can catch the exception of the function and raise a message raising an exception like follows:

message e000(zplm) with 'Table XYZ not valid' raising exception.

Hope it helps.

Regards,

Himanshu

Read only

Former Member
0 Likes
781

hi anuj

if you are using normal abap code means, try check the table whether exist in data dictionary or not by using select query in else part

if you are using OOPS abap means use TRY CATCH Stmt

Regards

Deva

Read only

Former Member
0 Likes
781

hi all, i'm using this code

DATA : ITAB3 LIKE STANDARD TABLE OF DD03L.

LOOP AT IT_TABFLDNAME3.

SELECT TABNAME FROM DD03L INTO TABLE ITAB3 WHERE

TABNAME = IT_TABFLDNAME3-TABNAME .

IF SY-SUBRC NE 0.

RAISE TABLE_NOT_AVAILABLE.

ENDIF

but how to pass current table name through raise statement.

regards,

Read only

0 Likes
781

hi Anuj Jain

pass that exception in Message Class

Regards

Deva

Read only

Former Member
0 Likes
781

Hi all,

Actually i creating a rfc then it's not possible to me to pass a msg through msg class in rfc, i hve to pass this only by raise.

guide me,

regards,

Read only

Former Member
0 Likes
781

thanx