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: 

how to select data from structure

laxman_sankhla3
Participant
0 Kudos
110

how to select data from structure

5 REPLIES 5

Sandeep_Kumar
Product and Topic Expert
Product and Topic Expert
0 Kudos
67

HI Laxman,

Structure do not have any physical data in the underlying database.

Structure can only be used to fetch data during run time .

Hope this helps.

Former Member
0 Kudos
67

Hi,

you cannot select data from a structure. It does not contain any data. Only a Table contains data.

If you can tell me your exact requirement in detail, I will be able to help you.

Regards,

Anand Mandalika.

anversha_s
Active Contributor
0 Kudos
67

hi,

chk this how to fetch from a field structure.

data : begin of fs. "strcuture
field1 like ztable1-field1,
field2 like ztable1-field2,
endof fs.

now for getting values

val1 = fs-field1
val2 = fs-field2

Former Member
0 Kudos
67

Hi Laxman,

Structure holds single record of data. You can acess data by using the syntax <b>Structure-field</b>

Please see sample.

data: wa_mara type mara.

select *

from mara

into wa_mara

up to 1 rows.

endselect.

write:/ wa_mara-mandt,

wa_mara-matnr,

wa_mara-maktl.

if helps plz reward points.

Regards

Bhupal Reddy

Former Member
0 Kudos
67

Hi Laxman,

A Structure is just a composite data type...

it doesnt hold any data in it...

Regards,

~Sri.