Application Development 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: 

Send Attchment in delivery as Fax

Former Member
0 Kudos

Hi,

I have a document attached to a delivery. Is it posiible to configure the outputype in a way to send this document as fax/email?

Thanks,

3 REPLIES 3

Former Member
0 Kudos

Createcustom output type with driver that retrieves the document and sends via BCS?

0 Kudos

Hello,

I have the same issue for sending the fax with PDF attachment.

I create the document, attachments and sends via BCS class, but i got the following issue:

No delivery to <fax number>, as part of message cannot be transferred

Message no. XS811

Diagnosis

The message could not be delivered to recipient 6504612397 as part of the message could not be transferred.

System Response

Processing was ended normally.

Additional information of the node used (in the system language of the node):

Procedure

Part of the message could not be transported all the way to recipient <fax number>. This is usually due to particular binary attachments. Check the message and remove oversized attachments and attachments that require special coding, for example.

The following is my code:

lr_send_request = cl_bcs=>create_persistent( ).

lr_document = cl_document_bcs=>create_document(
                                    i_type    =  gc_doc_type_raw
                                    i_text    =  it_message_body
                                    i_subject =  iv_subject ).

* Get attachments
  PERFORM get_attachments USING        it_invoice_send
                                              CHANGING lt_attachments
                                                                 et_invoice_no_pdf.

*Add  attachments
  LOOP AT lt_attachments INTO ls_attachment.
    lv_attachment_subject = ls_attachment-subject.
    TRY.
        lr_document->add_attachment(
                        EXPORTING
                        i_attachment_type    = ls_attachment-doc_type
                        i_attachment_subject = lv_attachment_subject
                        i_att_content_hex    = ls_attachment-cont_hex ).
      CATCH cx_document_bcs INTO lx_document_bcs.
        MESSAGE e005(zzfi_coll_enh) RAISING add_attachment_failed.
    ENDTRY.
  ENDLOOP.

lr_send_request->set_document( lr_document ).

lr_sender = cl_sapuser_bcs=>create( sy-uname ).

lr_send_request->set_sender( lr_sender ).

lr_recipient = cl_cam_address_bcs=>create_fax_address(
                                                  i_country = iv_fax_country
                                                  i_number  = iv_fax_number ).

lr_send_request->add_recipient(
                          EXPORTING
                          i_recipient = lr_recipient
                          i_express   = gc_flg_x ).

lr_send_request->send(
                        EXPORTING
                          i_with_error_screen = gc_flg_x
                        RECEIVING
                          result = ev_result ).
      COMMIT WORK.

Thanks,

Ivy

Former Member
0 Kudos

No . through a print program like in a normal output type.

Thanks