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

move statement.(adding space..)

Former Member
0 Likes
752

hi experts,

i have one problem with one field.

depending on first field ,second field should display some value.

ex:

if p_v_wagetext = ' '.

move space to it_display-bet03.

endif.

it is not working for me......

ex: IF v_wage = ' '.

CLEAR it_display-bet01.

ENDIF.

in the above two cases it is coming as 0.00(because it is cost /amount field).

instead of 0.00 i have to get space there.....or blank i need to get......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

The initial value for numeric fields is by default 0.00 (For two decimal fields).

You need to move the value to a chracter type varaible in order to have spaces instead of zeros.

Regards,

Ravi

5 REPLIES 5
Read only

Former Member
0 Likes
659

The initial value for numeric fields is by default 0.00 (For two decimal fields).

You need to move the value to a chracter type varaible in order to have spaces instead of zeros.

Regards,

Ravi

Read only

Former Member
0 Likes
658

You can't assing a blank space to a currency field....Default value is 0.00 Maybe you should use a TYPE C variable instead....

Greetings,

Blag.

Read only

Former Member
0 Likes
658

in my eyes not possible like you do it now.

the initial value of a numeric datatype is always 0, or 0.00.

Anyway i´d advise you to pull that value through a char variable.

data: lv_swap type char10.

if p_v_wagetext = ''

lv_swap = ''

endif.

Read only

0 Likes
658

if that value of yours in beeing printed on a Sap-Script form i´d had another idea for you.

normally it´s in your form like this: &it_display-bet01&

just change it to &it_display-bet01(I)&.

the (I) makes your script processor NOT to print the field if its value is initial.

Read only

0 Likes
658

what to do in smartforms, for not printing......