Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FM: READ_DATA -> sy-subrc = 4

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

9 REPLIES 9

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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.

Former Member
0 Kudos

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

Thanks,

Naren

Former Member
0 Kudos

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

0 Kudos

Hi,

If there is data in STXT and STXL it should definetly fetch the data. Test READ_TEXT FM in SE37 with the import parameters.

Thank you,

Ramu N.

0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.