Skip to Content
0

How to send adobe forms via mail direclty to customer through standard

Feb 21 at 04:50 AM

84

avatar image
Former Member

Hi Experts,

I developed a one billing sales invoice form by adobe forms which is generating by VF02 transaction. Now requirement is like, I need to send that generated form via email directly to customer mail id through standard neither by any custom driver program.

Kindly please provide a solution if anybody has done like this.

Regards

Ashok

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Alex Zheng
Feb 26 at 02:08 AM
0

In standard, this should work with Transm. Medium 5 External send, by the following settings for the output type:

Program SD_INVOICE_PRINT01
Form Routine ENTRY
Form SD_BIL_MAIL_BODY

PDF/Smartform Form SD_INVOICE_FORM01

Maybe you could have a try with these standard settings to see if it works.
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Alex,

Now Its triggering to customer's mail id.

Thanks for the solution.

Regards

Ashok

0
Bell Yang
Feb 21 at 08:50 AM
0

Could you please try to maintain billing output type with medium 7,
partner = MA for sending emails out both in condition record(VV33) and output types(V/40).

Hope this will help.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Bell,

Thanks for your replying, we created billing output type with medium 5(External Send) and also with medium 7(Simple Email) and there we assigned a standard driver program. So based on that its not triggering to mail.

0
G Lakshmipathi
Feb 21 at 11:59 AM
0

Many times, it has been discussed in SCN and all you have to do is search in Google with the text "adobe billing output to customer" so that you will find the way to achieve.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Could you please provide related that link whether we can get solution about this, cause I did searched a lot.

Regards

Ashok

0
cause I did searched a lot.

Have you tried the way what I had suggested earlier

you have to do is search in Google with the text "adobe billing output to customer"

Even if you have searched for answers already, then apologies for making this request. In order to be on the safe side, please make sure your question outlines the steps you took while searching for your answer and what you have already tried to solve this on your own. This way, members will know that you searched and that you were unable to find the answer you were after. You may also want to include screenshots that best describes the topic that your question relates to.

0
Venkata Subbareddy Baasireddy Apr 19 at 06:52 AM
0

First you need to convert form attachment to binary format using FM SCMS_XSTRING_TO_BINARY. Find below code for details solution.

DATA:
lv_pdf TYPE xstring,
lv_size TYPE i,
lv_error_log TYPE abap_bool,
lv_email_sub TYPE string,
lt_bindata TYPE solix_tab.

* Converting PDF to binary format

CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

EXPORTING

buffer = FP_FORMOUTPUT-pdf

IMPORTING

output_length = lv_size

TABLES

binary_tab = lt_bindata.

CLASS cl_bcs DEFINITION LOAD.
  DATA:
  lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
  lo_send_request = cl_bcs=>create_persistent( ).
* Message body and subject
  DATA:
  lt_message_body TYPE bcsy_text VALUE IS INITIAL,
  lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
  APPEND 'Dear,' TO lt_message_body.
  append ' ' to lt_message_body.
  APPEND 'Please fill the attached form and send it back to us.'
  TO lt_message_body.
  append ' ' to lt_message_body.
  APPEND 'Thank You,' TO lt_message_body.
  lo_document = cl_document_bcs=>create_document(
  i_type = 'RAW'
  i_text = lt_message_body
  i_subject = 'Personnel Information Form' ).
  DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
  TRY.
      lo_document->add_attachment(
      EXPORTING
      i_attachment_type = 'PDF'
      i_attachment_subject = 'Attached the Billing Invoice'
* I_ATTACHMENT_SIZE =
* I_ATTACHMENT_LANGUAGE = SPACE
* I_ATT_CONTENT_TEXT =
* I_ATTACHMENT_HEADER =
      i_att_content_hex = lt_bindata ).
    CATCH cx_document_bcs INTO lx_document_bcs.
  ENDTRY.
* Add attachment
* Pass the document to send request
  lo_send_request->set_document( lo_document ).
* Create sender
  DATA:
  lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
  l_send type ADR6-SMTP_ADDR value 'abc@test.com'.
*  lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
  lo_sender = cl_sapuser_bcs=>create( sy-uname ).
* Set sender
  lo_send_request->set_sender(
  EXPORTING
  i_sender = lo_sender ).
* Create recipient
  DATA:
  lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
*  lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
  lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
** Set recipient
  lo_send_request->add_recipient(
  EXPORTING
  i_recipient = lo_recipient
  i_express = 'X' ).
*  lo_send_request->add_recipient(
*  EXPORTING
*  i_recipient = lo_recipient
*  i_express = 'X' ).

* Send email
  DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
  lo_send_request->send(
  EXPORTING
  i_with_error_screen = 'X'
  RECEIVING
  result = lv_sent_to_all ).
  COMMIT WORK.  


Share
10 |10000 characters needed characters left characters exceeded