2020 Dec 18 3:05 PM
Hi team,
I am playing with CDS view and I am not really confortable on this.
So I try to create simple CDS view, and link these CDS with more complex CDS.
On several CDS, I have language column : SPRAS / LANGU ... so I try to put a session variable to filter the entries for only one language (the session language).
And it does not work, it is really strange. For a table I have 62 entries instead of 1212 for a second table I have 1120 entries instead of 1124
my code is really simple
@AbapCatalog.sqlViewName: 'ZIPMSTATUTLIB02'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'PM - Statut - xx'
define view ZI_PM_STATUT_USER_LIB as select from tj30t as Lib_Statut
{
key Lib_Statut.stsma as Schema_Statut,
key Lib_Statut.estat as Code_Statut,
Lib_Statut.txt04 as Libelle_court,
Lib_Statut.txt30 as Libelle_long
}
where spras = $session.system_language
I have tried to replace language with fixe value, and it works perfectly
Thanks for help
Fred
Hi team,
I am playing with CDS view and I am not really confortable on this.
So I try to create simple CDS view, and link these CDS with more complex CDS.
On several CDS, I have language column : SPRAS / LANGU ... so I try to put a session variable to filter the entries for only one language (the session language).
And it does not work, it is really strange. For a table I have 62 entries instead of 1212 for a second table I have 1120 entries instead of 1124
my code is really simple
@AbapCatalog.sqlViewName: 'ZIPMSTATUTLIB02'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'PM - Statut - xx'
define view ZI_PM_STATUT_USER_LIB as select from tj30t as Lib_Statut
{
key Lib_Statut.stsma as Schema_Statut,
key Lib_Statut.estat as Code_Statut,
Lib_Statut.txt04 as Libelle_court,
Lib_Statut.txt30 as Libelle_long
}
where spras = $session.system_language
I have tried to replace language with fixe value, and it works perfectly
Thanks for help
Fred
2020 Dec 19 6:47 AM
Hi ,
In sap gui default language is English 'EN'.
@AbapCatalog.sqlViewName: 'zcdslang'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Scn'
define view zcds_scn as select from tj30t {
stsma as Stsma,
estat as Estat,
spras as Spras,
txt04 as Txt04,
txt30 as Txt30,
ltext as Ltext
} where spras = $session.system_language
it will fetch corresponding Spras-EN filed only or Use Parameter.
2020 Dec 19 9:26 AM
Hi,
to fetch data for spras either you can use session variable or parameter.

You can fetch data for field spras = $session.system_language.
here number of entries that meet selection criteria is 288.

it will show 100 rows (partial output) but if u want to see all the records in output top right corner max row is there select how many rows you want and refresh it will display all the output as shown in below image

| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |