‎2008 Nov 10 4:06 PM
Hi
I need trunc 4 places of mlgt-lgpla. My LGPLA have 6 CHARACTERs but i need separate first two into a variable and delete the others.
I try with SPLIT, but doesn't work.
Can somebody help me ?
Thanks.
‎2008 Nov 10 4:12 PM
Hello Ricardo,
See if this helps:
v_2char = v_lgpla+0(2).
v_lgpla being you variable containing the value of mlgt-lgpla.
The +0 applies to the position in the field. So at position zero;
the (2) applies to how many spaces to grab.
So we now have v_2char containing the 2 spaces after position 0 of v_lgpla.
Hope this helps.
Regards,
C
‎2008 Nov 10 4:09 PM
‎2008 Nov 10 4:11 PM
‎2008 Nov 10 4:12 PM
Hello Ricardo,
See if this helps:
v_2char = v_lgpla+0(2).
v_lgpla being you variable containing the value of mlgt-lgpla.
The +0 applies to the position in the field. So at position zero;
the (2) applies to how many spaces to grab.
So we now have v_2char containing the 2 spaces after position 0 of v_lgpla.
Hope this helps.
Regards,
C
‎2008 Nov 10 4:30 PM
REPORT zj_test.
DATA: string(6) TYPE c VALUE 'ABCDEF',
lv_string TYPE string.
DATA:lv_len TYPE i, count TYPE i VALUE '2'.
lv_len = STRLEN( string ).
lv_len = lv_len - count.
DO lv_len TIMES.
string+count(1) = space.
count = count + sy-tabix.
ENDDO.
WRITE:/ string.