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

what is dynamic internal table

Former Member
0 Likes
467

what is dynamic internal table & example of dynamic internal table.

2 REPLIES 2
Read only

Former Member
0 Likes
403

DATA: itab TYPE STANDARD TABLE OF spfli,

wa LIKE LINE OF itab.

DATA: line(72) TYPE c,

list LIKE TABLE OF line(72).

START-OF-SELECTION.

*line = ' CITYFROM CITYTO '.

line = ' AIRPTO '.

APPEND line TO list.

SELECT DISTINCT (list)

INTO CORRESPONDING FIELDS OF TABLE itab

FROM spfli.

IF sy-subrc EQ 0.

LOOP AT itab INTO wa.

  • WRITE: / wa-cityfrom, wa-cityto.

WRITE 😕 wa-airpto.

ENDLOOP.

ENDIF.

Also have a look at below weblog:

/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table

It gives you info abt how to create dynamic internal table.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

anversha_s
Active Contributor
0 Likes
403

hi,

chk the below code and link.

very hlpful

REPORT zdynarjtry.

PARAMETERS: comp(80).

DATA: dref TYPE REF TO data.

FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE.

CREATE DATA dref TYPE TABLE OF (comp).

ASSIGN dref->* TO <dyn_table>.

SELECT * FROM (comp)

INTO TABLE <dyn_table>.

BREAK-POINT.

See the below links for more programs:-

http://searchsap.techtarget.com/tip/1,289483,sid21_gci912390,00.html

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

rgards

Anver

if hlped pls mark points