Skip to Content
author's profile photo Former Member
Former Member

creating pdf

hi experts,

i have worked on sending mail in pdf format.but now i have to make my basic knowlege clear on this.so can just send me step by step procedure to send mail as compressed pdf attachment????

cause i am not able to understand y spool is creted????

and what are the ways of sending mail as pdf attachment??

<removed_by_moderator>

pls reply back

Edited by: Julius Bussche on Nov 1, 2008 7:28 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 01, 2008 at 06:35 AM

    Hi,

    I hope the following links will help you,

    https://forums.sdn.sap.com/click.jspa?searchID=15761020&messageID=1095698

    send-a-mail

    sendmail

    Regards,

    Harish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 01, 2008 at 06:29 AM

    use this standard report rstxpdft4 to convert ur output to pdf by passsing ur spool no to it ...

    get spool no from table TSP01..

    and this f.m 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send

    CONCATENATE 'Order' 'Acknowlegment' 'Notice' INTO v_string SEPARATED BY space.

    • x_document_data-obj_descr = v_string.

    • x_document_data-obj_langu = sy-langu .

  • x_document_data-sensitivty = 'F'.

  • x_document_data-doc_size = v_tot_lines * 255.

  • *

    • refresh it_packing_list[].

    • it_packing_list-transf_bin = ' '.

    • it_packing_list-head_start = 1.

    • it_packing_list-head_num = 0.

    • it_packing_list-body_start = 1.

    • it_packing_list-body_num = v_tot_lines.

    • it_packing_list-doc_type = 'RAW'.

    • APPEND it_packing_list.

    *

    **PDF Attachment

    • DESCRIBE TABLE it_contents_bin[] LINES v_lineno.

    • it_packing_list-transf_bin = 'X'.

    • it_packing_list-head_start = 1.

    • it_packing_list-head_num = 1.

    • it_packing_list-body_start = 1.

    • it_packing_list-doc_size = v_lineno * 255 .

    • it_packing_list-body_num = v_lineno.

    • it_packing_list-doc_type = 'PDF'.

    • it_packing_list-obj_name = 'SO Ack'.

    • it_packing_list-obj_descr = 'Order Acknowledgment Notice'.

    • it_packing_list-obj_langu = 'E'.

    • APPEND it_packing_list.

    • CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    • EXPORTING

    • DOCUMENT_DATA = x_document_data

    • PUT_IN_OUTBOX = 'X'

    • COMMIT_WORK = 'X'

    • TABLES

    • PACKING_LIST = it_packing_list

    • CONTENTS_BIN = it_contents_bin

    • CONTENTS_TXT = it_contents_txt

    • RECEIVERS = it_receivers

    • 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.

    • retcode = sy-subrc.

    • perform protocol_update.

    • else .

    *

    *

    • ENDIF.

Add a comment
10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.