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

Describe Table

Former Member
0 Likes
1,100

Hi,

I want to learn every properties of a given table such as attributes, total lines, primary keys. I was suggested to examine "describe table". Is there any good reference that explains "describe table" that you know?.

Thanks,

1 ACCEPTED SOLUTION
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
997

Hi Huseyin

"DESCRIBE" statement is used for getting simple information about internal tables and I guess you want to acquire information about a database table. So, you can use the FM <b>"DDIF_NAMETAB_GET"</b> .

This FM will give technical information about the database table. To acquire the number of records you can use <b>"SELECT COUNT( * ) "</b> statement.

Hope this helps...

Kind Regards

*--Serdar

[email protected]

7 REPLIES 7
Read only

vani_krishnamoorthy
Product and Topic Expert
Product and Topic Expert
0 Likes
997

HI Huseyin,

In your program type in Describe and hit F1. You will get help on describe.

or go the documentation at

http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3798358411d1829f0000e829fbfe/frameset.htm

Regards,

Vani

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
998

Hi Huseyin

"DESCRIBE" statement is used for getting simple information about internal tables and I guess you want to acquire information about a database table. So, you can use the FM <b>"DDIF_NAMETAB_GET"</b> .

This FM will give technical information about the database table. To acquire the number of records you can use <b>"SELECT COUNT( * ) "</b> statement.

Hope this helps...

Kind Regards

*--Serdar

[email protected]

Read only

0 Likes
997

Hi,

Yes Serdar, I want to learn a database table's properties. I need more information about "DDIF_NAMETAB_GET" function. Can you suggest a reference such as in which BC series I can find information? Or another good reference?

Read only

0 Likes
997

Check out the Function module documentation for DDIF_NAMETAB_GET

Its well explained there.

Regards

Raja

Read only

0 Likes
997

Hello Huseyin,

In addition to the FM mentioned, you can also consider the FM <b>DDIF_TABL_GET</b>. This FM is very well documented.

You can also look at the Class CL_REBF_DDIC_TABL.

Regards,

Anand Mandalika.

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
997

Hi Huseyin

These type FMs are not explained in BC or other training documents. However, as mentioned, you can refer to FM documentation at SE37.

Kind Regards

*--Serdar

[email protected]

Read only

Former Member
0 Likes
997

Hello,

two more options for getting table descriptions:

1) ABAP command "import nametab" (see ABAP documentation)

2) using the Run-Time Type Identification classes (class CL_ABAP_TYPEDESCR and children)

data:

lt_but000 type table of but000,

lr_structdescr type ref to cl_abap_structdescr.

lr_structdescr ?= cl_abap_typedescr=>describe_by_data( lt_but000 ).

Cheers,

Thorsten