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

converting table to xstring for pdf viewing

Former Member
0 Likes
919

Hello,

I am trying to convert a table into xstring. The table consist of 64 line type char255.

I am doing the following:

CALL FUNCTION 'SOTR_SERV_TABLE_TO_STRING'

  • EXPORTING

  • FLAG_NO_LINE_BREAKS = 'X'

  • LINE_LENGTH =

  • LANGU = SY-LANGU

IMPORTING

TEXT = wa_string

TABLES

text_tab = stream

.

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'

EXPORTING

text = wa_string

  • MIMETYPE = ' '

  • ENCODING =

IMPORTING

BUFFER = pdf_xstring

  • EXCEPTIONS

  • FAILED = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

I am using the xstring in order to show an PDF in WD4A. I always get the message that the file is corrupt and can not be repaired.

best regards

stefan

2 REPLIES 2
Read only

Former Member
0 Likes
647

solved it myself with CALL FUNCTION 'SCMS_FTEXT_TO_XSTRING'.

Read only

Former Member
0 Likes
647

Hi Stefan,

Could you please give an example of how you solved this issue, since we too are trying to do the same thing.

Thanks