on 03-16-2008 7:56 AM
Hi,
I have the following problem with my Smartform:
I am looping from a table and into a structure (Loop function).
1 of those fields is 1000 characters long and will be filled usually at 500 characters inside.
However, when looping and outputting the field (text node) in the format &Tablename-Fieldname&, only up to 255 characters are output.
Why does this happen? How can I fix this? Are any symbols available in Smartforms, like they are in SAPscript?
Any possible solutions will help.
Please help this is very important and very urgent.
Best Regards,
John
Edited by: Alvaro Tejada Galindo on Mar 17, 2008 4:06 PM
May try this way
v_length = 255.
&v_ltext(v_length)&&v_ltext+255(v_length)&&v_ltext+510(v_length)&
a®
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The following worked:
v_length = 255.
&v_ltext(v_length)&&v_ltext255(v_length)&&v_ltext510(v_length)&
It worked, but I had to hardcode the 255 value, since V_length couldn't be used inside the symbol.
Now, the problem that I am having is that I have done this all the way up to "+3570". However, because of this, even with just the 1st one there ( &v_ltext(v_length)& ), there appears a space in between this text node and another one that follows (I can't merge them). How do I get rid of this unnecessary space?
Hi,
if you want to output a long string in a smartform putting it as &name& in a text will not help you. For printing such an information you use temp include texts you create an delete on the fly while processing the SF.
To Do so:
- define GV_SUFFIX type char2, GS_HEAD a structure with fields TDOBJECT type TDOBJECT, TDNAME type TDOBNAME, TDID type TDID, TDSPRAS type SPRAS
- define a code step importing the text, the language and the GV_SUFFIX, in the coding , you convert the string to itf and than use function module SAVE_TEXT to save the include text and put the information into GS_HEAD
- define an include text where you put out the newly created include text
- define a code step to delete the temporary text with function module DELETE_TEXT
Best Regards
Roman Weise
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
not yet answered fully
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
I had this problem earlier. This is happening because when you send a string to smartform with length >255 characters then it takes only first 255 characters. I overcomed this problem by splitting the string which was of around 500 char into two and then sending it to smartform as individual vairables and displaying the two variables one after the other in the smartform. Hope this helps.
Rgds,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suppose the field is mapped to a char field, maximum length is 255
CHAR: Character string. Fields of type CHAR may have a maximum length of only 255 in tables. If longer character fields are to be used in tables, you must choose data type LCHR. There are no restrictions on the length of such fields in structures.
You should try to split your LCHAR field in one to five fields of char 255 before sending them to print. (Look for function modules like G_SPLIT_LINE)
You may also explicitly define a field of length 1024 and move the LCHAR in it.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.