on 05-03-2010 12:27 PM
Dear all,
im displaying free item texts and header texts in my script.i have taken a variable g_fim(1000) of type c,and passing the free text from READ_TEXT FM to this variable G_FIM. and iam able to display.
But my concern is i want to display it line by line,i mean the user enters the text in four lines,but im getting it displayed in a single line. i want the text to b displayed as the user enters.
Hello,
While concatenating from READ_TEXT -> LINES, just check the field LINES-TDFORMAT.
If it is NOT INITIAL concatenate a newline ( CL_ABAP_CHAR_UTILITIES=>NEWLINE ) in G_FIM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply,
i am unable to display the free text as the user enters............the text gets displayed horizontally...not as the way user enters.
i have used the include statement,but this doesn t work becoz i have two line items and for each line item how do i display.
i have used like this.
INCLUDE &L_TEXT& OBJECT 'VBBP' ID 'ZH01' LANGUAGE 'EN'.
here l_text is a concatenation of billing document + line item.
hi,
Use include statement in SapScript - INCLUDE 'Z_TEST' OBJECT 'TEXT' ID 'ST' PARAGRAPH A4 LANGUAGE wa_spras
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are probably several ways to accomplish, but I recently utilized the following to break up a string of unknown length (I imposed a max length of 65,535 characters, as you can see in the code).
types: begin of gtyp_txt,
line(132),
end of gtyp_txt.
. . .
lv_text_length = 76. "type I this is the length utilized in SAP editor in the screen
perform text_word_break using lv_longtext "string field
lv_text_length.
. . .
form text_word_break using in_string type string
out_len type i.
data: lt_text_tab type table of gtyp_txt,
lv_len type i,
lv_copy(65535) type c.
lv_len = strlen( in_string ).
if lv_len > 65535.
lv_copy = in_string(65535).
else.
lv_copy = in_string(lv_len).
endif.
call function 'RKD_WORD_WRAP'
exporting
textline = lv_copy
delimiter = space
outputlen = out_len
tables
out_lines = lt_text_tab
exceptions
others = 0.
if lines( lt_text_tab ) gt 0.
append lines of lt_text_tab to gt_text_tab.
endif.
endform.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.