2014 Apr 28 11:31 AM
Dear Experts,
The value of gs_sans1_ort02 may contain nothing. In that case, it is showing blank space. Can that be removed? Is there any solution except for using conditions tab?
Regards
Mani
2014 Apr 28 11:35 AM
and why not using the conditions tab? I suppose this is a smartform. Imagine you would want the space there if the field is empty. So just use the conditions tab
2014 Apr 28 11:39 AM
Hi,
Thanks for the reply. There would not be any requirement for putting blank space when district(ort01) is blank.
There are already 4 conditions maintained. For this, I need to make 4 more which is tedious. Is there any other solution?
Regards
Mani
2014 Apr 28 11:51 AM
No.
You place a "mergefield" at a place, where a text should be outputted. If you do not want it to be outputted, first check whether there really is nothing passed to the smartforms FM (CONDENSE string NO-GAPS). If this is not satisfactory, use the condition.
2014 Apr 28 12:52 PM
2014 Apr 28 1:23 PM
Hi,
This option is provided in SAP SCRIPT but it is not provided in SMARTFORMs 😮
Thanks
2014 Apr 28 1:45 PM
Hi Mani,
you can split your text in three text element like 1st text element carrying value till OTRT01 and 2nd text element only use for ORT02 and put condition in this text element.
and after that you can use third text element for Country, postal code and mobile number field.
Please try this solution .
Thanks,
Prasenjit
2014 Apr 28 2:07 PM
Then maybe you want to implement your output in a table style and send those rows as plain texts in a table.
2014 Apr 28 1:05 PM
Hi Mani,
Please try to use address window in your smartform and pass address number in the layout then this problem will be resolved.
Thanks,
Prasenjit
2014 Apr 28 2:59 PM
Hi,
If this is text element then why dont to try using IF --------- ENDIF statements?
Have you tried it?
Because similar requirement I did in SAP script and I believe the commands IF and ENDIF also works in smartforms.
Regards,
Aswath.
2014 Apr 28 10:40 PM
Hi,
&gs_sans1-ort02(I)& will not output initial value.
Forget it, I misunderstood - it will not remove the line
cheers
Janis
Message was edited by: Jānis B
2014 Apr 29 1:10 PM
Hi Mani,
You can use graphical editor. There is a button to switch to it on the left hand corner of the editor. You can open it in graphical editor and put an IF-ENDIF condition for checking if OTR02 is blank or not. Same as SAP Script, you can display this variable on condition basis.
Thanks,
Anubhab
2019 Jul 02 2:27 PM
I am assuming you would like to omit blank lines when there is no value in the variable while using a text element in SmartForm.
So for each line of address I use a different text-element. I am not sure if this is a best way or worst way, but this is helpful. And for each line of text element, in the condition tab, I would check if the variable contains any value?
Lastly, in General Attributes, setting the start value to "New Line" worked for me.

| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |