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 statement

Former Member
0 Likes
483

Hi to all Guru's,

can anybody explain me how this below syntax get works?

i am not getting the flow of this program?

so please can anybody explain me the flow of this particular code?

DESCRIBE FIELD dobj INTO td.

PROGRAM DESCTEST.

TYPES: BEGIN OF name_struc,

first TYPE c LENGTH 20,

last TYPE c LENGTH 20,

END OF name_struc,

BEGIN OF absence_time_struc,

day TYPE d,

from TYPE t,

to TYPE t,

END OF absence_time_struc,

phone_number TYPE n LENGTH 20,

BEGIN OF employee_struc,

id LIKE sbook-customid,

name TYPE name_struc,

BEGIN OF address,

street TYPE c LENGTH 30,

zipcode TYPE n LENGTH 4,

place TYPE c LENGTH 30,

END OF address,

salary_per_month TYPE p LENGTH 10 DECIMALS 3,

absent TYPE STANDARD TABLE OF absence_time_struc

WITH NON-UNIQUE DEFAULT KEY,

phone TYPE STANDARD TABLE OF phone_number

WITH NON-UNIQUE DEFAULT KEY,

END OF employee_struc.

You can determine the structure of the type EMPLOYEE_STRUC by collecting the type group SYDES as follows:

TYPE-POOLS: sydes.

DATA: employee TYPE employee_struc,

td TYPE sydes_desc.

DESCRIBE FIELD employee INTO td.

The following table shows a few selected columns of the type description table TD-TYPES. For a better overview, the names of the columns IDX_NAME, IDX_UERR_TYPE and IDX_EDIT_MASK have been shortened:

|FROM| TO |BACK|NAME|UTYP|EMSK|TYPE

-


|--||||||--

1 | 2 | 7 | 0 | 0 | 2 | 0 | v

2 | 0 | 0 | 1 | 6 | 0 | 4 | N

3 | 8 | 9 | 1 | 7 | 5 | 0 | u

4 | 10 | 12 | 1 | 8 | 0 | 0 | u

5 | 0 | 0 | 1 | 9 | 0 | 0 | P

6 | 13 | 13 | 1 | 11 | 0 | 0 | h

7 | 17 | 17 | 1 | 12 | 0 | 0 | h

8 | 0 | 0 | 3 | 13 | 0 | 0 | C

9 | 0 | 0 | 3 | 14 | 0 | 0 | C

10 | 0 | 0 | 4 | 15 | 0 | 0 | C

11 | 0 | 0 | 4 | 16 | 0 | 0 | N

12 | 0 | 0 | 4 | 17 | 0 | 0 | C

13 | 14 | 16 | 6 | 0 | 18 | 0 | u

14 | 0 | 0 | 13 | 20 | 0 | 0 | D

15 | 0 | 0 | 13 | 21 | 0 | 0 | T

16 | 0 | 0 | 13 | 22 | 0 | 0 | T

17 | 0 | 0 | 7 | 0 | 0 | 0 | N

Thanks & Regards

Priyalatha

4 REPLIES 4
Read only

Former Member
0 Likes
457

Hi,

this is no "flowing code". It is just declaration. The only working statement is "DESCRIBE", which delivers the attributes of the named data object (field or table).

Good luck!

Jo

Read only

Former Member
0 Likes
457

hi priya latha,

i have gone through it.

can u tell me what is the purpose of it .

rgds

Chalam

Read only

0 Likes
457

Hi Simha chalam ,

i want to know the significance of that describe statement statement so i took that code.

can u tel me the flow of that describe statement.

Thanks

Priya

Read only

0 Likes
457

Hi Priya,

DESCRIBE FIELD f INTO td.

Here your field td is of type sydec_desc.

This structure has two components Types and Names.

In This <b>Types</b> stores the components of the field. The beginning and end of the line area representing the components are stored in TYPES-FROM and TYPES-TO.

In Names diff details about the Names, IDX_Name, Length, Decimals etc etc.

For more details press F1 on describe. You should get the details.

Thanks.

Lalit

Message was edited by:

Lalit Kabra