Skip to Content
author's profile photo Former Member
Former Member

error using FM read_text

Hi all,

i want to get long text from accounting document using FM read_text. When i Checked document header i found id as '0001' object 'BELEG' but when i am using this in FM i am getting error as

'Text key ID 0001 language EN not found'

and is asking me to create text

Is there any other way to get data(convert raw data to text format) from STXL table?

can any one help me to solve this problem urgent...

thanx

sravanthi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2008 at 04:41 AM

    Hi

    iam passing correct parameters, when i tried to get data from stxl it's working but this is unable to interpret '0001' as textid. i just embeded the code i am using.....

    DATA: BEGIN OF LTEXT OCCURS 50.

    INCLUDE STRUCTURE TLINE.

    DATA: END OF LTEXT.

    data: key(18).

    KEY ='XXXX12345678902007'

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    ID = '0001'

    LANGUAGE = sy-langu

    NAME = 'key'

    OBJECT = 'BELNR'

    TABLES

    LINES = ltext.

    thanx sraanthi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2008 at 04:19 AM

    Hi Sravanthi,

    You can get data only using READ_TEXT. You must be passing wrong parameters.

    Regards,

    Atish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2008 at 04:42 AM

    Hi

    Hope this will help you.

    Pls reward if help.

    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).

    Regards

    Deepanker

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.