12-10-2009 11:41 AM
Dear Expert,
Actually i have a ALV program and layout.
Now i want to open these program in HTML and XLS both the option, according to Radio Button selection for Html or XLS.
Then send this output to concern person via email as an attachment.
Plz. Help me as soon as posible
Bye
12-10-2009 11:43 AM
Hi Shalini,
based on your radio button call fm:
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = lv_document_data
put_in_outbox = space
commit_work = 'X'
tables
packing_list = i_objpack
object_header = i_objhead
contents_bin = i_audit_output
contents_txt = i_objtxt
receivers = i_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 id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
Display message saying email was sent successfully.
else.
write: /1 text-t23.
endif.