5 Replies Latest reply: May 22, 2007 7:09 PM by Guest RSS

Reading line item text from sales order

Currently Being Moderated



I have a sales order which has an item text, I need to get the value from the text. I want to test the READ_TEXT function and I am giving values as


  Import parameters               Value           


  CLIENT                          400             

  ID                                  0011            

  LANGUAGE                   EN              

  NAME                            0001171445000010

  OBJECT                         VBBP            

  ARCHIVE_HANDLE         0               



It is not giving me any value.  Am I giving any thing wrong? In the NAME I gave the value as sales ord num + item number, is this correct. Please help me.




  • Re: Reading line item text from sales order
    Seshu reddy Maramreddy
    Currently Being Moderated

    Need to pass : Item number(6) - order number(10)

    text name     0000020510000001

    text object : VBBP

    text id : '0011'.

    language 'E'.

  • Re: Reading line item text from sales order
    Anji Reddy Vangala
    Currently Being Moderated


    Name is the Concatenation of Order No and Item No.

    pass the 4 parameters ID,OBJECT,NAME and LANG

    use the correct declarations for the parameters and use


    ID  = '0011'

    LANGUAGE =  'EN'

    NAME = '0001171445000010'

    OBJECT  = 'VBBP'



    See the doc



    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:





    OBJECT = ?...

    NAME = ?...

    ID = ?...

    LANGUAGE = ?...



    TABLES LINES = ?...



    NAME =


    OBJECT =




    Export parameters:


    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



    Enter the name of the text object to which the text is allocated. Table TTXOB contains the valid objects.


    Reference field: THEAD-TDOBJECT



    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



    Enter the text ID of the text module. Table TTXID contains the valid text IDs, depending on the text object.


    Reference field: THEAD-TDID



    Enter the language key of the text module. The system accepts only languages that are defined in table T002.


    Reference field: THEAD-TDSPRAS



    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:


    If the system finds the desired text, it returns the text header in this parameter.


    Structure: THEAD


    Table parameters:



    The table contains all text lines that belong to the text read.


    Structure: TLINE




    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.



    The parameter LANGUAGE contains a language key that does not exist in table T002.



    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 ‘,’.



    The parameter OBJECT contains the name of a text object that does not exist in table TTXOB.



    The system did not find the specified text module.



    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.



    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 if useful



  • Re: Reading line item text from sales order
    Srinivas Adavi
    Currently Being Moderated

    It appears correct. Go to VA02 and go to the text in question, go into the long text mode and then in the menu 'GoTo-->Header' option will give you how it is stored in the database. Just pass the NAME, OBJECT, and ID and see if the CLIENT or LANGUAGE is causing it.


    Finally check in STXH table to see if your entry is there.

  • Re: Reading line item text from sales order
    John Jakabcsin
    Currently Being Moderated



    Looks perfect IF sales order '0001171445' has text type '0011' on line item '000010'


    Verify that in VA02