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

Select query from maintenance view

Former Member
0 Likes
10,020

Hi,

Can anyone tell how to use a select query for a maintenance view? SAP allows to select values only from table, projection or database view. Pls suggest.

Regards,

Jeyananth

10 REPLIES 10
Read only

Former Member
0 Likes
3,869

Hi Jeyananth

goto to table maintainance generator of maintainance view...

in there in menu environment-->modification--->source code or events...

main purpose of maintainance view is to update the multiple (related)table at a time (ex mara and makt tables)....

Regards

Hareesh Menon

Read only

0 Likes
3,869

Hareesh,

I wanted to know whether any way is there to read the values of maintenance view from a program. If I use a select query on the maintenance view, I get an error message saying that select is possible only in tables, projection view/ database view.

Regards,

Jeyananth

Read only

0 Likes
3,869

Hi.

I don't think you will be able to fire SELECT Query on the maintanence view.

Which is the view that you are talking about?

And why are you going for this view since you are getting the error?

Why not fire separate queries?

Rahul.

Read only

0 Likes
3,869

Its a custom maintenance view. I need to know the possibility of reading those values...

Read only

0 Likes
3,869

You can use the tables used in the mainteanence view and write

a simple program to display the same.

Read only

ThomasZloch
Active Contributor
0 Likes
3,869

Not possible, as you found out. Create the same view as a database view (only inner joins posssible!) or program the JOIN yourself in your SELECT statement.

Thomas

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,869

As SAP doesn't allow SELECT query on maintenance view, you have to use the FM [VIEW_GET_DATA|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=view_get_data&adv=false&sortby=cm_rnd_rankvalue].

Regards

Read only

Former Member
0 Likes
3,869

Hi

you cannot use a select statement on a maintenance view.I tink you can do one thing

like this.First goto the view and note the tables and the fields of the tables used in the view.

Then use an ABAP join (Join statement)to fetch the data .

This will surely meet you need .

Regrards

Hareesh Menon

Read only

Former Member
0 Likes
3,869

Thanks for your suggestions.

Regards,

Jeyananth

Read only

0 Likes
3,869

Next time, it would be appreciated by those who helped you if you would assign poi nts to those answers.

Rob