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: 

Table type & Structure

Former Member
0 Kudos

Hi Experts. I have created on structure in DDIC and one table type.I have one class and within class from method I am passing the values of select statement threw the table type to my main program of se38.I need the syntax to use the structure and 'table type' and both get populated form the class method.

1 REPLY 1

Former Member
0 Kudos

Hi

U need to define an internal table just like your TABLE TYPE:

DATA: ITAB TYPE <TABLE TYPE>.

and a work area like the LINE TYPE of the TABLE TYPE:

DATA: WA TYPE <LINE TYPE>.

Now you can read, update that table just like an internal table without the header line.

So:

WA-FIELD1 = ....

WA-FIELD2 = ....

........................

WA-FIELDN = ....

APPEND WA TO ITAB.

Max