‎2007 Jul 08 8:19 AM
Hi everyone,
In so10, I wrote a simple text with tabulation.
Now I want to write that text using READ_TEXT function (or whatever works).
The READ_TEXT function returns a table with the text but instead of tabulations there are quotes.
How can I solve that problem ?
Thanks.
Regards.
‎2007 Jul 08 8:47 AM
Hi David,
Pl. send me the code you have written, I will try to reconstuct the scenario and will answer/
Darshan.
‎2007 Jul 08 8:47 AM
Hi David,
Pl. send me the code you have written, I will try to reconstuct the scenario and will answer/
Darshan.
‎2007 Jul 08 10:04 AM
Hi Patel,
Here is the code :
<code>
data: GT_LINES like LIKE tline OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'Z0Q3'
language = 'B'
name = '123456'
object = 'VBBK'
TABLES
lines = gt_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
</code>
In fact, the user goes to transaction va22, goes to the header and to TEXT.
He adds his own text (it's like so10).
This is why the object is VBBK because it's SD component.
Thanks.
Regards.
Message was edited by:
David Fryda
‎2007 Jul 09 4:31 PM
HI David,
Try this
Data: mystring type string.
LOOP AT gt_lines.
concatenate mystring gt_lines-tdline into mystring separated by space.
ENDLOOP.
‎2007 Jul 08 10:20 AM
where do you intend to use the text returned by READ_TEXT. in sapscript environment the two ,, for tab will be interpretted by the system properly as tab. you can check this by going to print preview from SO10.
if you intend to use this in some other environment you may need to convert all those doule ,, into proper ASCII format.
Raja
‎2007 Jul 08 10:23 AM
Hi,
I intend to use this in SMARTFORM.
But it does not format it correctly.
Is there a way to do it ?
Thanks.
Regards.
‎2007 Jul 08 10:54 AM
sorry havent worked in Smart forms for a long time.
can you try replacing the double ,, in your text with CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB and pass it to smart form?
Raja
‎2007 Jul 08 12:40 PM
‎2007 Jul 08 12:54 PM
Hi
Goto Smartforms tcode
Create a TEXT MODULE
and write all the text data what you have written in SO10 in that Text module
and call that text module in the respective window of the Smartform.
taht's all.
There is no need to use the READ_TEXT fun module if you have to use the text in smartforms.
Reward points for useful Answers
Regards
Anji
‎2007 Jul 08 1:02 PM
Hi,
I do have to use the READ_TEXT function because the text I want to display depends on the quotation number. In each quotation number, the user can insert a free text : this text is not created in so10 but with va21 (or va22).
So, depending on the quotation number I get a diferent text.
Thanks,
Regards.
‎2007 Jul 08 1:38 PM
Hi David,
SAPScript texts tabs are represented as ,, (two commas - to be seen in debugger or in classic sapscript editor). Every line has a TDFORMAT 2-character format column and a TDLINE 255 characters text line.
The trick is that the format used in TDFORMAT is defined for a paragraph of a layout set or style. In smatforms it's about the same. * in the format column means default format. In the default format, the standard TAB distance may be defined differently for SO10 text and smartform text.
As SAP is an integrated system you should be aware that thousands of developers rarely know what integration means
Regards,
Clemens