cancel
Showing results for 
Search instead for 
Did you mean: 

How to do remov e Spaces in the output

Former Member
0 Kudos

Dear Friends,

I have developed a smartform as per requirement i require data as below

Loan type Loan Amount

102 200

103 3000

104 400

In some scenarios i will be having data where for some employees will not be using one the above loan types , for ex he is not awailing the loan type 103 , then i expected the output as only for 102 & 104

102 200

104 400

but iam getting the output as

102 200

104 400

i.e there is gap arising due ..........this because in my smartform iam having the table section

under table > Main area> Text (loan_text) . Int the loan_text have given as

&wa_final-lonatype& &wa_final-loanamt&

&wa_final-loantype1& &wa_final-loanamt1&

&wa_final-loantype2& &wa_final-loanamt2&

by which if iam not having any data coming from & wa_final-loantype1& wa_final-loanamt1&

i will be getting blank spaces................

please could any one let me know how to remove the spaces and get data as

102 200

104 400

please help me.

regards

srinivas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Loop through n times, here it's 3 times and if the loan type is not blank then pass this value to some field, say, w_lonatype w_loanamt and display this field in text.

or if u don't want to loop, then put 3 (in this case) text element and give

&wa_final-lonatype& &wa_final-loanamt& in text 1

&wa_final-loantype1& &wa_final-loanamt1& in text 2

&wa_final-loantype2& &wa_final-loanamt2& in text 3

and in the condition tab display only if these fields are not blank, like wa_final-lonatype <> blank for text 1, wa_final-loantype1 <> blank for text 2, etc...

Best Regards.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

if &wa_final-lonatype& ne space.

&wa_final-lonatype& &wa_final-loanamt&

endif.

if &wa_final-lonatype1& ne space.

&wa_final-loantype1& &wa_final-loanamt1&

endif.

if &wa_final-lonatype2& ne space.

&wa_final-loantype2& &wa_final-loanamt2&

endif.

Former Member
0 Kudos

Hi Srikanth

could you please letme know where i have to write the code to check if not equal to space

if &wa_final-lonatype& ne space.

&wa_final-lonatype& &wa_final-loanamt&

endif.

if &wa_final-lonatype1& ne space.

&wa_final-loantype1& &wa_final-loanamt1&

endif.

if &wa_final-lonatype2& ne space.

&wa_final-loantype2& &wa_final-loanamt2&

endif.

i have tried wriiting int he text area itself where iam previously writtten

it is printiint exactly the code as below on smartform output.

if &wa_final-lonatype& ne space.

&wa_final-lonatype& &wa_final-loanamt&

endif.

if &wa_final-lonatype1& ne space.

&wa_final-loantype1& &wa_final-loanamt1&

endif.

if &wa_final-lonatype2& ne space.

&wa_final-loantype2& &wa_final-loanamt2&

endif.

could please suggest me where i have to write.

regards

srinivas.

Former Member
0 Kudos

are u using a template if yes then template takes fixed space so use a table then the blank will not take extra space . put a condition that, that particular type is not initial. if it is initaila then it will skip that text element and empty line will not appear