2006 Oct 12 6:42 AM
Hi,
I need to pass space if the field value is '0'. I have field which returns '00000000' in the output. For this i need to pass space. I tried many ways to pass space to this field. But its displaying as '00000000' only. How to pass space to this field. In database the field value is displayed as 0.
Regards,
Ram
Hi,
I need to pass space if the field value is '0'. I have field which returns '00000000' in the output. For this i need to pass space. I tried many ways to pass space to this field. But its displaying as '00000000' only. How to pass space to this field. In database the field value is displayed as 0.
Regards,
Ram
2006 Oct 12 6:48 AM
hi ram,
suppose char1 = '000001'.
do this.
REPLACE all occurances of '0' in char1 WITH space INTO char2.
char2 ='1'.
rgds
anver
if helped pls mark points
Message was edited by: Anversha s
2006 Oct 12 6:54 AM
2006 Oct 12 6:55 AM
in case of ALV,
fcat-no_zero = 'X'.
in case of normal report
write: repid no-zero.
regards
Prabhu
2006 Oct 12 6:56 AM
Hi Ram,
You can also use 'CONVERSION_EXIT_ALPHA_OUTPUT'...suppose the input is '0001' then the output will be '1'.
Thanks...
Preetham S
2006 Oct 12 6:58 AM
Please try if it works this way...
<b>replace all occurrences of '0' in <fld> with ' '.</b>
Kind Regards
Eswar
2006 Oct 12 7:00 AM
Hi,
Here is the sample code.Try this,it will output space.
data c1(10) value '00000'.
pack c1 to c1.
replace '0' with space into c1.
write c1.
2006 Oct 12 7:08 AM
Donot use replace,because when ever the value is '00100' the o/p will be 1.
Instead use this syntax
SHIFT value LEFT DELETING LEADING '0'.
Regards,
Dharani.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |