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: 

how to use this FUNCTION VIEW_MAINTENANCE

Former Member
0 Kudos

hi

i create a table zxxxx and set Data Browser/Table View Maint:

Display/Maintenance Allowed.

so i want to use the function of "VIEW_MAINTENANCE" to update and create new

inforation the TABLE.

but i don't know VIEW_MAINTENANCE which of parameter meaning.

and how to control it.

who can give demo show.

CALL FUNCTION 'VIEW_MAINTENANCE'

EXPORTING

VIEW_ACTION = 'S' "DISPLAY

VIEW_NAME = W_VIEWNAME "W_TABNAME

TABLES

X_HEADER = L_VIMDESC

X_NAMTAB = L_VIMNAMTAB

DBA_SELLIST = L_VIMSELLIST

EXCL_CUA_FUNCT = L_VIMEXCLFUN.

what meaning and availability value : EXCL_CUA_FUNCT-FUCNTION ,

how to use X_HEADER

X_NAMTAB

DBA_SELLIST these parameter.

thank you very much.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Please check doucmentation maintained for FM - VIEW_MAINTENANCE.

CUA functions to be deactivated dynamically

At runtime, the table EXCL_CUA_FUNCT must contain all those functions which are not to be callable in data processing , i.e. which are to be dynamically deactivated in the CUA interface at runtime. This is useful, e.g. for the following functions whose handling in cluster maintenance is ambiguous:

- 'ANZG' --> switch from 'Change' to 'Display' mode,

makes no sense in a maintenance cluster

- 'AEND' --> switch from 'Display' to 'Change' mode

makes no sense in a display cluster

- 'xxxx' --> other functions at the callers discretion.

The table must have the structure VIMEXCLFUN, as follows:

FUNCTION(4) TYPE C, ---> contains the function codes to be deactivated dynamically

MESSAGE(3) TYPE C. ---> online help auxiliary field (not yet supported)

Return ->

CUA functions to be deactivated dynamically

Database Access Selection Conditions The table DBA_SELLIST contains the database access selection conditions. The following fields must be filled:

Field name Contents

NEGATION NOT, if the condition is to be negated

SPACE otherwise

VIEWFIELD name of the field to which the condition is to apply

OPERATOR logical operator of the condition (e.g. 'EQ', 'NE',...)

VALUE comparison value of the condition in external format

AND_OR AND, if the next line of the condition is to be linked

to the current line by logical AND

OR , if the next line of the condition is to be linked

to the current line by logical OR

SPACE, if no further line follows

DDIC S, if the view field in DD is flagged as a subset field

(PM = 'S')

SPACE otherwise

TABIX Index of the view field in the view nametab

Notes:

1. Valid operators are: (see also ABAP doc.)

EQ - equals

NE - not equal to

GT - greater than

GE - greater than or equal to

LT - less than

LE - less than or equal to

CA - only for strings: contains at least one character of the comparison string

CN - only for strings: negation of CA

CO - only for strings: contains only characters from the comparison string

NA - only for strings: negation of CO

CP - only for strings: contains the pattern in the comparison string

NP - only for strings: negation of CP

CS - only for strings: contains the string in the comparison string

NS - only for strings: negation of CS

LK - like the LIKE operator in a SELECT ... WHERE clause

2. The function module does not (yet) check whether the selection conditions passed here are compatible with any conditions in the Data Dictionary view definition. The caller must ensure that this is the case.

Return ->

Database Access Selection Conditions

2 REPLIES 2

Former Member
0 Kudos

Please check doucmentation maintained for FM - VIEW_MAINTENANCE.

CUA functions to be deactivated dynamically

At runtime, the table EXCL_CUA_FUNCT must contain all those functions which are not to be callable in data processing , i.e. which are to be dynamically deactivated in the CUA interface at runtime. This is useful, e.g. for the following functions whose handling in cluster maintenance is ambiguous:

- 'ANZG' --> switch from 'Change' to 'Display' mode,

makes no sense in a maintenance cluster

- 'AEND' --> switch from 'Display' to 'Change' mode

makes no sense in a display cluster

- 'xxxx' --> other functions at the callers discretion.

The table must have the structure VIMEXCLFUN, as follows:

FUNCTION(4) TYPE C, ---> contains the function codes to be deactivated dynamically

MESSAGE(3) TYPE C. ---> online help auxiliary field (not yet supported)

Return ->

CUA functions to be deactivated dynamically

Database Access Selection Conditions The table DBA_SELLIST contains the database access selection conditions. The following fields must be filled:

Field name Contents

NEGATION NOT, if the condition is to be negated

SPACE otherwise

VIEWFIELD name of the field to which the condition is to apply

OPERATOR logical operator of the condition (e.g. 'EQ', 'NE',...)

VALUE comparison value of the condition in external format

AND_OR AND, if the next line of the condition is to be linked

to the current line by logical AND

OR , if the next line of the condition is to be linked

to the current line by logical OR

SPACE, if no further line follows

DDIC S, if the view field in DD is flagged as a subset field

(PM = 'S')

SPACE otherwise

TABIX Index of the view field in the view nametab

Notes:

1. Valid operators are: (see also ABAP doc.)

EQ - equals

NE - not equal to

GT - greater than

GE - greater than or equal to

LT - less than

LE - less than or equal to

CA - only for strings: contains at least one character of the comparison string

CN - only for strings: negation of CA

CO - only for strings: contains only characters from the comparison string

NA - only for strings: negation of CO

CP - only for strings: contains the pattern in the comparison string

NP - only for strings: negation of CP

CS - only for strings: contains the string in the comparison string

NS - only for strings: negation of CS

LK - like the LIKE operator in a SELECT ... WHERE clause

2. The function module does not (yet) check whether the selection conditions passed here are compatible with any conditions in the Data Dictionary view definition. The caller must ensure that this is the case.

Return ->

Database Access Selection Conditions

Former Member
0 Kudos

use this -

REPORT ZSKC_TEST2.

PARAMETER : P_VIEW TYPE OCUS-TABLE.
START-OF-SELECTION.

CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
  EXPORTING
    ACTION                               = 'S'
    VIEW_NAME                            = P_VIEW
  EXCEPTIONS
   CLIENT_REFERENCE                     = 1
   FOREIGN_LOCK                         = 2
   INVALID_ACTION                       = 3
   NO_CLIENTINDEPENDENT_AUTH            = 4
   NO_DATABASE_FUNCTION                 = 5
   NO_EDITOR_FUNCTION                   = 6
   NO_SHOW_AUTH                         = 7
   NO_TVDIR_ENTRY                       = 8
   NO_UPD_AUTH                          = 9
   ONLY_SHOW_ALLOWED                    = 10
   SYSTEM_FAILURE                       = 11
   UNKNOWN_FIELD_IN_DBA_SELLIST         = 12
   VIEW_NOT_FOUND                       = 13
   MAINTENANCE_PROHIBITED               = 14
   OTHERS                               = 15
          .
IF SY-SUBRC <> 0.

ENDIF.

Inside this VIEW_MAINTENANCE_CALL, FM - VIEW_MAINTENANCE is called. You can check the parameters there.