Application Development and Automation 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: 
Read only

READ_TEXT returning wrong values

Former Member
0 Likes
2,618

Hi All Experts,

I am facing issue while using READ_TEXT function module to read the characteristics description ( QM module ).

But actual description is different than what is returned by function module.

Thanks for your help!!

9 REPLIES 9
Read only

Former Member
0 Likes
2,202

Check whether have you passed object id,object name correctly.

Read only

FredericGirod
Active Contributor
0 Likes
2,202

Hi,

Check your field is not 40 char long. SAP could truncate the value and keep only the first 40 characters.

regards

Fred

Read only

0 Likes
2,202

Hi Frederic,

I think problem is not that

giving this values

and getting this

Read only

0 Likes
2,202

Oops

I've read to fast.

Did you try to put an SQL trace (ST05) to see if it was the same STXH line read by the two program ?

regards

Fred

Read only

0 Likes
2,202

As said by Jurgen, Please check it.


Does not the version have validity dates ?

Check if this helps http://help.sap.com/saphelp_46c/helpdata/en/2d/35074c448c11d189420000e829fbbd/content.htm

Read only

Former Member
0 Likes
2,202

Hi Harshada,

i am just copy pasting a code that i used some time in the past to read SO texts.

Plz make sure u have the correct l_id value and l_name etc...

   CALL FUNCTION 'READ_TEXT'
          EXPORTING
            id                      = l_id
                                         "(Text ID of text to be read)
            language                = lc_language
                                        "(Language of text to be read)
            name                    = l_name
                              "(Concatenated value of VBELN and POSNR)
            object                  = lc_object
                                          "(Object of text to be read)
          IMPORTING
            header                  = ls_header
                                          "(Object of text to be read)
          TABLES
            lines                   = lt_lines
                                                 "(Lines of text read)
          EXCEPTIONS
            id                      = 1
            language                = 2
            name                    = 3
            not_found               = 4
            object                  = 5
            reference_check         = 6
            wrong_access_to_archive = 7
            OTHERS                  = 8.

Read only

Former Member
0 Likes
2,202

Hi Harshada,

I guess

the language in which texts are maintained and called in FM ,

Or the length of the 'OBJECT ' could be an issue.

Please re-check .

Regards,

Shruti

Read only

JL23
Active Contributor
0 Likes
2,202

I see that you work with versions.

Was the new entry approved?

Read only

former_member217544
Active Contributor
0 Likes
2,202

Hi,

Hope the client you are seeing the Transaction and the client you are executing both are same. Though this is not the issue but try clearing internal table lines[] before running the function module. Also check by executing the FM read_text independently.

One more: Save the transaction. Come out of transaction and run the program again. may be the database is not updated before you run the program.

Regards,

Swarna