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

Get Article text without using READ_TEXT

Former Member
0 Likes
3,116

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,883

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 

6 REPLIES 6
Read only

Former Member
0 Likes
1,883

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

Read only

0 Likes
1,883

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.

Read only

0 Likes
1,883

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

Read only

Former Member
0 Likes
1,884

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 

Read only

0 Likes
1,883

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.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,883

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