2012 Dec 18 7:51 AM
Hi Forum,
When using FM TEXT_SYMBOL_SETVALUE for replacimg variable in SO10 text.
Data declaration in FM:
data: nam like tline-tdline,
val(c_ts_maxval),
val_length like integer,
field_type.
In the above code c_ts_maxval is always 80 hence the string is truncated after 80 chars.
I tried passing different lengths in importing param VALUE_LENGTH to the FM but still the string is truncated after 80 chars.
Has anyone faced this issue, is there a note for this?
Thank you,
Anubhav
2012 Dec 18 8:03 AM
Check with FM documentation, in which 80 character restriction is thr in FM itself you cant increase it :
Hi Forum,
When using FM TEXT_SYMBOL_SETVALUE for replacimg variable in SO10 text.
Data declaration in FM:
data: nam like tline-tdline,
val(c_ts_maxval),
val_length like integer,
field_type.
In the above code c_ts_maxval is always 80 hence the string is truncated after 80 chars.
I tried passing different lengths in importing param VALUE_LENGTH to the FM but still the string is truncated after 80 chars.
Has anyone faced this issue, is there a note for this?
Thank you,
Anubhav
2012 Dec 18 8:03 AM
Check with FM documentation, in which 80 character restriction is thr in FM itself you cant increase it :
2012 Dec 20 6:54 AM
Just for info, I am handling long strings with below code...
DATA:
lv_chat(80),
lv_strlen TYPE i,
lv_rem TYPE p DECIMALS 1,
lv_loop TYPE i,
lv_remaining TYPE i.
DATA lv_param(12).
DATA lv_index.
DATA lv_completed TYPE i.
DATA lv_offset_s TYPE i.
lv_strlen = strlen( ls_chat-message ).
lv_rem = lv_strlen / 80.
lv_loop = ceil( lv_rem ).
lv_completed = 80 * ( lv_loop - 1 ).
lv_remaining = lv_strlen - lv_completed.
DO lv_loop TIMES.
lv_index = sy-index.
lv_offset_s = 80 * ( lv_index - 1 ).
CONCATENATE `QUES_TEXT` lv_index INTO lv_param.
IF sy-index = lv_loop.
lv_chat = ls_chat-message+lv_completed(lv_remaining).
ELSEIF sy-tabix LT lv_loop.
lv_chat = ls_chat-message+lv_offset_s(80).
ENDIF.
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
name = lv_param
value = lv_chat
replace_symbols = 'X'.
ENDDO.
in SO10 text I have used 4 place holders like QUES_TEXT1, QUES_TEXT2 and so on since in my case text can not be longer 300 chars i.e less then apprx 80*4 = 320 chars hence 4 place holders. In above code I determine the string length and based on the calculations replace the place holders.
Thanks
Anubhav
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |