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

Smartform Email

Former Member
0 Likes
441

Hi,

I was using the Function Module "SO_NEW_DOCUMENT_ATT_SEND_API1" to send a smartform output as pdf attachment through email. I got a run time error.
The description of the error is shown below. Please give me a solution for this error.

Runtime Errors CALL_FUNCTION_UC_STRUCT

Except. CX_SY_DYN_CALL_ILLEGAL_TYPE

Date and Time 06.12.2007 15:35:33

-

-


-

-


Short text

Typkonflikt bei Structure-Parameterübergabe bei CALL FUNCTION.

-

-


-

-


Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was

not caught and

therefore caused a runtime error.

The reason for the exception is:

Bei der Funktion "SO_NEW_DOCUMENT_ATT_SEND_API1" ist der STRUCTURE-Parameter

"RECEIVERS" so typisiert,

daß nur Aktualparameter zugelassen sind, die unter Unicode gemäß der

Fragmentsicht kompatibel sind. Der angegebene Aktualparameter

"RECEIVER_LIST" hat aber eine nicht kompatible Fragmentsicht.

-

-


-

-


Missing Handling of System Exception

Program ZNEW_SAM_PDF_TESTMAIL

-

-


-

-


Trigger Location of Exception

Program ZNEW_SAM_PDF_TESTMAIL

Include ZNEW_SAM_PDF_TESTMAIL

Row 135

Module Name START-OF-SELECTION

-

-


-

-


Source Code Extract

-

-


Line

SourceCde

-

-


105

106

CLEAR lv_tab_lines.

107

  • Mail body

108

APPEND 'Message content' TO message_content.

109

APPEND'THE SALES DOCUMENT NUMBER FOR YOUR REFERENCE IS ATTACHED IN THE PDF DOCUMENT'

110

TO message_content.

111

DESCRIBE TABLE message_content LINES lv_tab_lines.

112

READ TABLE message_content INDEX lv_tab_lines.

113

w_doc_data-doc_size = ( lv_tab_lines - 1 ) * 255 + STRLEN( message_content ).

114

115

REFRESH obj_head.

116

CLEAR obj_head.

117

DESCRIBE TABLE obj_bin LINES lv_tab_lines.

118

obj_head-line = 'SM.PDF'.

119

APPEND obj_head.

120

121

CLEAR objpack.

122

  • Attachment

123

objpack-transf_bin = 'X'.

124

objpack-head_start = 1.

125

objpack-head_num = 0.

126

objpack-body_start = 1.

127

objpack-file_ext = 'PDF'.

128

objpack-body_num = lv_tab_lines.

129

objpack-objnam = 'Sales Document'.

130

objpack-objdes ='Sales Order Number'.

131

objpack-objtp = 'RAW'.

132

APPEND objpack.

133

134

>>>>>

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

136

EXPORTING

137

document_data = w_doc_data

138

put_in_outbox = 'X'

139

  • COMMIT_WORK = ' '

140

  • IMPORTING

141

  • SENT_TO_ALL =

142

  • NEW_OBJECT_ID =

143

TABLES

144

packing_list = objpack

145

object_header = obj_head

146

contents_bin = obj_bin

147

contents_txt = message_content

148

  • CONTENTS_HEX =

149

  • OBJECT_PARA =

150

  • OBJECT_PARB =

151

receivers = receiver_list

152

  • EXCEPTIONS

153

  • TOO_MANY_RECEIVERS = 1

154

  • DOCUMENT_NOT_SENT = 2

-

-


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
354

Hi,

The problem was occurs at ,

151| receivers = receiver_list |

So check the structure for FM parameter <b> receivers</b> and your para meter <b>receiver_list</b> is same or not.

It should be the same structure.

Thanks.

1 REPLY 1
Read only

Former Member
0 Likes
355

Hi,

The problem was occurs at ,

151| receivers = receiver_list |

So check the structure for FM parameter <b> receivers</b> and your para meter <b>receiver_list</b> is same or not.

It should be the same structure.

Thanks.