2006 Mar 21 8:28 AM
Hi experts,
Iam working on smartforms and i have to display 6 field values.One of the fields having long text with 40 charecters.If longtext is not having any value,my data is getting misalligned.
So i want to pass some space into that field to avoid misalignment for the next few fields.
DATA: G_LENG(50) VALUE ' '.
IF WA_DET-LTEXT = SPACE.
WA_DET-LTEXT = G_LENG.
ENDIF.
Why this code is not working? Means,it is not taking it is as space.Still data is misaligning.
What i need to do?
Thanks
kaki
2006 Mar 21 8:44 AM
Hi Kaki,
It should work, I think you are missing somthing else. I tried with a sample code:
REPORT ztest .
DATA: G_LENG(50) VALUE ' '.
write : 'test', g_leng, 'done'.
Regards,
Anjali
Hi experts,
Iam working on smartforms and i have to display 6 field values.One of the fields having long text with 40 charecters.If longtext is not having any value,my data is getting misalligned.
So i want to pass some space into that field to avoid misalignment for the next few fields.
DATA: G_LENG(50) VALUE ' '.
IF WA_DET-LTEXT = SPACE.
WA_DET-LTEXT = G_LENG.
ENDIF.
Why this code is not working? Means,it is not taking it is as space.Still data is misaligning.
What i need to do?
Thanks
kaki
2006 Mar 21 8:34 AM
create template and assing the variables ...
I think this may work?
2006 Mar 21 8:36 AM
Hi Kaki
Your code'll do nothing.
You're saying: if no value is in my variable, so my variable is equal no value... it's strange, isn't it?
If you want to be sure of allignement why don't you use a TEMPLATE?
Max
2006 Mar 21 8:38 AM
Hi kaki,
1. for such ALIGNMENT PROBLEMS,
2. the best thing is to
use TAB Concept (just like sapscript)
3. I don't know about smartforms,
but some concept must be there.
4. This alignment will also cause problem,
even when the string is there,
but IN CAPITAL letter,
bcos
CAPITAL character takes more space,
as compared to lower case,
and a SPACE takes even less width.
5. However, if the font is COURIER,
then it will have fixed width of ANY CHARACTER,
whether space, lowercase, or capital !!!
regards,
amit m.
2006 Mar 21 8:44 AM
Hi Kaki,
It should work, I think you are missing somthing else. I tried with a sample code:
REPORT ztest .
DATA: G_LENG(50) VALUE ' '.
write : 'test', g_leng, 'done'.
Regards,
Anjali
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |