Skip to Content
0
Former Member
Jan 07, 2007 at 09:16 AM

statement construction

16 Views

HI,

here i am converting the internal table to xstring and from xstring to table to enable my function module to take more than 255 char.

i am getting error at bolded statement.

all together is my idea is right to pass more than 255 char to fm SO_DOCUMENT_SEND_API1

DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,

t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,

t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,

t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,

t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,

w_cnt TYPE i,

w_sent_all(1) TYPE c,

w_doc_data LIKE sodocchgi1,

gd_error TYPE sy-subrc,

gd_reciever TYPE sy-subrc.

DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0

WITH HEADER LINE.

TYPES: Begin of it_attach,

field1(3000),

end of it_attach.

DATA : IT_XSTRING type XSTRING.

DATA : IT_TEXT type table of it_attach with header line.

DATA: contents_hex TYPE solix_tab with header line.

Form send_file_as_email_attachment.

CALL FUNCTION 'SCMS_TEXT_TO_XSTRING'

IMPORTING

BUFFER = IT_XSTRING

TABLES

TEXT_TAB = IT_TEXT.

CALL FUNCTION 'SCMS_STRING_TO_FTEXT'

EXPORTING

TEXT = IT_XSTRING

TABLES

FTEXT_TAB = contents_hex.

<b>READ TABLE contents_hex INDEX w_cnt.

w_doc_data-doc_size =

( w_cnt - 1 ) * 255 + STRLEN( contents_hex ).</b>