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

Inserting Records into Deep Table

Former Member
0 Likes
482

Hi All,

I have a table which is further having a table inside it as its field. Please let me know how to insert records into the inner table as well as outer table.

Thanks in advance.

Jasmeet Singh

4 REPLIES 4
Read only

Former Member
0 Likes
462

Consider table EMP having fields as follows

Ename

EmpID

Age

Gender

and the Ename is as follows

Ename

- Fname

- Mname

- Lname

U can refer them as follows

EMP-Ename-Fname=

EMP-Ename-Mnaem=

EMP-Ename-Lname=

EMP-EmpID=

EMP-Age=

...

Read only

Former Member
0 Likes
462

Hi,

Please tell how to append the records into inner table.

Thanks

Jasmeet

Read only

0 Likes
462

Append <workarea> to itab.

Read only

Clemenss
Active Contributor
0 Likes
462

Hi Jasmmet,

why don't you just post what you have?


types:
  begin of ty_inner,
  inner_field_1 type i,
  inner_field_2 type i,
  end of ty_inner,
  ty_t_inner type table of ty_inner,
  begin of ty_outer,
  outer_field_1 type i,
  outer_field_2 type i,
  t_inner type ty_t_inner.
  end of ty_outer,
data:
  ls_inner type ty_inner,
  ls_outer type ty_outer,
  lt_outer type table of ty_outer.
start-of-selection.
ls_inner-inner_field_1 = 1.
ls_inner-inner_field_2 = 2.
append ls_inner to ls_outer-t_inner.
ls_outer-outer_field_1 = 1.
ls_outer-outer_field_2 = 2.
append ls_outer to lt_outer.

Thats's the way.

Regards,

Clemens