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

Database view

Former Member
0 Likes
418

I have to retrieve data from 7 tables and the conditions may vary .

My question is , can I query a database view with sql statements

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
380

if view type is database view then you can write the sql query..

select * from v_usr_name into table i_usr.

Thanks

Seshu

2 REPLIES 2
Read only

Former Member
0 Likes
381

if view type is database view then you can write the sql query..

select * from v_usr_name into table i_usr.

Thanks

Seshu

Read only

Former Member
0 Likes
380

Check the below code ,here i written join on two tables mara and v_usr_name(Database view)..

REPORT ZJOINS message-id z01. .

data : begin of i_join occurs 0,

matnr like mara-matnr,

ernam like mara-ernam,

NAME_TEXT like v_usr_name-NAME_TEXT,

end of i_join.

start-of-selection.

select amatnr aernam b~NAME_TEXT into table i_join

from mara as a inner join v_usr_name as b on bbname = aernam.

loop at i_join.

endloop.

Thanks

Seshu