Search code examples
databaseviewsap-basis

Auto-generated view maintenance dialog is corrupt


I've created 3 tables, and 3 corresponding views, then I've generated a maintenance dialog in SE11 Utilities > Table Maintenance Generator for each of these views using the following settings:

enter image description here

The message "Request completed successfully" appears but the generated dialogs are unusable and seem corrupt. This is how it looks in screen painter:

enter image description here

When I've tried activating a cluster view on these 3 views I got the following error:

Error while modifying dynpro SAPLZ...

Message no. SV597

Diagnosis

The flow logic of the screen SAPLZMM01_FUNCGRP
0001 is not that of a generated view maintenance list screen. Either the screen has been considerably modified manually, or the view which it is based on has no maintainable key.

System Response

The screen has not been modified.

Procedure

Make the view cluster maintenance screen modifications required manually on the screen. See the transaction 'Generate table maintenance dialog' application help for the modifications required.

Edit: I followed note 2178069, it didn't help.

Please help. How to delete this dialog entirely and regenerate it correctly ?

Steps to reproduce the problem:

1. Create a new table ZTEST

  • Delivery class: C

2. Add three fields to the new table:

  • MANDT of data element MANDT
  • CONFIG of type CHAR and LENGTH 12
  • LIFNR of data element LIFNR

Check "key field" and "mandatory" for the first two fields.

enter image description here

3. Click on "technical settings", give the following parameters:

  • Delivery class: APPL0
  • Size category: 0

4. Click Extras > Enhancement category

  • Pick the second option: "numeric / alphanumeric enhancement".

5. Activate

6. Create a view based on this table.

7. In the fields tab, click Table Fields and copy all the fields (only the keys are present by default).

8. Put maintenance flag 'S' on the two key fields.

enter image description here

Important: if the maintenance flags 'S' are removed from the view fields, the dialog is generated correctly. However, maintenance flags are needed for correct operation of the view cluster maintenance.

9. Generate the maintenance dialog (Utilites > Table maintenance dialog):

enter image description here

10. Go to SM30, maintain your newly created view.

enter image description here

If you enter a value and validate, the maintenance view will look like this: enter image description here

A correct maintenance view should look like a table: enter image description here


Solution

  • The problem was that the 'S' flags were set incorrectly in the table views (SE11). They have to be set only for fields that exist in a parent view. The header view shouldn't have any 'S' fields because no parent view exists. The second view in the hierarchy should have 'S' fields set on key of fields eixsting in the parent view at most (and so on for lower views in the hierarchy) and never on the client field if there is one. If set correctly, the view cluster activation will modify the independant views to make them useable in a hierarchy.

    See here: https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=473962134