‎2005 Feb 14 6:34 PM
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,
‎2005 Feb 14 9:30 PM
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
‎2005 Feb 14 6:37 PM
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
‎2005 Feb 14 9:30 PM
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
‎2005 Feb 14 11:51 PM
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?
‎2005 Feb 15 4:52 AM
Check out the Function module documentation for DDIF_NAMETAB_GET
Its well explained there.
Regards
Raja
‎2005 Feb 15 6:40 AM
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.
‎2005 Feb 15 11:04 AM
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
‎2005 Mar 14 10:16 PM
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