Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Formatting options.

Former Member
0 Likes
419

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
393

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..

3 REPLIES 3
Read only

Former Member
0 Likes
393

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

Read only

Former Member
0 Likes
393

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.

Read only

Former Member
0 Likes
394

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..