Application Development 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: 

dynamic internal table

Former Member
0 Kudos
63

hi,

I need to create a dynamic internal table structure with two fields. In which one field must vary dynamically and the other one is 'pernr'.

we tried with the following code but its showing error as 'work area data type conflict' while i try retrieve data from the database table.

DATA: dref4 TYPE REF TO data ,

s TYPE string.

CONCATENATE 'pa' p_infty '-' p_datapt INTO s.

CREATE DATA dref4 TYPE (s).

DAtA: BEGIN OF ty_addsubty1,

test LIKE dref4,

pernr TYPE persno,

END OF ty_addsubty1.

Is it possible to create a dynamic internal table like this..f so tell me how to do that.

Thanks in advance,

Regards,

Arunsri

3 REPLIES 3

Former Member
0 Kudos
45

Hi,

Check the following link:

http://www.sap-img.com/ab030.htm

Regards,

Bhaskar

Former Member
0 Kudos
45

make use of below syntax.

DAtA: BEGIN OF ty_addsubty1,

<test> LIKE dref4,

pernr TYPE persno,

END OF ty_addsubty1.

Reward if useful......................

Former Member
0 Kudos
45

type-pools : abap.

field-symbols: <dyn_table> type standard table,

<dyn_wa>,

<dyn_field>.

call method cl_alv_table_create=>create_dynamic_table

exporting

it_fieldcatalog = ifc

importing

ep_table = dy_table.

assign dy_table->* to <dyn_table>.

give points if satisfied.