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: 

Tables exist in database

Former Member
0 Kudos
212

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

Former Member
0 Kudos
137

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

Former Member
0 Kudos
138

Hi,

select tabname from DD02l into dd02l-tabname

where tabname EQ 'zabc'.

IF sy-subrc NE 0.

WRITE :/No table existed.

ENDIF.

Former Member
0 Kudos
137

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

Former Member
0 Kudos
137

Thanks.

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

0 Kudos
137

Hi ..

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

0 Kudos
137

found it .. Use DD03L.

Thanks.