‎2012 Oct 16 2:54 PM
Hi all,
Is there a way to get the article texts without using the READ_TEXT function module?
We have an external business intelligence application which can only query on the SAP tables, it can't execute functions like the READ_TEXT. Can I search the texts in a cluster table?
If I search through the SE16n I'll only get the binary format in STXH and STXL.
Hope someone can help.
Thanks,
Koen
‎2012 Oct 16 3:21 PM
Hi Koen,
As per my knowledge, you can't get the article text directly from the standard tables. If your requirement is only to read text from tables directly then create a z table with required fields and populate article text into that table using Read_text function module and Read data from that z table directly.
One morething, Once your work is finished and try to delete data from this table in periodic manner or delete the table if possible to increase database free space.
One more option is you can create a z bapi using fm Read_text and try to call this bapi from external application if possible.
Hope this will helps you!
Shravan
‎2012 Oct 16 3:02 PM
hello,
See if the FM 'ECATT_CONV_XSTRING_TO_STRING' or 'FM SCMS_BIN_TO_TEXT' helps to convert RAW text to String.
OR
DATA: lv_converter TYPE REF TO cl_abap_conv_in_ce.
DATA: lv_xstring TYPE xstring.
DATA: lv_string type string.
lv_xtring = <your xstring>
lv_converter = cl_abap_conv_in_ce=>create( input = lv_xstring
encoding = 'UTF-8'
replacement = '?'
ignore_cerr = abap_true ).
TRY.
CALL METHOD lv_converter->read( IMPORTING data = lv_string ).
CATCH cx_sy_conversion_codepage.
*-- Should ignore errors in code conversions
CATCH cx_sy_codepage_converter_init.
*-- Should ignore errors in code conversions
CATCH cx_parameter_invalid_type.
CATCH cx_parameter_invalid_range.
ENDTRY.
best regards,
swanand
‎2012 Oct 16 3:07 PM
I think I didn't explain it well enough. The BI application can't execute RFC's of Functions. It has to get the data straight from the database tables.
So the proposed solution will not work.
‎2012 Oct 16 3:29 PM
hello,
the above code or suggestion was to convert the RAW text to string. After that you could use the below Z table approach.
best regards,
swanand
‎2012 Oct 16 3:21 PM
Hi Koen,
As per my knowledge, you can't get the article text directly from the standard tables. If your requirement is only to read text from tables directly then create a z table with required fields and populate article text into that table using Read_text function module and Read data from that z table directly.
One morething, Once your work is finished and try to delete data from this table in periodic manner or delete the table if possible to increase database free space.
One more option is you can create a z bapi using fm Read_text and try to call this bapi from external application if possible.
Hope this will helps you!
Shravan
‎2012 Oct 16 3:27 PM
Thanks Shravan,
So it seems it is not possible. I was hoping to get it done without programming work, but it seems I can't.
If someone has another solution, always welcome.
‎2012 Oct 16 7:35 PM
There is a thread Mass reading standard texts (STXH, STXL) that as a similar subject but is your BI able to effect the import from internal table that will translate the data of the cluster file (using code from reverse engineering of READ_TEXT)
Else, you will require coding for extraction or building some transparent tables to duplicate long texts.
Regards,
Raymond