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

FM: READ_DATA -> sy-subrc = 4

I'm debugging a piece of code that is using the the FM READ_DATA to extract workorder confirmations long text.

Though the long text for particular workorder exists, the FM returns NOT_FOUND (sy-subrc =4).

Any guesses what the FM is looking for?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 07:46 PM

    Hi,

    Is the FM is READ_DATA or READ_TEXT. If there is data READ_TEXT will get data, check the import parameters.

    Thank you,

    Ramu N.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:27 PM

    Text not in SO10, but tables STXH and STXL have entries corresponding to FM imports.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Gnandeep,

      Are you populating correct values of Text Id,Text Object,

      Text Name, and Language when using FM READ_TEXT.

      You can run the above FM in SE37 and see if you are getting output.

      Like if you are going to have values of Shipping & Mfg Inst in Header text of outbound delivery then

      ID: Z101

      Language: EN

      Name: 0090000800 (this is my outbound del no), dont forget to add preceding zeros

      Object: VBBK

      You should get output if you have all the correct parameters. If you are getting any output, can u provide the parameters you are using in FM and the scenario also.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 07:50 PM

    Thanks, Ramu for picking the typo. Yes, the FM is READ_TEXT.

    While debugging, I have noticed that the FM is called properly called and the import parameters are correctly assigned. And the text data exists too. But yet it spits out NOT_FOUND.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Go to so10 and check the text is available or not by giving the import parameters of the FM also see tables STXH, STXL if there are any entries with the import parametes of FM.

      Thank you,

      Ramu N.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 11:54 PM

    Hi Ganadeep,

    Have you tried using FM 'select_text'.

    This FM is very good because you can put * wildcards in the parameters and it will retreive a list of all matching texts. (it actually returns populated THEAD structures/records which you can pipe straight into 'read_text').

    This is the best way i've found to find out what texts really exist.

    Also I think that there are some options for buffering in these FMs. I would also make sure the are no commit or locking issues that could affect this.

    Cheers,

    Phil.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:12 PM

    In the text name..make sure it is in the internal format..(with all the zeros in front of it)..

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:36 PM

    Hi,

    Are you passing the text id , text name and text object to the function module..

    If so..Go to the transaction where you are having the texts..Display the text...In the text editor..Goto -> Header...You will get the text name, TExt id and text object...Use those values in the function module READ_TEXT...You will get the values..

    Thanks,

    Naren

    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.