‎2008 Jul 29 1:54 PM
hi good evening to all off u .
i am facing one problem in text display . when i am retriving the text data
i am getting
00000 00000000000000 0000000000000000000000 0 450 MM WIDTH , LAST PURCHASE ORDER NO. PC06Y-00088.PREVIOUS INDENT NO. IP07Y-00883 DATED 26-02-08
i want to remove the leading zeros so i have use the code
REPLACE ALL OCCURRENCES of '0' in fs_readhead with ' ' .
condense fs_readhead .
after that i am getting
45 MM WIDTH , LAST PURCHASE ORDER NO. PC6Y-88.PREVIOUS INDENT NO. IP07Y-883 DATED 26-2-8
i just want to remove preceeding zeros
‎2008 Jul 29 1:57 PM
Hi,
Use SHIFT LEFT until no zero is remained statement.
Regards,
Rama.
‎2008 Jul 29 1:57 PM
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
use this FM
Regards
Anbu
‎2008 Jul 29 1:57 PM
Hi,
Use SHIFT LEFT until no zero is remained statement.
Regards,
Rama.
‎2008 Jul 29 2:05 PM
check this sample
data c(20) type c.
data zeroes(10) type C value '0000000000'.
c = '000000asdasdsa'.
shift C left deleting leading zeroes.
write c.also you can use the function conversion_Exit_alpha_output with the doc number, and the concatenate it with the rest of the message
‎2008 Jul 29 1:59 PM
hi,
Use the below statement
shift fs_readhead left deleting leading '0'.
‎2008 Jul 29 2:00 PM
‎2008 Jul 29 2:02 PM
hiii
use statement
SHIFT [string_name] LEFT DELETING LEADING '0'.
regards
twinkal
‎2008 Jul 29 2:02 PM
hi use this fm ..
BKK_DELETE_LEADING_ZERO
BKK_ACCNT_DELETE_LEADING_ZERO
‎2008 Jul 29 2:02 PM
Hi,
Try the following:
Shift fs_readhead left deleting leading '0'.
Regards,
Chandra Sekhar
‎2008 Jul 29 2:03 PM
Hi
Just use the condense statement... remove the replace statement..
regards
padma
‎2008 Jul 29 2:05 PM
Hi,
Here is the complete code:
data:
w_str type string value '000345',
w_flag type c value '0' ,
w_char.
while w_flag ne 1.
shift w_str left by 1 places.
w_char = w_str+0(1).
if w_char eq '0'.
w_flag = 0.
else.
w_flag = 1.
endif.
endwhile.
write:
/ W_str.
Regards,
Rama Chary.Pammi.