Reg SMARTFORM emailing n fax options?

hi friends
i have to run my smartform in background mode and there is a requirement to fax and emailing
the output. how to make my form run in background , email n fax ?
thanks & regards
thirupai
Edited by: rafi md on Dec 20, 2008 1:32 PM

HI
you may use the FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF' to convert the fom
into PDF.
But first to get the printed form from the spool, use FUNCTION
'RSPO_FIND_SPOOL_REQUESTS'.
Then you may send it to your PC, email, fax, etc by reading the record in
the lines of table IT_PDF_OUTPUT.
Note: You may also use program RSTXPDFT4 as a reference to get code
examples which uses different functions to perform the creation of PDFand
download the form to the PC,etc.
An example:
CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'
EXPORTING
RQOWNER = SY-UNAME
TABLES
SPOOLREQUESTS = SPOOL_REQUESTS.
READ TABLE SPOOL_REQUESTS INDEX 1.
GD_SPOOL_NR = SPOOL_REQUESTS-RQIDENT.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = GD_SPOOL_NR
NO_DIALOG = C_NO
IMPORTING
PDF_BYTECOUNT = GD_BYTECOUNT
PDF_SPOOLID = PDFSPOOLID
BTC_JOBNAME = JOBNAME
BTC_JOBCOUNT = JOBCOUNT
TABLES
PDF = IT_PDF_OUTPUT
EXCEPTIONS
ERR_NO_OTF_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DSTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11.
CHECK SY-SUBRC = 0.
Hope this will help send you in the right direction
Regards
Alok

