Application Development 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: 

About Maintenance View has 2 ZTABLEs

Former Member
0 Kudos

Hello ALL.

I created a Maintenance View has 2 tables.

2 tables are linked to one another with foreign keys.

(2 tables are ZTABLEs.) (Cardinality is 1:1)

I'm trying to entry records using Maintenance view.(SM30)

I can insert new records to 2 tables at the same time,

BUT I can't update records at the same time.

ONLY 1 table (check table) 's data is updated.

I don't know why.

also I can't delete records at the same time.

ONLY 1 table (check table) 's data is deleted.

please let me know how to do.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

there are some restrictions on the maintenance and help views. cardinality should be N:1

for more details check here.

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecdf446011d189700000e8322d00/frameset.htm

3 REPLIES 3

Former Member
0 Kudos

Hi

there are some restrictions on the maintenance and help views. cardinality should be N:1

for more details check here.

http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecdf446011d189700000e8322d00/frameset.htm

0 Kudos

Dear Jyothi

Thank you for your comment.

I corrected cardinality refer to the site, but still I can't.

I can entry new records to 2 tables at same time,

but I can't update and delete 2 records at same time.

only 1 ZTABLE's record is updated.

'delete' also.

I have no idea...

Do you imagine any other cause?

if you know SAP standard mentenance view include 2 tables (not text table), Please let me know.

Thanks.

0 Kudos

Hi Rie,

When you define a view maintenance with 2 or more tables, you select fields from each table, and map tables with foreign keys.

When a record of a view is updated, then the view fields are split into the data of the underlying tables, depending on which field comes from which table. Correspondingly, only those tables are affected, whose fields have changed.

This confirms to 2 points -

1) If you have 2 tables in a maintenance view, you must include the key fields of both the tables in the view. If there are common key-fields, you can them from either of the table.

2) If there are other non-key fields which are common, then you can assign them to only one of the tables in the view. But if you like an extended logic to change their values in the other table also, then you must maintain seperate logic to do so. Events!

You can try using an After Save, or any such events.

Regarding events, you will find a lot of documentation and links by searching the forum itself.

Cheers

Rekha