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

Tables exist in database

Former Member
0 Likes
926

Hi,

Is there a way to check if the table that I input is exist in sap database?

For example,

check against zabc in se11. It does not exit. Thus, return the error message to user.

I need to kind of function in my current program.

Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
851

Hi,

select tabname from DD02l into dd02l-tabname

where tabname EQ 'zabc'.

IF sy-subrc NE 0.

WRITE :/No table existed.

ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
852

Hi,

select tabname from DD02l into dd02l-tabname

where tabname EQ 'zabc'.

IF sy-subrc NE 0.

WRITE :/No table existed.

ENDIF.

Read only

Former Member
0 Likes
851

hi,

In this case:

if sy-subrc NE 0.

message EXXX.

endif.

if u display as an error msg then only if u enter the correct value u can process it else it won't.. if u don't want it to be displayed as error msg go for Warning(W) , Information(I) instead of E.

Thanks

Arunprasad.P

Read only

Former Member
0 Likes
851

Thanks.

select tabname from DD02l into dd02l-tabname is what i am looking for. Thanks

Read only

0 Likes
851

Hi ..

if i wan to check on fields, may i know what table can i use?

Read only

0 Likes
851

found it .. Use DD03L.

Thanks.