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: 

Problem : How to fill value in a particular column of dynamic itab

Former Member
0 Kudos

Hi Experts,

I have created an dynamic itab using create_dynamic_table method of cl_alv_table_create class. Now in the dynamic itab created i want to fill a particular column with value from a particular column of an static internal table.

May i know how could i do this ?

Thanks in advance,

Akash

1 REPLY 1

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

You have to use ASSIGN COMPONENT stmt for this:



FIELD-SYMBOL: <VAR> TYPE ANY.

"Field Symbol <VAR> points to the column COLUMN of the structure <DYN_STRUC>
ASSIGN COMPONENT COLUMN OF STRUCTURE <DYN_STRUC> TO <VAR>. 

IF SY-SUBRC = 0.
<VAR> = STAT_STRUC-COLUMN. 
ENDIF.

Further details on SDN.

BR,

Suhas