07-28-2005 4:34 PM
hi all,
could anyone please tell me if there is any special way to read data from a maintenance view (if at all it is possible).
i wrote a simple select on it but it gave me a syntax error that the view is not defined in the dictionary. (i am able to see the view definition by double clicking and it is active too).
the following is my select.
select single lgnum from v_t320 into (w_lgnum) where werks eq p_i_werks and lgort eq p_i_lgort.
awaiting answers...
regards,
PJ
07-28-2005 5:07 PM
Hi,
Try this
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'U'
view_name = 'table'
TABLES
dba_sellist = gt_typo
EXCEPTIONS
OTHERS = 14.
07-28-2005 4:40 PM
07-28-2005 4:57 PM
Thanx Rich,
but the documentation on maintenance views says that we can have read access to them. Does that mean the data can only be seen via the DDIC and not from a select written in a program??
this is what i read...
Maintenance Status
The maintenance status of a view controls whether data records can also be changed or inserted in the tables contained in the view.
The maintenance status can be defined as follows:
Read only: Data can only be read through the view.
Read, change, delete, insert: Data of the tables contained in the view can be changed, deleted, and inserted through the view.
Only read access is permitted for database views that are defined through several tables. If a database view contains only one single table, data can be inserted in this table through the view (see Inserts Through Database Views).
The following status definitions are also possible for maintenance views:
Read and change: Existing view entries can be changed. However, records cannot be deleted or inserted.
Read and change (time-dependent views): Only entries whose non-time-dependent part of the key is the same as that of existing entries may be inserted.
you surely have earned some points here....just let me be clear of the concept behind this
regards,
PJ
07-28-2005 5:07 PM
Hi,
Try this
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'U'
view_name = 'table'
TABLES
dba_sellist = gt_typo
EXCEPTIONS
OTHERS = 14.
07-28-2005 6:18 PM
Well, if you try to do a select against a maint. view, the syntax check will yell at you about, saying that it needs to be a table, database view or projection view. The documentation which you speak of is mostly likly talking about the user interface to the view. Again, I would suggest reading the underlying table directly. The maintenacne view is only used for the table maintenance program.
Regards,
Rich Heilman