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

dynamicaly get structure description

Former Member
0 Likes
2,026

Hi friends,

I want to get every static information of perticular structure in report program..

Like : Search help attached with every component and from which package this search help belongs to?

structure name we can provide in selection screen.

i have tried using

PARAMETERS: str(40) type c.

DATA: lr_rtti_struc TYPE REF TO cl_abap_structdescr.

data: lt_DDFIELDS type DDFIELDS.

DATA: LS_DDFIELDS LIKE LINE OF LT_DDFIELDS.

lr_rtti_struc ?= cl_abap_structdescr=>describe_by_name( STR ).

lt_DDFIELDS = lr_rtti_struc->GET_DDIC_FIELD_LIST( ).

loop at LT_DDFIELDS into LS_DDFIELDS.

write: / LS_DDFIELDS-FIELDname.

endloop.

But it gives only component name... which is not sufficient information.

any solution????

1 ACCEPTED SOLUTION
Read only

varma_narayana
Active Contributor
0 Likes
812

Hi Virat..

To get all the Attributes of Fields in a Table/Structure,

Call the FM <b>DDIF_FIELDINFO_GET</b>.

Reward if Helpful.

3 REPLIES 3
Read only

Former Member
0 Likes
812

try to fetch the data from following tables...

DD02L , DD03L , DD04L

reward points if helpful.....

Read only

varma_narayana
Active Contributor
0 Likes
813

Hi Virat..

To get all the Attributes of Fields in a Table/Structure,

Call the FM <b>DDIF_FIELDINFO_GET</b>.

Reward if Helpful.

Read only

former_member480923
Active Contributor
0 Likes
812

add the following additional code into the program:


data: wa_dd04l type dd04l. 
loop at LT_DDFIELDS into LS_DDFIELDS.
*write: / LS_DDFIELDS-FIELDname.
select single SHLPNAME SHLPFIELD 
APPLCLASS into corresponding fields of 
wa_dd04l where 
ROLLNAME = LS_DDFIELDS-FIELDname 
and AS4LOCAL   = 'A'
and AS4VERS    = '0000'. 
** Now do what ever u like. 
endloop.

Hope That Helps

Anirban M.

Message was edited by:

Anirban Mukherjee