Skip to Content
0
Former Member
Feb 16, 2005 at 07:57 AM

Function "DDIF_NAMETAB_GET"

739 Views

Hi,

I am reading a database table's attributed using DDIF_NAMETAB_GET function. My code is:

DATA: IO_TABLE_NAME TYPE tabname,
  it_dfies TYPE TABLE OF dfies,
  is_dfies TYPE dfies.
DATA: is_x030l  TYPE x030l.

*IO_TABLE_NAME is getting from user

CALL FUNCTION 'DDIF_NAMETAB_GET'
           EXPORTING
                tabname   = IO_TABLE_NAME
           IMPORTING
                x030l_wa  = is_x030l
           TABLES
                dfies_tab = it_dfies
           EXCEPTIONS
                OTHERS    = 1.

LOOP AT it_dfies INTO is_dfies.
ENDLOOP.

Above, When I watching the is_dfies, there are some informations as:

"ZCALISAN ID 0002000004 AKCNT"

I know that ZCALISAN is the name of database table, ID is the attribute of this table, AKCNT is the field type of this attribute.

Now,

1. I don't know 0002000004 mean? Or how to interpret this value?

2. I want to learn this table's primary key(s). But the table "it_dfies" includes only attribute information. How can I read primary keys? Is it possible to read primary keys using FUNCTION 'DDIF_NAMETAB_GET'?

3. I want to see the field type AKCNT or another field type's Data Type. Is it char? If char what is long? Or is it Decimal? How can I do this operation?

4. The purpose of all of these operations copying one database table. For this purpose, I will read table's information then using EXEC SQL I will create the copied table. Using EXEC SQL can I define DECIMAL like in SAP, or all other types like in SAP? Is there any restriction?