2005 Sep 29 4:24 PM
Hi,
There is a custom program which retrieves data from spool using function module 'RSPO_RETURN_SPOOLJOB' and the list returned by the above function module is moved to table Objbin and passed to function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' for sending the email. eversince upgrade,we are facing problems with the Font of the mail generated via the above function module. The font is really small. the sample code is given below:
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
TABLES
packing_list = objpack
contents_bin = objbin
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
2005 Sep 29 6:56 PM
Hi there,
You may check the function 'RSPO_RETURN_SPOOLJOB' and see what you get from there. How did you fill the table when you send the email? You may publish more codes other than just call send email function part.
Weidong
2005 Sep 29 8:15 PM
this is how the code looks like:
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB' EXPORTING rqident = spool_number IMPORTING real_type = g_doc_type TABLES
buffer = compressed_list
EXCEPTIONS no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE e132 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. * move the list to the official table ojbin
MOVE compressed_list[] TO objbin[].
create the document which is to be sent
doc_chng-obj_name = 'list'.
doc_chng-obj_descr = 'Inbound PO Faxes to Jobber'.
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = '0'.
objpack-doc_type = 'RAW'.
APPEND objpack.
DESCRIBE TABLE objbin LINES tab_lines.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = g_doc_type.
objpack-obj_name = 'Attachment'.
objpack-obj_descr = 'PO Order'.
READ TABLE objbin INDEX tab_lines.
doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-doc_size = doc_size.
APPEND objpack.
IF sy-sysid NE 'PC2'.
recipient_int-address = ws_dummy_fax.
ELSE.
concatenate int_customer-fax_number
ws_fax_address
INTO recipient_int-address.
ENDIF.
reclist-receiver = recipient_int.
reclist-rec_type = 'U'.
APPEND reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
TABLES
packing_list = objpack
contents_bin = objbin
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE e133 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
COMMIT WORK.
2005 Sep 29 9:54 PM
Hi there,
Give a try to use g_doc_type = 'TXT' It may fix a lot of issue. Hope this helps.
Weidong