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

Updates through a maintenance view

Former Member
0 Likes
2,743

Hi,

I'm having difficulty with maintenance views. I thought it ws possible to construct a maintenance view consisting of two or more tables and be able to update non-key fields in any table, provided the tables were linked via FK and had suitable cardinality of C:1.

However, this seems to be what I've found: you can only update non-key fields in the primary table. Although fields in the secondary tables appear as though you can update them (via SM30), any data changes you make are erased (as you look at it!) when you hit Save - the original value returns.

Is my assessment correct? SAP Help is vague and ambiguous on the matter.

Also, maybe someone could explain the cardinality requirements. SAP Help states the FKs must have N:1 cardinality, but as far as I can see it should be C:1.

Thanks,

T.

4 REPLIES 4
Read only

Former Member
0 Likes
1,735

Hi T,

One thing we can do is.. when we click on SAVE button,

control goes to PAI module where u can write some code to update the tables that you would like to as all the data of fields which was filled in the view will be available for u .

Ram.

Read only

0 Likes
1,735

Hi Ram,

Yes, I could do that (maybe I will have to), but it's really subverting the way the maintenance view should work - I think.

Am I correct in my assumptions that you can only update the primary table through a maintenance view? I wonder if there's a bug in standard SAP (4.7) whereby fields from the secondary tables look as though they accept input, but don't. Does anyone know if this is the case.

Thanks,

Tenchy.

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,735

Hello Tenchy

You are talking about view clusters (SE54) where you have hierarchical linked tables that can be maintained together.

Obviously, you cannot edit key fields of the primary table. Instead you need to use execute two operations:

- DELETE entry
- CREATE new entry

It goes without saying that the same operations are propagated to the dependent entries in secondary tables.

The cardinality between primary table and secondary table should be 1:N meaning

- for each entry in the primary table you can have none or multiple entries in the secondary table

- you cannot have secondary records for which the corresponding primary record does not exist

Regards

Uwe

Read only

0 Likes
1,735

Hi Uwe,

I haven't been looking at view clusters. I just created a maintenance view in SE11 linking two tables with identical primary keys. Although the non-key fields appear to be available for update in the SM30 interface only those from the primary table can actually be updated. Those from the secondary table will accept changes to the data but any changes are discarded (old value returns on the screen) when SAVE is pressed. SAP Help implies that with these maintenance views all non-key fields, regardless of table, should be available for update. I can't understand it at the moment.

Thanks,

Tenchy.