2008 Mar 25 3:15 PM
I am trying to append data from Work area to another internal table.
- System is appending only values.
- But not appending ZEROS where the value is 0-zero.
While displaying in output (report), system Displaying as space instead of zeros. My requirement is to display 0 instead of spaces where ever the value is zero.
Please help - how to write code.
Thanking You.,
Sanju
2008 Mar 25 3:18 PM
Hi,
Null and Zeros wont get appended in internal table
only in currency and quantity fields zeros will appear....
Regards,
V.Balaji
Reward if usefull
How have you declared that fields?
2008 Mar 25 3:17 PM
2008 Mar 25 3:17 PM
hi,
declare the variable as type N to append the leading zeros
i.e, data : v_num(10) type N.
v_num = '010'.
write : v_num.
2008 Mar 25 3:18 PM
Hi,
Null and Zeros wont get appended in internal table
only in currency and quantity fields zeros will appear....
Regards,
V.Balaji
Reward if usefull
2008 Mar 25 3:34 PM
Hi BALAJI / all consultants,
Thanks for your response.
I am trying to display the qty field (VBRK-FKIMG).
If the qty = '0', the same is appending to it_output2.
Finally, out put showing as space.
"append wa_it_output1 to it_output2".
Pls advise.,
SANJU
2008 Mar 25 3:42 PM
Hi,
do this way...
v_quant like ekpo-netpr.
data: begin of it_output2 occurs 0,
.........
qty(17),
......
end of it_output2.
v_quant = '0'.
write v_quant to it_output2-qty.
append it_output2.
loop at it_output2.
write it_output2-qty.
endloop.
2008 Mar 25 3:19 PM
Hi,
You can do as below:
loop at itab.
if itab-fieldname = ''.
move : '0' to itab-fieldname.
modify itab.
clear itab.
endif.
endloop.
Thanks,
Sriram Ponna.
2008 Mar 25 3:20 PM
I think your internal table has fields of character type ...
check for the values in the internal table ...
if itab-f1 is initial.
write 0's ...
endif.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |