07-12-2018 1:29 PM
hi,
we need to concatenate 3 elements with dynamic space.
for example:
concatenate element with 3 digit and after it we need 5 spaces or
element with 4 digit and after it we need 4 spaces.
we need to calculate the spaces and put it in the concatenate_with_space function as the third argument.
thank you,
Omer
07-12-2018 2:59 PM
From your question I understand that you want the elements to start at a specific spot in your end variable.
Why don't you just use the offset and length part of string manipulation to get your result without looking at concatenate?
07-13-2018 4:50 AM
So how do you calculate the space...The easiest way i think is instead of concatenate space, you replace it with some kind of special character, after concatenate you can replace those character with space.
07-13-2018 4:54 AM
If you need to create elements with fixed size, you can find there runtime length using strlen( ). Then subtract the number of length from the size and get the number of spaces. Then run a do loop and concatenate that many spaces in the element.
07-13-2018 7:06 AM
Your question does not make it clear enough that you talk about ABAP CDS. Everybody gives you ABAP Language answers, but there, it is trivial.
07-15-2018 1:07 PM
07-16-2018 10:27 AM
hi,
i need to do it in CDS View , any suggestion to do it?
thanks,
Omer