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

reading data from maintainance view

Former Member
0 Likes
2,134

hi ,

Can we read the data from maintainance view through select statement.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,794

Hi rajkumar,

1. To finally use the data,

make a select using

T001K

T001

joined by BUKRS

regards,

amit m.

17 REPLIES 17
Read only

Former Member
0 Likes
1,794

Hi rajkumar,

1. Absolutely.

2. Select * from V_T001

into table xyz.

regards,

amit m.

Read only

0 Likes
1,794

it is giving syntax error

V_001K_K is not defined in dictionary as table or projection view or database view

Read only

0 Likes
1,794

first check is there any view exists or not in SE11.

if it there try this...

tables: v_001K_K.

select * from 
         v_001k_k
         into table itab.

Vijay

Read only

0 Likes
1,794

Hi again,

1. V_001K_K

Since this view comprises

more than 1 table

T001K

T001

It gives this error.

2. Maintenacnee views comprising only 1 table

can be used in Select.

For eg. V_T001

V_T003 = Not allowed

PS:

3. The reason for this is :

Any R/3 view having only one table,

for such view, a physical view is created

in the database.

The records in it can be modified, inserted,deleted.

(conditions apply)

But for view having 2 or more tables,

no physical view is there in the database.

regards,

amit m.

Message was edited by: Amit Mittal

Read only

Former Member
0 Likes
1,794

like normal select.

select *
       from zview
       into table itab
      where field = 'ssd'.

vijay

Read only

Former Member
0 Likes
1,795

Hi rajkumar,

1. To finally use the data,

make a select using

T001K

T001

joined by BUKRS

regards,

amit m.

Read only

0 Likes
1,794

hi amit,

If the view (v_t001) is having only one table also we cant use select stat. to read.

May be using join is the only way.

thanks.

Read only

0 Likes
1,794

Hi again,

1. i did not fully understnd ur last staement.

2. If a join has only 1 table,

we can use

VIEW

TABLE

in our select.

3. Now if the view has only few columns,

then it would make a difference

between selecting from TABLE,selecting from VIEW.

regards,

amit m.

Read only

0 Likes
1,794

Hi

The join is used to create the View, in your abap code the View is like a normal transparent tables.

The fields you need for the select can belong to all tables used for join, but they have to exist in the view too.

Max

Read only

0 Likes
1,794

hi amit ,

I mean to say it is not possible to read the maintainace view through select stat.( although it is having one table in it)

Read only

0 Likes
1,794

Hi Raj,

You are RIGHT, I don't think we can use SELECT statements on maintenance views.

Regards,

Suresh Datti

Read only

0 Likes
1,794

Hi,

We have use two tables and created the view .

and i am able to select from that view.

one table also you can select.

regards

vijay

Read only

Former Member
0 Likes
1,794

Hi rajkumar,

1. Lots of confusion!

2.

If a maintenace view comprises of ONLY 1 table,

we CAN USE in select.

eg: View = V_T001

(has table T001 only)

3.

If a maintenace view comprises of MORE THAN 1 table,

we CANNOT USE in select.

eg: View = V_001K_K

(has two tables T001K, T001)

eg: View = V_T003

(has two table T003, T003T)

regards,

amit m.

Read only

0 Likes
1,794

Hi all,

I think we have to focus on the subject of the thread ie 'maintenance view'. I am almost positive that the use of both ABAP Open SQL and ABAP Native SQL to access views from ABAP programs, is only permitted for Database & Projection Views and cannot be used for Maintenance Views. Per SAP,s definition the Maintenance views provide you with a business view of the data.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
1,794

Hello guys,

SAP not allow you to read the maintenance view using Select Statement. Because its act like a screen. SO you cant write using select query using this view. Only possible DATA BASE view and Projection View.

But there is possible while using one function model, here with out using select query we use functional module to read the data from m - View. I am sorry I forgot the functional module name. Please find any document. Other wise i will send u next time.

Thanking you

Mohankumar

Read only

0 Likes
1,794

Hi Moham Kumar,

Could you recall the function module or any hint of FM name to read maintenance view ?

I'd highly appreciate your response.

Thank you very much.

Read only

0 Likes
1,794

Durai is not using SDN(That time) since almost last 2 years.so there is very less possibility to hear Durai again

Friend,

Its not possible even from any of Function module.

maintainance views are only to view enterprise data.

if any body find any FM please post here it would be great new learning for me.