on 01-20-2009 12:08 PM
Dear all,
How to prevent a text in script from displaying if its value is zero
for eg Price = 0.00
if price is 0 it should'nt appear in output.
I tried with if price ne 0.
price = &price&
endif.
but it's not working.
Regards
Raj
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jan 20, 2009 8:59 AM
you can define one char filed and pass the value.
/: DEFINE lv_char type char13.
lv_char = price.
&lv_char&
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Nagaraju,
What you were doing is partially right.
The correct format to write in the script is as follows :
/: if &PRICE& ne 0.
&PRICE&
/: endif.
This should work. Let me know how it goes.
Nayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
data lv_qty type vbap-zmeng.
data char_qty(10).
lv_qty = '10.000'.
Move lv_qty TO char_qty.
Replace '.000' IN char_qty WITH ''.
CONDENSE char_qty.
write / char_qty. " output 10
lv_qty = '10.100'.
Move lv_qty TO char_qty.
Replace '.000' IN char_qty WITH ''.
CONDENSE char_qty.
write / char_qty. " output 10.100
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
[suppressing output of initial values|http://help.sap.com/erp2005_ehp_04/helpdata/EN/d1/8034ba454211d189710000e8322d00/content.htm]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.