Similar Messages

  • How to send smartform as an email or fax

    Hi Friends,
    Problem is i am getting smartform output, but how to send the output as an email or fax( say for ex it should be sent to vendor). Also kindly explain how to convert smartform to PDF output. Thanks in advance.

    Hi,
    The below sample code is for 4.6C.Try this out.
    Kindly reward points by clicking the star on the left of reply,if it helps.
    Internal Table declarations
    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
    i_tline TYPE TABLE OF tline WITH HEADER LINE,
    i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
    i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    wa_objhead TYPE soli_tab,
    w_ctrlop TYPE ssfctrlop,
    w_compop TYPE ssfcompop,
    w_return TYPE ssfcrescl,
    wa_doc_chng typE sodocchgi1,
    w_data TYPE sodocchgi1,
    wa_buffer TYPE string,"To convert from 132 to 255
    Variables declarations
    v_form_name TYPE rs38l_fnam,
    v_len_in LIKE sood-objlen,
    v_len_out LIKE sood-objlen,
    v_len_outn TYPE i,
    v_lines_txt TYPE i,
    v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZZZ_TEST1'
    importing
    fm_name = v_form_name
    exceptions
    no_form = 1
    no_function_module = 2
    others = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    i_otf[] = w_return-otfdata[].
    call function 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    others = 4.
    Fehlerhandling
    if sy-subrc <> 0.
    endif.
    loop at i_tline.
    translate i_tline using '~'.
    concatenate wa_buffer i_tline into wa_buffer.
    endloop.
    translate wa_buffer using '~'.
    do.
    i_record = wa_buffer.
    append i_record.
    shift wa_buffer left by 255 places.
    if wa_buffer is initial.
    exit.
    endif.
    enddo.
    Attachment
    refresh:
    i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
    clear wa_objhead.
    i_objbin[] = i_record[].
    Create Message Body
    Title and Description
    i_objtxt = 'test with pdf-Attachment!'.
    append i_objtxt.
    describe table i_objtxt lines v_lines_txt.
    read table i_objtxt index v_lines_txt.
    wa_doc_chng-obj_name = 'smartform'.
    wa_doc_chng-expiry_dat = sy-datum + 10.
    wa_doc_chng-obj_descr = 'smartform'.
    wa_doc_chng-sensitivty = 'F'.
    wa_doc_chng-doc_size = v_lines_txt * 255.
    Main Text
    wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
    clear i_objpack-transf_bin.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_txt.
    i_objpack-doc_type = 'RAW'.
    append i_objpack.
    Attachment
    (pdf-Attachment)
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    Länge des Attachment ermitteln
    describe table i_objbin lines v_lines_bin.
    read table i_objbin index v_lines_bin.
    i_objpack-doc_size = v_lines_bin * 255 .
    i_objpack-body_num = v_lines_bin.
    i_objpack-doc_type = 'PDF'.
    i_objpack-obj_name = 'smart'.
    i_objpack-obj_descr = 'test'.
    append i_objpack.
    clear i_reclist.
    i_reclist-receiver = [email protected]'.
    i_reclist-rec_type = 'U'.
    append i_reclist.
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = wa_doc_chng
    put_in_outbox = 'X'
    TABLES
    packing_list = i_objpack
    object_header = wa_objhead
    CONTENTS_BIN = i_objbin
    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.

  • How to set the Mail and Fax options  for the Smartforms ???

    How to set the Mail and Fax options  for the Smartforms ??? Please reply me very soon. Its a life deciding question now for me. Please .

    >
    veera Karthik wrote:
    > How to set the Mail and Fax options  for the Smartforms ??? Please reply me very soon. Its a life deciding question now for me. Please .
    Hi
    Check this Link:
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm
    P.S: Never say reply me soon....people answer you here voluntarily and as everyone has their own desk to manage...sp replies may late or early..depending upon the availabality of the members.
    Vishwa.

  • Reg fax option for sf?

    hi experts
    i onverted my smartform output to pdf format. how to fax this pdf ?
    whats the use with convert_otf_and_fax
    r i need to work with so_object_send.
    pls send me code if any worked earlier
    thanks

    hi search sdn and u wud get answer instantly as this is one of the most asked questions on sdn.
    see thse threads
    How to fax a smartform?
    Send a Smartform by Fax
    Sending SMARTFORM output to FAX gateway

  • Payment Advise By Email  or FAX

    Can any one tell me how to send Payment Advise by email or Fax.
      My req is, first i have find out the payment advise pgm or t-code and then how to send that by email.
      Pls give t-code and where i can find the option to send email.
    Thanks in advance.
    Kumar

    Checkout
    http://www.le.ac.uk/mis/docs/sapdocs/ug/UG3-5%20Rem%20Advice.doc
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-acct/remittances-for-cheques-667467#
    Pl..award the points
    Thanks
    Saquib

  • Service order confirmation email and fax

    Hi all,
    I am looking for how to send emails or faxes when a service order is confirmed? Can anyone please help me do that?
    I understand that SMTP service should be enabled & SAP Connect should be configured but how to trigger the email on Service order confirmation?
    For Sending Fax do we need to have Fax software or we can use SMTP to send Fax? For using SMTP-Fax scenario what will be required?
    thanks,
    LSP

    Hi,
    Set up an Action to trigger upon save that is linked to the relevant SMARTFORM. Make sure it is configured as e-mail.
    Cheers
    Colin.

  • Email and fax a form

    Hi ,
           how can we send a form output as email and fax ? How to do the config for this? Can you explain the process to be done?
    Rama.

    Hi,
    See following code :
    REPORT zmail_att NO STANDARD PAGE HEADING LINE-SIZE 200.
    DATA : BEGIN OF ITAB OCCURS 0,
    PERNR LIKE PA0001-PERNR,
    ENAME LIKE PA0001-ENAME,
    END OF ITAB.
    DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
    receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
    packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
    listobject LIKE abaplist OCCURS 10,
    compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
    w_object_hd_change LIKE sood1,
    compressed_size LIKE sy-index.
    START-OF-SELECTION.
    SELECT PERNR ENAME
    INTO CORRESPONDING FIELDS OF TABLE ITAB
    FROM PA0001
    WHERE PERNR < 50.
    LOOP AT ITAB.
    WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
    SY-VLINE.
    ENDLOOP.
    Receivers
    receiver_list-recextnam = 'XXXXX@X...'. --> EMAIL ADDRESS
    RECEIVER_list-RECESC = 'E'. "<-
    RECEIVER_list-SNDART = 'INT'."<-
    RECEIVER_list-SNDPRI = '1'."<-
    APPEND receiver_list.
    General data
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    Mail subject
    w_object_hd_change-objdes = 'Message subject'.
    Mail body
    APPEND 'Message content' TO message_content.
    Attachment
    CALL FUNCTION 'SAVE_LIST'
    EXPORTING
    list_index = '0'
    TABLES
    listobject = listobject.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    compressed_size = compressed_size
    TABLES
    in = listobject
    out = compressed_attachment.
    DESCRIBE TABLE compressed_attachment.
    CLEAR packing_list.
    packing_list-transf_bin = 'X'.
    packing_list-head_start = 0.
    packing_list-head_num = 0.
    packing_list-body_start = 1.
    packing_list-body_num = sy-tfill.
    packing_list-objtp = 'ALI'.
    packing_list-objnam = 'Object name'.
    packing_list-objdes = 'Attachment description'.
    packing_list-objlen = compressed_size.
    APPEND packing_list.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    object_hd_change = w_object_hd_change
    object_type = 'RAW'
    owner = sy-uname
    TABLES
    objcont = message_content
    receivers = receiver_list
    packing_list = packing_list
    att_cont = compressed_attachment.
    Reward points if helpful.
    Regards.
    Srikanta Gope

  • Error message when trying to scan to email or fax

    when I try to scan to email or fax i get this message:
    "secure connection to SMTP server could not be established..."
    I didn't have this problem when I first got the laserjet pro 200 m276.
    any thoughts on how to remedy>

    Hi MACSRC1,
    I see by your post that you are getting the error "secure connection to SMTP server could not be established" when trying to scan to email or fax. I can help you with this.
    I have provided a document to check your scan settings. You might have to run the wizard again.
    How to Scan: From the Control Panel (Including Scan to Email, to a PDF, and to a Network Folder).
    Click on Scan to email.
    This document is for Cannot Send or Receive Faxes to go through to resolve the fax issue.
    What email provider and email program are you using?
    What operating system are you using?
    Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
    How to Find the Windows Edition and Version on Your Computer.
    If you need further assistance, just let me know.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • Need to send my back up email a reset security questions email but the option does not show when I click on password and security

    Need to send my back up email a reset security questions email but the option does not show when I click on password and security

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (97456)

  • Hp c7280 all in one printer fax option stopped working

    My fax option worked until yesterday afternoon.  Now I have a fax text report and it tells me that I  am not using the correct type of phone cord.  It has always worked with the phone cord I have plugged in before.  Is there a certain phone cord I should be using and if so where can I get one?

    Hi there,
    This article should cover the issue you are experiencing. Give the steps outlined a shot and let us know if it helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Sending smartform output as FAX

    Hi Gurus,
    I am sending a smartform output as Fax..
    I have written this this code
    READ TABLE lt_adr3
            INTO lwa_adr3
            INDEX 1.
          IF sy-subrc = 0.
            CONCATENATE lwa_adr3-fax_number text-002 INTO lwa_receivers-receiver.
            lwa_receivers-rec_type   = gc_u.
            lwa_receivers-com_type   = gc_int.
            lwa_receivers-notif_del  = gc_x.
            lwa_receivers-notif_ndel = gc_x.
            APPEND lwa_receivers TO lt_receivers.
    i have +9102267557100 as the fax number and i am sending it to the function module.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
              EXPORTING
                document_data              = lwa_document_data
           commit_work                = 'X'
              TABLES
                packing_list               = lt_packing_list
                contents_bin               = lt_mess_att
                receivers                  = lt_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.
    But i am not getting the pdf document at the FAX machine.
    Kindly reply

    Solved

  • Send Smartform Email via Action Profile

    Hello,
    We have an Action Profile with a few actisn athat a workign perfectly.  I have added a new action to send  smartform via email when the the transaction is saved.
    The Action profile is set upfor object type BUS2000115(Quotation) with the context class of CL_DOC_CONTEXT_CRM_ORDER.
    I have set up the Smartform Email action processing as follows:
    Permitted processign type fo Action - Smartform Email
    Mail Settings:
    Form Name                       YC3_SF_CRM_COMM_QUOTATION_V7
    Processing Class              CL_CRM_BP_UM_PROCESSING_PPF
    Processing Method           UM_EXEC_SMART_FORM
    Archive Mode                    Mail only
    there is no schedule or start condition as it is not required.
    When I Save the Quotation nothing is getting triggered.  If in the Quotation I Preview output and select 'Email Quotation; I get the message 'Smartform Error'.  Is there a way to debug the message further ?  I'm assuming this is the SAP standard method of achieving Smartform email as Pdf attachment, are some steps that I have missed ?
    Regards
    Chan

    The Processing class and Processing Method seem to be incorrect.
    Use the below;
    Processing Class  : CL_DOC_PROCESSING_CRM_ORDER
    Processing Method: CRM_ORDER_EXEC_SMART_FORM
    You can always refer to standard action profile for Quotations to see what SAP has delivered.

  • Changed Purchase order triggering Email and Fax to vendor

    Hello,
    Ecc6.0 srm3.0.
    a changed purchase order triggering email to vendor, although in the table BBPD_PO_METAOUT all the fields are unchecked and we donu2019t have customization in the table BBPD_COMP_FIELDS,
    Please suggest, we donu2019t want email of fax to be triggered when we amend the purchase order,
    Thanks for reply.
    jairaj

    When we change vendor text, It is SAP std that mail will triger to vendor

  • Smartform output to fax

    hi experts
    how to send smartform output to fax, where i write the code.
    thanks
    sitaram

    Believe me i searched with exactly with your subject line(smartform output to fax) i got my answer.
    can you able to do same?
    Cheers

  • Using workflow to email and fax output documents

    The requirement is that everytime an output is triggered for a document, the document should be emailed and/or faxed to certain contacts that are maintained on the customer master. Currently you can only email or fax to one contact at a time but we would like to do it for multiple contacts.
    Can this be achieved using workflow? I am relatively novice in workflow but would like to implement it if possible.
    The solution we have right now, which works by the way:
    Add a function module in every driver program to extract the contact information and populate a database table
    Run a batch job ever 5 mins that reads the database table and emails/fax using the contact information.
    Am looking for some ideas for a more efficient way of doing it. Thank you.

    yes you can sedn the mail to multiple recipients  by using ythe workflows and even you can attach the Document to the mail as a ATTACHMENT
    by using differnet Fm that are available  just go to se 37 and SAP_WAPI click f4 you will find all the FM that are required.
    Important: You have to use a step ACTIVITY and make it as background step because there is no need of any sort of interaction with the user while determining the Agents and after getting the result  i mean the reposible users  store them ina internal table of type SWHACTOR and
    in the mail step use EXPRESSION and assign these determined agents
    For this you have to bind the Task conatiner elements and workflow conatiner elements ok

Maybe you are looking for