I just put more complete answer than proposed by Dzhengo.
You can use parameter annotations for some of the parameters which can be filled implicitly by ABAP environmental values. Annotations can be specified by keyword @Environment.systemField
before or after the parameter and should be followeed by env field after the colon. Here is the list of possible environmental fields:
#CLIENT:
sy-mandt
#SYSTEM_DATE:
sy-datum
#SYSTEM_TIME:
sy-uzeit
#SYSTEM_LANGUAGE:
sy-langu
#USER:
sy-uname
Sample code for defining the view:
@AbapCatalog.sqlViewName: 'ZVW_MARA'
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view zvw_mara
with parameters
p_matnr : matnr,
@Environment.systemField : #SYSTEM_DATE
p_datum : syst_datum,
p_uname : syst_uname @<Environment.systemField : #USER
as select from
mara
{
key mara.matnr,
mara.ernam,
mara.ersda
}
where
matnr = :p_matnr
and ernam = :p_uname
and ersda = :p_datum;