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: 

RED_TEXT

Former Member
0 Kudos

Hi friends,

needs advice, is there any other way to read texts in materials/customer/vendor master, instead of using FM READ_TEXT.

means way to read the table STXL etc.

Thanks

Lakhbir

7 REPLIES 7

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I am sure that there is, using tables STXH and others, but why go through all that when you can just use READ_TEXT. Is there some problem that you are not getting what you want when using READ_TEXT?

Regards,

Rich Heilman

former_member221770
Contributor
0 Kudos

Lakhbir,

You should not read table STXL directly. The text you are after is stored in field CLUSTD which is stored as raw text (this is so that the table size is kept as small as possible) as opposed to CHAR. So when you read the contents it will be gibberish. FM READ_TEXT formats this into readable text for you.

Hope this explains things a bit more for you.

Cheers,

Pat.

Former Member
0 Kudos

Hi Singh,

but why wud u want to do that when there is a FM alrady provided. Morevoer, as patrick said, u will not be able to make sense out of what you read directly from stxl.

Reg,

Prabhu.

0 Kudos

Why not, all we have to do is write our code on the same lines of READ_TEXT. Read the header information and line information from the two tables and then read the clusters(how?), decipher it(how?), convert it to normal text that we can read.

Or, we can simply use the READ_TEXT function module. Like everyone, I am curious too.. why reinvent the wheel?

Srinivas

Former Member
0 Kudos

Hi Guys,

The reason for asking is that other software we are using in our company needs some master data from Sap, some which is put into Text Fields, in Customer/vendor, Invoices etc , the instead of pushing out data from sap, they want to pull data from Sap database(reason other database is also Oracle)

any way thanks for your posts friends

Lakhbir

0 Kudos

It is never advisable to go directly to the underlying database for pulling data out of SAP. You will stand losing the application logic and the links between several tables. Also, not all tables in R/3 database have a one-to-one correspondence with a table in the underlying database(oracle in your case).

There are alternatives, however, if it is absolutely necessary to go the database directly. Create a Z table(it has to transparent table as transparent tables have one-to-one correspondence with the underlying database). Write an ABAP program to pull all the texts and store in this table. Since the READ_TEXT function module returns you an internal table of structure TLINE, it would be easy if you have the Z table defined similar to TLINE.

Once you have filled the Z table with the content, then the external software pull it out directly at a database level.

Other option would be to write RFCs that this software can call.

Hope this helps,

Srinivas

0 Kudos

Ho Sri,

That is what is happening., Anyhow,

I had not worked with BAPI's and RFC, needs to enable SNC login for BAPI called from other system. if cangive me some idea on this issue,will be highly appreciated.

Thanks

Lakhbir