‎2007 Jul 13 2:56 PM
Hi Experts,
Bcoz of some reasons, I am moving the Discount amount(actually, its DEC fromat) into a CHAR variable.
If the DIscount value is 00.000, the 00.000 r printing. But, I dont wanna to print if its 00.000.
So, I tried like,
<i><b>if wa_bsad-zbd1p is initial.
move space to wa_bsad-zbd1p.
endif.</b></i>
but, not working!!!
How to get it done? I mean, if the discount is 00.000 value, nothing shuld print!
thanq.
‎2007 Jul 13 3:30 PM
Is wa_bsad-zbd1p is character type ??
If yes..
then original packed type variable should be used for check condition...
If pack variable is initial..
then move to char type variable..
endif..
and if wa_bsad-zbd1p is packed type..
then
If pack variable is initial..
then move to pack type variable..
endif..
space will automatically be converted to 00.000..
so it wont work..
U can do it in first manner..
Hope it will help..
Reward if useful..
Regards
Prax..
‎2007 Jul 13 3:03 PM
data: v_zbd1p(10) type p decimals 3.
v_zbd1p = wa_bsad-zbd1p.
if v_zbd1p is initial.
move space to wa_bsad-zbd1p.
endif.
REgards,
Ravi
‎2007 Jul 13 3:26 PM
For C type field '00.000' is not a initial value.
So the condition:
if wa_bsad-zbd1p is initial. <-----this will fail for ''00.000'
endif.
Solution:
if wa_bsad-zbd1p eq ''00.000'.
*no print.
endif.
‎2007 Jul 13 3:30 PM
Is wa_bsad-zbd1p is character type ??
If yes..
then original packed type variable should be used for check condition...
If pack variable is initial..
then move to char type variable..
endif..
and if wa_bsad-zbd1p is packed type..
then
If pack variable is initial..
then move to pack type variable..
endif..
space will automatically be converted to 00.000..
so it wont work..
U can do it in first manner..
Hope it will help..
Reward if useful..
Regards
Prax..