Diff b/n READ_TEXT & SO10.
Hi Friends,
I know that SO10 is used to create STANDARD TEXT.
Then what is the use of READ_TEXT function module.
wat is the exact use of it in real-time.
pl explain with an sample code.
The READ_TEXT function module allows you to programatically read any text into the program. You can then manipulate this text as needed.
This is really the only way for you to get the text programattically since the actual text is encrypted when stored in the database.
Regards,
Rich Heilman
Similar Messages
-
Using READ_TEXT to read SO10 (standard texts)
Hi,
When we use READ_TEXT F.M for SO10 texts what are the parameters to pass.
ID - ST
LANGUAGE - EN
NAME - Z_TEL (SO10 text id)
OBJECT - ?
What i should pass to OBJECT & what else i need to input!
Thanks in advance.
Thanks,
Deep.If u r reading text from Purchase Order text then Object ID will be EKKO.It depends what r u reading for.Look at the following code :
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F01'
LANGUAGE = 'E'
NAME = W_TDNAME
OBJECT = 'EKKO'
TABLES
LINES = IT_F01
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
Thanks & Regards,
Rock. -
What is the Purpose of Transaction So10, hw to use that, and what we do in that, and where we use that ?
Kindly let me know
Akshitha.for Read _text Fm like the below
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id =
language =
name =
object =
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines =
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Kindly let me know what are all the parameters we have to enter? what are they?
Akshtiha. -
HOW TO READ FILE AND HOW TO USE IT IN PATTERN EX. READ_TEXT
I WANT TO USE A PROGRAM'S CONTENT ND I WANT TO PASS AS PARAMETER IN A PATTERN..HOW TO DO THT.PLZZ REPLY...
EX. I HAV CREATED A STANDARD TEXT ZCREATE_TEXT AND I WANT TO SEND THIS AS A PARAMETER TO READ_TEXT...HOW TO DO THIS..Hi,
When you create a Std Text in SO10 and save, it is saved with 4 parameters
like TEXT NAME, LANGUAGE, TEXT OBJECT, TEXT ID. these are the four parameters by default will be created for any std text when you create a TEXT in SO10 or in any document.
You will know this 4 parameters from SO10 screen.
enter text, display.
from Menu -> GOTO -> HEADER, see them.
Next when you wants to fetch this text using READ_TEXT fun module
yopu have to pass this 4 parameters to that fun module.
see the doc
READ_TEXT
READ_TEXT provides a text for the application program in the specified work areas.
The function module reads the desired text from the text file, the text memory, or the archive. You must fully specify the text using OBJECT, NAME, ID, and LANGUAGE. An internal work area can hold only one text; therefore, generic specifications are not allowed with these options.
After successful reading, the system places header information and text lines into the work areas specified with HEADER and LINES.
If a reference text is used, SAPscript automatically processes the reference chain and provides the text lines found in the text at the end of the chain. If an error occurs, the system leaves the function module and triggers the exception REFERENCE_CHECK.
Function call:
CALL FUNCTION 'READ_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
ARCHIVE_HANDLE = 0
IMPORTING HEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
NOT_FOUND =
OBJECT =
REFERENCE_CHECK =
WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT
Specify the client under which the text is stored. If you omit this parameter, the system uses the current client as default.
Reference field: SY-MANDT
Default value: SY-MANDT
OBJECT
Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.
Reference field: THEAD-TDOBJECT
NAME
Enter the name of the text module. The name may be up to 70 characters long. Its internal structure depends on the text object used.
Reference field: THEAD-TDNAME
ID
Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.
Reference field: THEAD-TDID
LANGUAGE
Enter the language key of the text module. The system accepts only languages that are defined in table T002.
Reference field: THEAD-TDSPRAS
ARCHIVE_HANDLE
If you want to read the text from the archive, you must enter a handle here. The system uses it to access the archive. You can create the handle using the function module ACHIVE_OPEN_FOR_READ.
The value '0' indicates that you do not want to read the text from the archive.
Reference field: SY-TABIX
Default value: 0
Import parameters:
HEADER
If the system finds the desired text, it returns the text header in this parameter.
Structure: THEAD
Table parameters:
LINES
The table contains all text lines that belong to the text read.
Structure: TLINE
Exceptions:
ID
The text ID specified in the parameter ID does not exist in table TTXID. It must be defined there together with the object of the text module.
LANGUAGE
The parameter LANGUAGE contains a language key that does not exist in table T002.
NAME
The parameter NAME contains the name of a text module that does not correspond to the SAPscript conventions.
Possible errors:
The field contains only blanks.
The field contains the invalid characters * or ,.
OBJECT
The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.
NOT_FOUND
The system did not find the specified text module.
REFERENCE_CHECK
The text module to be read has no text lines of its own but refers to the lines of another text module. This reference chain can include several levels. For the current text, the chain is interrupted, that is, one of the text modules referred to in the chain no longer exists.
WRONG_ACCESS_ TO_ARCHIVE
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa).
reward points
regards,
ANJI -
Whats the use of read_text and save_text in sapscript
in the sap script we have standard texts so10 by using this we can use large texts then wats the use of those function modules.
how to change the standard sap script bu using subroutine.can any one give brief idea where to pass parameters in subroutine in program or else in form.hi sarath,
read_text and save_text
check this thread..
Re: Read_text and save_text
how to change the standard sap script bu using subroutine.can any one give brief idea where to pass parameters in subroutine in program or else in form.
: PERFORM MY_FORM IN PROGRAM ZPROGRAM
/: USING &VAR1&
/: USING &VAR2&
/: USING &VAR3&
/: USING &VARN&
/: CHANGING &VAR_OUT1&
/: CHANGING &VAR_OUTN&
in program zprogram.
FORM MY_FORM tables in_tab structure itcsy
out_tab structure itcsy.
data: varn like ....
read table in_tab with key name = 'VARN'.
if sy-subrc = 0.
move in_tab-value to varn.
endif.
read table out_tab with key name = 'VAR_OUTN'.
if sy-subrc = 0.
move <value> to ot_tab-value.
modify out_tab index sy-tabix.
endif.
ENDFORM.
http://help.sap.com/saphelp_erp2005/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
Message was edited by: Priya -
Using text elements in so10 standard texts
How to use text elements in so10 standard texts.
HI,
In DDIC we have two structures :
1. THEAD - Text Header
2. TLINE - Text Lines
SO10 is the tcode..for standard text...
We have a FM to read the text ... read_text...
and save_text is for create text..
this text is are used in SAP scripts...
the standard text is identified by three parameters :
1. Text Name
2. Text ID ( ST for standard text )
3. Language
hope helpfull
Raghunath.S -
How do we retrieve data from SO10 into smart form?
Hello Experts,
Could you pls help me out in extracting data from SO10 into smartform.And how do we create a check box in a smartform(The check box should be always checked).
Thanks and Regards,
ShilpaHi Shilpa,
You can create Check Box using a Table with 1 cell only with border.
To get data from SO10 - standard text use:
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = ws_id
language = ws_language
name = ws_name
object = ws_object
TABLES
lines = i_tline1
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
Reward points if this helps.
Manish
Message was edited by: Manish Kumar -
How to Read a program with HTML tags from SO10
Hi All,
I have a html program in Standard text (SO10).But when I am trying read the program content using FM: READ_TEXT, the html tags <b> </p> etc are creating problem.
They are retrieved as <(><<)>b>.
What should we do to get same/original text as in SO10? Is there any other FM for that? Any other way to achieve this?
Thanks & Regards,
Vimalan Ramhere is the code sample.
after reading the text using READ_TEXT you have to use CONVERT_ITF_TO_ASCII to convert the contents.
DATA: itf_tab TYPE STANDARD TABLE OF tline ,
wa_itf TYPE tline .
DATA: c_datatab TYPE tdtab_c132 .
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ST'
language = sy-langu
name = 'Y_RAJA_HTML'
object = 'TEXT'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER = HEADER
TABLES
lines = itf_tab
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
EXPORTING
* CODEPAGE = '0000'
* FORMATWIDTH = 72
language = sy-langu
tabletype = 'ASC'
* TAB_SUBSTITUTE = ' '
* LF_SUBSTITUTE = ' '
* REPLACE_SYMBOLS = 'X'
* REPLACE_SAPCHARS = 'X'
IMPORTING
* FORMATWIDTH_E = FORMATWIDTH_E
* X_DATATAB = X_DATATAB
c_datatab = c_datatab
* X_SIZE = X_SIZE
TABLES
itf_lines = itf_tab
EXCEPTIONS
invalid_tabletype = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Raja
Message was edited by: Durairaj Athavan Raja -
How to replace a variable in SO10
Hi,
I need to replace a variable &data& in SO10 to his value but it doesn't work.
I use the FM 'TEXT_SYMBOL_REPLACE' to replace the words in the SO10.
Could you help me please?
In the transaction SO10, we have &eric&.
DATA:
lt_text TYPE STANDARD TABLE OF tline.
data : eric type char30 value 'Test'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
object = 'TEXT'
id = 'ST'
name = 'EMAIL'
language = sy-langu
IMPORTING
header = header
TABLES
lines = lines
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
header = header
program = sy-repid
REPLACE_TEXT = 'X'
TABLES
lines = lines.
Regards,
Shushu
Edited by: Shushu93 on Jul 6, 2010 2:42 PM
Edited by: Shushu93 on Jul 6, 2010 2:45 PM
Edited by: Shushu93 on Jul 6, 2010 2:46 PM
Edited by: Shushu93 on Jul 6, 2010 2:46 PM
Edited by: Shushu93 on Jul 6, 2010 2:47 PMHi,
I threw this code together quickly for you:
REPORT ZFM_TEST.
DATA: ls_head TYPE thead,
lt_lines TYPE STANDARD TABLE OF tline,
ls_lines TYPE tline,
l_total_lines TYPE i.
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = 'ST'
LANGUAGE = 'E'
NAME = 'ZTEXT'
OBJECT = 'TEXT'
IMPORTING
HEADER = ls_head
TABLES
LINES = lt_lines
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
IF SY-SUBRC = 0.
LOOP AT lt_lines INTO ls_lines.
Write: 'Unformatted:', ls_lines-tdline.
ENDLOOP.
DESCRIBE TABLE lt_lines LINES l_total_lines.
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
endline = l_total_lines
header = ls_head
TABLES
lines = lt_lines.
IF SY-SUBRC = 0.
LOOP AT lt_lines INTO ls_lines.
Write:/ 'Formatted:', ls_lines-tdline.
ENDLOOP.
ENDIF.
ENDIF.
Regards,
Phil -
Standard texts(SO10)
HI gurus
Whats the exact use of maintaining stabdard texts using tcode SO10. where it is reflected?
Regards,
prasadHi,
There is no need of ABAper we can insert the text from SO10.
Generally we use these texts as per our equirement, for Contract where The Header Text Contains N-number of pages, and for each Contract the Description Varies..
One way to address this requireemnt is that I maintain one Text in SO10,and I will use it for one Contract..
For Another Contract I will Copy this text and Make Some changes and Save it in SO10 with diff name..
So that as per my requirement I will Insert this text either at item Level Or Header Level..
So that I can get this text in my Print pre-view...
It allows to save lot of time from typing again & again..
Thx
Raju -
Import R/3 SO10 Standard Text to BW Documents
Hi
Please let me know
1. How can Import the Standard Text (SO10) from R/3 to BW Documents?
2. Is there any Function Module to extract the text?
Please let me know since it has become priortized task. Thanks!!
~ VaishnavOk this is easy and not that tough as expected...
I'll write a program that calls the function module READ_TEXT and export the output to the application server and then I'll retrieve the data into BW documents after changing the respective InfoObject as Characteristic is Document Attribute.
~ Vaishnav -
Long text so10 - filling of variables in abap.
Hi all, im facing this, maybe easy, task.
i have in SO10 created a long text with variable
for example:
"Hi, &USER&, how are you?".
i read this long text in abap program and now i need to to fill this variable &USER& with some value. How to do it? I think there should be some standard FM.
thanks, PhilippHi,
Use below two FMs:
* Read standard text
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ST'
language = 'EN'
name = 'TEXT_NAME'
object = 'TEXT'
IMPORTING
header = wa_header
TABLES
lines = git_lines " Text Lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
* Replace the symbols with the values
CALL FUNCTION 'TEXT_SYMBOL_REPLACE'
EXPORTING
header = wa_header
program = gc_program
TABLES
lines = git_lines.
ENDIF.
Here you simple have to fill the global variables before you call these FM.
Thanks.
Ravi -
hi all,
somebody could give me an example for using this function. And how can i manipulate the result? of the function?
regards,
Jose RobertoHi,
Please have a look.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'LTXT'
LANGUAGE = sy-langu
NAME = '%000000000010004'
OBJECT = 'QMFE'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = l_text_tab
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
basically the ID, object and name are coming from text where you can check in tcode SO10. -
Find texts in SO10 without knowing the ID's
Hi,
I have a text on my order confirmation layout that needs to be changed.
I can't determine which text name or text id it is because it's a very complex program.
is there a way that you can search the texts that are entered in SO10?
-> in a certain table maybe?
Because I found already parts of my order confirmation, but not the texts that I need...
Thanks,
JokeREAD_TEXT has four inputs, as I recall, that are of importance...well, three if you're in a single language installation....
there's the name, which is often a document number or a combination of document/item, etc.
There's the object which tells us what kind of text we have...and so forth....
If you put a breakpoint and stop there in debug, look at the values that are being passed to the read_text function module...
Those will be the key to finding the text object.... if you want to see the text, test function module READ_TEXT with those values....
But, honestly, if it's standard text, you know what to look for already. If not, check for ID is 'ST', SPRAS = sy-langu, OBJECT = 'TEXT'...you just need to find the NAME value....
If it's boiler plate, and it sounds like it is from your original post, you will be able to find within standard text, since that's really what standard text is for.... There is, of course, a possibility that you would have text built in SO10 that are not of the OBJECT and ID named above. -
Class for reading and saving standard text (SO10)
Hi,
I was using READ_TEXT and SAVE_TEXT to read/save the standard text (S010). Is there any standard class which contains the method to Read and Save the text of SO10?
I have searched the se24, bu i was unable to find class which can be used.
Thanks,
ShrinivasIf you do a "where used" on READ_TEXT then you will find plenty of SAP methods that call it, so why not just call it directly yourself? If you do want a class wrapper around it, then it wouldn't take long to build your own "Z_CL_TEXT_HANDLER" class and associated methods.
Jonathan
Maybe you are looking for
-
ALV Grid - Subtotal & total to be shown at the top of the table
Hi, I am using function module 'REUSE_ALV_GRID_DISPLAY' to display a table, and I count subtotals and total for some fields. The total is always shown at the bottom of the table, and subtotals are always shown after the rows that subtotals are calcul
-
How to automate the flatten transparency in illustrator?
How to automate the "Flatten Transparency option" in illustrator via javascript. Please share with me. Thanks
-
How do you organise artistes by surname rather than forename?
How do you organise iTunes library by artistes surname rather than forename?
-
New Inkjet Printer Recommendations?
My little trusty HP 932c (from the stone age) has finally given up the ghost. I'm interested in getting something in the $200ish range to replace it, though I would consider going higher if features would warrant the additional cost. I've only just s
-
Please great apple we love you don't make us upset ?
Hello great apple.before i start to speak. I know you will not fix my problem. But i wish. Please i bought ipad mini 2 and screen colors very bad. Low contrast. If you can fix it by updating firmware. I will be very happy. My old ipad 3 colors was am