‎2007 Jun 12 11:22 AM
hallow
i have field type numc20 and i wont to delete all zero before num
how can i do that
example
i have
000000000317
i wont 317
REGARDS
‎2007 Jun 12 11:25 AM
‎2007 Jun 12 11:25 AM
‎2007 Jun 12 11:27 AM
Hi Shnya ,
Use the shift command.
Here is a sample code for the same
data : test(20) type n.
test = '000000000317'.
write / test.
shift test left deleting leading '0'..
write / test.Hope this helps
Regards
Arun
‎2007 Jun 12 11:28 AM
Hi,
You can use Condense number.
this will truncate the leading zeroes.
truncate numc.
Regards
Shiva
‎2007 Jun 12 11:29 AM
hi,
CONVERSION_EXIT_ALPHA_OUTPUT is the Fm used for giving desired o/p and takes a input from user
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = int [int is avaraible of type num20
IMPORTING
OUTPUT = k. [ resultant value by FM]
if useful reward some points.
with regards,
suresh.
‎2007 Jun 12 11:29 AM
hi,
data : v_matnr(40) type c,
v_mat type matnr.
v_mat = '00000123456789'.
pack v_mat to v_matnr.
write v_matnr.Rgds
Anversha
‎2007 Jun 12 11:30 AM
you can try this also..
REPORT ychatest MESSAGE-ID zz..
DATA : v_char(20) VALUE '000000000317'.
TRANSLATE v_char USING '0 '.
CONDENSE v_char NO-GAPS.
WRITE : v_char.
‎2007 Jun 12 11:31 AM
also check this
DATA : v_char(20) VALUE '000000000317'.
WRITE : v_char TO v_char NO-ZERO.
condense v_char no-gaps.
WRITE : v_char.
‎2007 Jun 12 11:36 AM
This is not the better way, but is quick !!
PACK field INTO field.
‎2007 Jun 12 11:44 AM
hi,
<b>u follow this logic..</b>
WRITE: '000123',
/ '000123' NO-ZERO.
u can get output like this..
000123
123
regards,
Ashokreddy.