on 2022 Mar 07 11:38 AM
Hello Guys,
I have a question about the use of parameters in my CDS Code.
For example I'm want to search via parameter a specific material.
In our DB all material have leading zeros.
But I want to enter the materialnummer without the leading zero.
Down you can see my code, hava you idea/tip how I can solve this problem?
Regads
Hassin
@AbapCatalog.sqlViewName: 'ZCS_MARA_PARA'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'VDS View with Parameter'
define view ZCS_MARA_Test1_PARA
with parameters p_matnr : matnr, p_ernam : ernam
as select from ZCP_MARAView_Test1
{
//ZCP_MARAView_Test1
ltrim(matnr,'0') as Materialnummer,
ersda as Angelegt_Am,
ernam as Angelegt_Von,
laeda as Geaedert_Am,
aenam as Geaendert_Von
}
where matnr = :p_matnr
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
To solve this issue you have to use "ltrim(matnr,'0') as Matnr_Test" one view before.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.