2015 Dec 01 6:28 AM
Hi, I am creating a CDS view. I am concatenating two fields from a table "LFA1"
The fields are:
lifnr(supplier id)[TYPE: CHAR : LENGTH:10]
&
name1(supplier name)[TYPE: CHAR : LENGTH:35]
So when I concatenate like:
Concat(Concat(Concat(Vendor.name1 , '('),Vendor.lifnr),')') as MySupplier
I get something like:
Geller(0000100791)
These "0000" are appended. I guess its done to match length of lifnr .
But I don't want it to display like this. I want it to appear as-
Geller(100791)
Is there any workaround?
Thanks.
2015 Dec 01 10:12 AM
Hi,
is the function LTRIM available in your system ?
LTRIM( Vendor.lifnr, '0' ) is what you are looking for.
Regards, Christian
Hi, I am creating a CDS view. I am concatenating two fields from a table "LFA1"
The fields are:
lifnr(supplier id)[TYPE: CHAR : LENGTH:10]
&
name1(supplier name)[TYPE: CHAR : LENGTH:35]
So when I concatenate like:
Concat(Concat(Concat(Vendor.name1 , '('),Vendor.lifnr),')') as MySupplier
I get something like:
Geller(0000100791)
These "0000" are appended. I guess its done to match length of lifnr .
But I don't want it to display like this. I want it to appear as-
Geller(100791)
Is there any workaround?
Thanks.
2015 Dec 01 10:12 AM
Hi,
is the function LTRIM available in your system ?
LTRIM( Vendor.lifnr, '0' ) is what you are looking for.
Regards, Christian
2015 Dec 01 10:36 AM
Additional Info:
The string function LTRIM is available as of AS ABAP 7.5:
http://help.sap.com/abapdocu_750/en/index.htm?file=abennews-750-abap_cds.htm --> Expressions and Functions
2015 Dec 01 1:36 PM
2015 Dec 01 1:42 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |