cancel
Showing results for 
Search instead for 
Did you mean: 

address in smartform

Former Member
0 Kudos

Hi

I am printing Customer address from kna1 table through smartforms.

I created the Text elements in address window and printing like &KNA1-NAME1&...like that.If there is no value for NAME2 it is giving space on the form.

How to remove the space while displaying address?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi anu,

you can put the name2 in the other text element and place these two element in a template. now you can put a condition that if the field is empty then do not display the text element.

award points if helpful

gopi_narendra
Active Contributor
0 Kudos

Display the name only if it is having some value.

if not kna1-name2 is initial.
<Display the name>
endif.

Regards

Gopi

Former Member
0 Kudos

I can't put if statement there.Because I am prinitng these in Text elements.

Former Member
0 Kudos

I am not sure about your requirement,address will come to the work area or varaible

so you can write simple if condition in smartform,i have done many times

/E ADDRESS

P1 &KNA1-NAME1&

/: IF &KNA1-NAME2& NE ' ' -> CONDITION

P1 &KNA1-NAME2&

/: ENDIF

P1 &KNA1-LAND1&

Try as above you should get

Thanks

Seshu

former_member196280
Active Contributor
0 Kudos

np, even if you print in text elements.. use this it will still work..

if <b>&kna1-name2&</b> NE ' '. " note kna1-name2 be inserted using insert field

<Display the name>

endif.

Regards,

SaiRam

Former Member
0 Kudos

Hi Anu,

u can put condition on that TEXT by writing &kna1-name2& NE space.

hope this may work...

or else u can use an ALTERNATIVE node....

please reward incase usefull...

Regards,

Prashant