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

Doubt in Fetching data from a View

Former Member
0 Likes
1,274

Hi all,

I want a data from a view v_tvko.How to use a view in program for fetching data from that.

Please help.

Thanks in advance.

Nithin.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,056

Hi Nitin,

We can't directly refer a view to get data.

We need to refer the tables using which a view has been created.

Using those tables, we can fetch the data as per our requirement.

For suppose, if you go to a view in SE11, then click on Tables tab, there you can get the reference tables.Then you need to check for the fileld in those tables for which you require the data.

Post the query directly on the table instead of view.

Hope this will help you.

Regards,

Anand.

Hi all,

I want a data from a view v_tvko.How to use a view in program for fetching data from that.

Please help.

Thanks in advance.

Nithin.

6 REPLIES 6
Read only

GauthamV
Active Contributor
0 Likes
1,056

hi,

yes, you can retrive data from database view.

check this.

[https://forums.sdn.sap.com/click.jspa?searchID=19504057&messageID=3026496]

Read only

0 Likes
1,056

"V137" is not defined in the ABAP Dictionary as a table, projection view or database view.

Then what does this error mean Gautham chakraverthi am not sure that you can directly get the data from the views.

Read only

Former Member
0 Likes
1,056

Hi,

Thanks to all for giving solutions ,the problem is solved.

Anand thanks to you,i went by ur instruction and it got solved.

Thanks,

Nitin

Read only

GauthamV
Active Contributor
0 Likes
1,056

hi,

If you keenly observe my post i was telling that we can retrive data from

database views which is correct.

V137 is a mainteanence view which cannot be used to fetch data.

for that you have to use T137 and T137T tables to fetch data.

@Nitin : V_Tvk0 is a mainteanence view so you cannot fetch data from that.

use TVK0 and TVK0T tables.

Read only

Former Member
0 Likes
1,057

Hi Nitin,

We can't directly refer a view to get data.

We need to refer the tables using which a view has been created.

Using those tables, we can fetch the data as per our requirement.

For suppose, if you go to a view in SE11, then click on Tables tab, there you can get the reference tables.Then you need to check for the fileld in those tables for which you require the data.

Post the query directly on the table instead of view.

Hope this will help you.

Regards,

Anand.

Read only

Former Member
0 Likes
1,056

hi

please refer to this thread

hope this helps

regards

Aakash Banga