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

Deep structure help

Former Member
0 Likes
647

hi

I am trying to insert values from a deep structure into a database table.

if I have a structure xixi_stvalues which has

id which is of type char7

type of type char20

results of type xixi_ttresults <- this is a table, implying that the xixi_stvalues is a deep structure

Now...I want to save both id and type into xixi_dbvalues

I tried this:

Insert into xixi_dbvalues values xixi_stvalues-id xixi_stvalues-type.

this tells me thatexpects a '.' after

I HAVE ALREADY TRIED USING HELP.

Thanks

5 REPLIES 5
Read only

Former Member
0 Likes
616

Hi charla6,

For example there is a 3D internal table (it_tab) like this....

Name

Age

Address --> houseno, street1, street2. (type table field)

vehicle

now create a data like this

DATA: it_add like line of it_tab-address.

loop at it_tab-address into it_add.

"this will give u all the field values like it_add-houseno, it_add-street1, it_add-street2.

endloop.

like this u can read all the 3D internal tables

Do reply if still problem persist.

Thanks

Rohit G

Edited by: Rohit Gaharwar on Aug 12, 2009 12:06 PM

Read only

matt
Active Contributor
0 Likes
616

Please try not to use the same subject for your various posts - it makes it look like you're posting duplicates.

If you read the help for INSERT again, you'll see that VALUES expects a work area - not a list of values. There's even an example.

You need to create a work area with the same structure as your database table, move id and type into that, and then use INSERT ... VALUES wa.

matt

Read only

Former Member
0 Likes
616

read the data from the deep structure

then pass to a variable and from that variable do the operation .

Read only

Former Member
0 Likes
616

Hi ,

try this....

Insert into dbtab values <workarea>.

or

insert dbtab from <workarea>


Insert into xixi_dbvalues values xixi_stvalues.

or


Insert  xixi_dbvalues from xixi_stvalues.

Regards.

Read only

Former Member
0 Likes
616

thnx