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: 

Field selection

Former Member
0 Kudos

How to move a single field from database table to internal table? Specify the command.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Could you please elaborate your query?

Thanks,

Sriram POnna.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Could you please elaborate your query?

Thanks,

Sriram POnna.

Former Member
0 Kudos

hi,

select single <field> from <dbtable> into <itab>

where <condition>

Regards,

Sathish reddy

Former Member
0 Kudos

Hi,

just declare one internal table containing only the field which you want to move.

let the internal table is i-tab anf field is f1,

types : begin of t_tab,

f1 type <dataelement of the field>,

end of t_tab.

Data : i_tab type standard table of t_tab.

select f1 from <database table name>

into table i_tab.

Then the table will contain only the intended fields.

Former Member
0 Kudos

hiii

you can use query like

SELECT matnr                         " Material Number
    FROM mara
    INTO TABLE i_mara
   WHERE matnr IN s_matnr.

regards

twinkal

former_member181995
Active Contributor
0 Kudos

ABAP 21 Days

Former Member
0 Kudos

Hi,

If you want to fetch only one value of one field then

Select single <fieldname> into corresponding fields of <internal table name> from

<database table> where <condition>.

if you want to select all the possible values of a field based on some criteria then dont use single keyword.

Select <fieldname> into corresponding fields of table <internal table name> from

<database table> where <condition>.

note one thing here we cannot use table keyword with single keyword.

it will give you an error.

Thanks

Rajesh