2005 Aug 11 10:56 PM
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
2005 Aug 11 10:58 PM
2005 Aug 12 1:08 AM
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.
2005 Aug 12 4:37 AM
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.
2005 Aug 12 4:54 AM
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
2005 Aug 12 3:49 PM
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
2005 Aug 12 4:17 PM
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
2005 Aug 12 5:44 PM
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