Application Development 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: 

Assign blank space to numeric variable

former_member203806
Participant
0 Kudos
1,965

Hi

val1 type numc.

In the invoice programe, we are showing the free issue qty.

free issue qty is assign to the val1.

if val1 = 0

i need to print blank value in the smartform .

so i need to assign blank space to the val1 (type numc).

for the blank purpose i m using below code.

currently val1 type string.

CONCATENATE '' '' INTO val1 RESPECTING BLANKS.

rgds

pramod

8 REPLIES 8

Former Member
0 Kudos
392

Hi,

you can use string type of variable in smartforms then u can pass numc values is not initial means

else u can clear that string type variable and pass it it will come like blank.

Hope this helps,

Srini.

atanu_mukherjee
Explorer
0 Kudos
392

Hi,

There are 2 ways viz:

1. Define another variable val2 with type char. Put a check if val1 = 0 then pass the value of val1 into val2.

2. In smartforms I hope you are displaying free issue qty by a text element. Double click on the text element. Go to 'Conditions' tab and put a check If val1 NE 0 or val1 NE INITIAL.

This means free issue qty will be displayed as a blank space if val1 having 0 value and free issue qty will have some value if val1 is not equal to 0.

If you are using smartforms you can go for option 2. Hope this clarifies.

BR,

Atanu

Edited by: Atanu Mukherjee on Jul 28, 2011 11:45 AM

0 Kudos
392

Hi

i m using the same text for item qty and free issue qty.....

rgds

pramod

0 Kudos
392

Hi,

If you use the condition check effect will be same for both the quantities. If val1 is having 0 values then for the both the quantities space will be printed. Can you be a bit more specific about the problem you are facing?

BR,

Atanu

0 Kudos
392

Hi,

How you create a line type in your smartforms whether the item qty and free issue

qty is same column or different column?

make the line type as different column tats good for the above logic.

Regards,

Dhina..

0 Kudos
392

Hi

Both feilds , im using in same coloumn.

pramod

0 Kudos
392

Hi,

you need to display the both field in all the item?

if Yes means do the follow the steps:

1) add one more cell in your line type make both qty should be in different cell

2) create a text element for free issue qty and put the above condition.

if No Means :

how you restrict to print either free issue qty value or item qty value?

Regards,

Dhina..

Former Member
0 Kudos
392

Hi,

no need to convert numeric format to string .

do the following steps:

1)Double click on the text element.

2) Go to 'Conditions' tab and put condition like val1 NE 0

if you give the condition val1 contains 0 means it wont display otherwise it will display the value.

Regards,

Dhina.

Edited by: Dhina DMD on Jul 28, 2011 11:46 AM