2007 Oct 03 11:19 PM
Dear all,
I try to get 4 leftmost characters from a variable. Is there any function(such as leftmost(4, a)) in ABAP?
Thanks in advance
2007 Oct 04 6:02 AM
Hi,
If your variable is not a character field then you need to pass the value to char field.
After that use the logic given above.
2007 Oct 03 11:40 PM
Yo ucan use this simple command
VAR1 = VAR2+0(4).
Where VAR1 is assigned first 4 characters of VAR2.
2007 Oct 04 6:02 AM
Hi,
If your variable is not a character field then you need to pass the value to char field.
After that use the logic given above.
2007 Oct 04 6:19 AM
Hi ..
We can directly Access the Leftmost 4 chars using:
DATA : VAR(10) VALUE 'ABCDEFGHIJ'.
WRITE:/ VAR(4).
<b>reward if Helpful.</b>
2007 Oct 04 6:31 AM
hi
try this.
data: v1 type bseg-belnr.
data: v2(4) type c.
v2 = v1(4).
2007 Oct 04 9:15 AM
2007 Oct 04 9:15 AM
2007 Oct 04 9:15 AM
2007 Oct 04 9:15 AM
2007 Oct 04 9:15 AM