SAPScript to email and fax

Hi guys,
We want to end the sapscript thru email and fax. Can you help us how we can do that?
The sequence should be, the sapscript will first be converted to PDF file before ending thru mail.
Thanks a lot for all the help.
Rgds,
Mark

Thanks Eswar,
I am already successful with my pdf file,,, I am not sure what would I introduce to 'SO_DOCUMENT_SEND_API1' parameters for it to be successful...
I have the sample code below:
data: i_otfdata type STANDARD TABLE OF itcoo WITH HEADER LINE,
      i_pdfdata TYPE STANDARD TABLE OF tline WITH HEADER LINE,
      i_itcpp TYPE STANDARD TABLE OF itcpp WITH HEADER LINE.
data: i_docs type STANDARD TABLE OF docs WITH HEADER LINE,
      v_len type i.
CALL FUNCTION 'CLOSE_FORM'
   IMPORTING
     RESULT = i_itcpp
    TABLES
      otfdata = i_otfdata
    EXCEPTIONS
      unopened = 1
      OTHERS   = 2.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
   EXPORTING
     USE_OTF_MC_CMD               = 'X'
    ARCHIVE_INDEX                =
   IMPORTING
     BIN_FILESIZE                 = v_len
    TABLES
      otf                          = i_otfdata
      doctab_archive               = i_docs
      lines                        = i_pdfdata
   EXCEPTIONS
     ERR_CONV_NOT_POSSIBLE        = 1
     ERR_OTF_MC_NOENDMARKER       = 2
     OTHERS                       = 3
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      document_data                    =
    PUT_IN_OUTBOX                    = ' '
    SENDER_ADDRESS                   = SY-UNAME
    SENDER_ADDRESS_TYPE              = 'B'
    COMMIT_WORK                      = ' '
  IMPORTING
    SENT_TO_ALL                      =
    NEW_OBJECT_ID                    =
    SENDER_ID                        =
    tables
      packing_list                     =
    OBJECT_HEADER                    =
    CONTENTS_BIN                     =
    CONTENTS_TXT                     =
    CONTENTS_HEX                     =
    OBJECT_PARA                      =
    OBJECT_PARB                      =
      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

Similar Messages

  • Requirement of sending Sapscript through mail and fax

    I need help in code for sending sapscript through email or fax as the data is maintained in customer master table . If anybody has done so please help. I do not want to use CONVERT_OTF function and SO...API1 function.

    Check the following code it may help u.
    ***INCLUDE RVADOPFO .
    DATA: LVS_ITCPO         TYPE   ITCPO,
          LVF_DEVICE(30)    TYPE   C,
          LVF_DIALOG(1)     TYPE   C   VALUE ' ',
          LVS_RECIPIENT     LIKE   SWOTOBJID,
          LVS_SENDER        LIKE   SWOTOBJID,
          LVS_SNAST         TYPE   SNAST,
          LVF_PROGRAM       LIKE   SY-REPID,
          LVS_COMM_TYPE     TYPE   AD_COMM,
          LVS_COMM_VALUES   TYPE   SZADR_COMM_VALUES.
    reset return code
      RETCODE = 0.
    if there is a communication strategy used ...
      IF NOT NAST-TCODE IS INITIAL AND NAST-NACHA EQ '5'.
      ... use stratagy to get communication type
        CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
             EXPORTING
                  STRATEGY           = NAST-TCODE
                ADDRESS_TYPE       =
                ADDRESS_NUMBER     = VBDKA-ADRNR
                PERSON_NUMBER      = VBDKA-ADRNP
                  ADDRESS_NUMBER     = ADDR_KEY-ADDRNUMBER
                  PERSON_NUMBER      = ADDR_KEY-PERSNUMBER
             IMPORTING
                  COMM_TYPE          = LVS_COMM_TYPE
                  COMM_VALUES        = LVS_COMM_VALUES
           TABLES
                STRATEGY_TABLE     =
             EXCEPTIONS
                  ADDRESS_NOT_EXIST  = 1
                  PERSON_NOT_EXIST   = 2
                  NO_COMM_TYPE_FOUND = 3
                  INTERNAL_ERROR     = 4
                  PARAMETER_ERROR    = 5
                  OTHERS             = 6.
        IF SY-SUBRC <> 0.
          retcode = sy-subrc.
          SYST-MSGTY = 'E'.
          perform protocol_update.
        ENDIF.
      ENDIF.
    convert communication data
      MOVE-CORRESPONDING NAST TO LVS_SNAST.
      MOVE SY-REPID           TO LVF_PROGRAM.
      CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
           EXPORTING
                PI_COMM_TYPE              = LVS_COMM_TYPE
                PI_COMM_VALUES            = LVS_COMM_VALUES
                PI_SCREEN                 = US_SCREEN
              PI_NEWID                  =
                PI_COUNTRY                = US_COUNTRY
                PI_REPID                  = LVF_PROGRAM
                PI_SNAST                  = LVS_SNAST
           IMPORTING
                PE_ITCPO                  = LVS_ITCPO
                PE_DEVICE                 = LVF_DEVICE
                PE_MAIL_RECIPIENT         = LVS_RECIPIENT
                PE_MAIL_SENDER            = LVS_SENDER
           EXCEPTIONS
                COMM_TYPE_NOT_SUPPORTED   = 1
                RECIPIENT_CREATION_FAILED = 2
                SENDER_CREATION_FAILED    = 3
                OTHERS                    = 4.
      IF SY-SUBRC <> 0.
        RETCODE = SY-SUBRC.
        SYST-MSGTY = 'E'.
        PERFORM PROTOCOL_UPDATE.
      ENDIF.
      check retcode eq 0.
    if there is no communication type
      IF  LVS_COMM_TYPE IS INITIAL.
      set device
        CASE NAST-NACHA.
          WHEN '1'.
            LVF_DEVICE = 'PRINTER'.
          WHEN '2'.
            LVF_DEVICE = 'TELEFAX'.
            LVS_ITCPO-TDTELENUM = NAST-TELFX.
            IF NAST-TLAND IS INITIAL.
              LVS_ITCPO-TDTELELAND = US_COUNTRY.
            ELSE.
              LVS_ITCPO-TDTELELAND = NAST-TLAND.
            ENDIF.
            LVS_ITCPO-TDSENDDATE = NAST-VSDAT.
            LVS_ITCPO-TDSENDTIME = NAST-VSURA.
            LVS_ITCPO-TDFAXUSER  = NAST-USNAM.
          WHEN '3'.
            LVF_DEVICE = 'TELETEX'.
            LVS_ITCPO-TDTELENUM = NAST-TELTX.
            IF NAST-TLAND IS INITIAL.
              LVS_ITCPO-TDTELELAND = US_COUNTRY.
            ELSE.
              LVS_ITCPO-TDTELELAND = NAST-TLAND.
            ENDIF.
            LVS_ITCPO-TDSENDDATE = NAST-VSDAT.
            LVS_ITCPO-TDSENDTIME = NAST-VSURA.
         WHEN '4'.
            LVF_DEVICE = 'TELEX'.
            LVS_ITCPO-TDTELENUM = NAST-TELX1.
            IF NAST-TLAND IS INITIAL.
              LVS_ITCPO-TDTELELAND = US_COUNTRY.
            ELSE.
              LVS_ITCPO-TDTELELAND = NAST-TLAND.
            ENDIF.
            LVS_ITCPO-TDSENDDATE = NAST-VSDAT.
            LVS_ITCPO-TDSENDTIME = NAST-VSURA.
          WHEN OTHERS.
            LVF_DEVICE = 'PRINTER'.
        ENDCASE.
      ENDIF.
    fill structure itcpo
      ITCPO = LVS_ITCPO.
    open form
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
              APPLICATION        = 'TX'
                ARCHIVE_INDEX      = TOA_DARA
                ARCHIVE_PARAMS     = ARC_PARAMS
                DEVICE             = LVF_DEVICE
                DIALOG             = ' '
                FORM               = TNAPR-FONAM
                LANGUAGE           = NAST-SPRAS
                OPTIONS            = LVS_ITCPO
                MAIL_SENDER        = LVS_SENDER
                MAIL_RECIPIENT     = LVS_RECIPIENT
              MAIL_APPL_OBJECT   = ' '
              RAW_DATA_INTERFACE = '*'
         IMPORTING
              LANGUAGE           =
              NEW_ARCHIVE_PARAMS =
              RESULT             =
           EXCEPTIONS
                CANCELED           = 1
                DEVICE             = 2
                FORM               = 3
                OPTIONS            = 4
                UNCLOSED           = 5
                MAIL_OPTIONS       = 6
                ARCHIVE_ERROR      = 7
                OTHERS             = 8.
      IF SY-SUBRC NE 0.
        CASE SY-SUBRC.
          WHEN 7.
            RETCODE = SY-SUBRC.
            SYST-MSGID = 'VN'.
            SYST-MSGNO = '096'.
            SYST-MSGTY = 'E'.
            SYST-MSGV1 = NAST-KSCHL.
            SYST-MSGV2 = NAST-KAPPL.
            PERFORM PROTOCOL_UPDATE.
          WHEN OTHERS.
            RETCODE = SY-SUBRC.
            PERFORM PROTOCOL_UPDATE.
        ENDCASE.
      ENDIF.
      SET COUNTRY US_COUNTRY.
    Regards

  • 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

  • Adobe forms - Email and fax

    Hi,
    Does anyone have any idea about how a adobe form(tcode-SFP) can be sent through email and fax?
    I have created an interest form and have to send it accross to the customer maintained in the customer master when i run transaction code FINT.
    Help will be highly appreciated.
    Regards,
    Rasika
    Moderator Message: There is a seperate forum for Adobe Interactive Forms. Please post your question there.
    Edited by: kishan P on Nov 2, 2010 11:26 AM

    Hi,
    Thanks for reply
    The link u mentioned utilises Objects.. but can we send internet mail using this?
    As we cannot change RECIPIENT TYPE in this case in the object.
    I used this format in the program but the attachment is going to EXpress inbox. and goes to my SAP Inbox instead of Email .
    So what changes we need to do for this.
    Alternatively,  can we use FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' for this purpose?
    Edited by: Rohit Pareek on Feb 3, 2009 3:36 PM

  • Email and fax capabilities

    We are moving from optio to xml publisher.
    We were able to send the pdf to printer using pasta. I have no clues how to send the output to Email and Fax server.
    Any pointers in that direction would be appreciated.
    Thanks in advance,
    Suman

    We are moving from optio to xml publisher.
    We were able to send the pdf to printer using pasta. I have no clues how to send the output to Email and Fax server.
    Any pointers in that direction would be appreciated.
    Thanks in advance,
    Suman

  • Send Bid invitation to Email and Fax

    Hi,
    I would like to know if is it possible to send the bid invitation to the vendors via Email and Fax.
    I'm looking in the PPF administration (transaction SPPFCADM) at condition configuration but i'm kidda lost....
    can someone help?
    Thank you,
    Joseph

    Hi,
    Pls see the foll related threads:
    email on  bid invitation publication
    Email on Bid Invitation publication
    Re: Bid Invitation Email Subject
    Re: Bid invitation email content text modification
    Re: email on creation/change of  bid invitation and auction
    Re: Bid invitation email content text modification
    BR,
    Disha.
    Pls reward points for useful answers.

  • 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

  • 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

  • Email and Fax functionality

    I have the following query....
    Working currently on BI7.0 and the reports are currently on the Enterprise Portal of client.
    I want to execute the query on the EP and send the output directly onto several email ids and fax them.
    How can i do the same without using Information BroadCasting in BI7.0
    Regards

    information broadcasting cannot be used as part of specification document.
    Regards

  • To send smartform output through email and fax

    Hi,
    I need to send smartform output through email if the email address is present else if the email address is present then it has to be sent through fax.If both the email address and fax are present,then it has to send an email.
    Now the issue is I am able to send the email and I am getting the message as 'Output was successfully issued'.But the entry corresponding to this is not shown in SOST transaction.
    Can anyone tell me what would be the reason for this?

    HI,
    Try to look in transaction SCOT
    Regards,
    Egle

  • Emailing and Faxing forms to customers

    Hi,
    I want to printing email address and phone number of someone (customer service representative or so)  generating invoice in FB70 on the invoice form that will print and send to customer.
    I also want to send the invoice form to email output or fax output direct to the customer.  I know the email addresses and fax numbers of customers can be maintained in the customer master but how do I configure to send the form direct to the fax or email?
    Can someone give me guidance how the aachieved?
    Thanks
    D

    hi
    Check the distribution property in the property inspector of the Report (Top item in the object browser)
    There you can set the list of files to be produced
    You can specify the file name, type etc
    hopt this will help you
    regards

  • Want to email and fax Remittance Advice

    I want to email or fax Remittance advice after payment run. Does anyone know how to configured this ?

    Hi,
    Check the link below:
    http://sap-img.com/abap/sending-fax-from-abap.htm
    It contains the sample code as to How can you send a fax from within ABAP/4 programs.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • Email and Fax smartform for Sales Order Confirmation

    Dear friends,
    I have a reqirement to mail and fax Order Confirmation ( Smartform ) to the ship to party.
    In NACE, I have created a Output type ZAU1 in which I have considered 5 External send and assigned the driver program and routine. Also I have selected " send immediatly ". I am unable to debug the driver program. I have put breakpoint in the routine ENTRY as well. Please put some light on this.
    with regards,
    Sathar

    This is for standard t-code 'VA02'. In VA02 goto extras->header->texts->edit
    i have put ZAU1... also selected the communication strategy..
    when i save... no process log appears aslo its giving error status...
    Regards
    Sathar

  • 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

    Hi all
    i am dealing with FINT transaction , here i need to copy the standard form F_INTITAR_SF, and make certain changes,
    my req is to send fax and email to the customer according to the req , so i couldnt find the same in the standard tcode, can you please help me out ... where can i find that ...?

    Dear Please kindly read the sap note 956981. You have to use the BADi FI_INT_CUS01.
    Thanks.
    Mauri

Maybe you are looking for

  • Update has killed phone and can't connect to restore

    I have just run the latest update to v4.5.0.174 but the install failed and now the phone only displays an icon that looks like a dialog box with a circle, square and triangle in it, behind a circle with a line through it. I now can't get Desktop Mana

  • On my iphone 4, the display is dark, and the flash is on all the time, but i can still sync my phone with itunes.  what is wrong?

    ok. my iphone 4 (16GB, verizon is carrier, don't know for sure if it is  GSM, CDMA, or a 4s) has no display, the light on the front is always on (the flash) and the phone will still sync with itunes and seems to work...what is wrong?  does it need to

  • What on Earth is this noise (pic & mp3 included)!!!

    I just did an offline bounce of a string part and Logic has fired a nasty burst of noise in the middle of it. I've never ever seen this kind of behaviour on an offline bounce...?! Pic: http://www.flickr.com/photos/76366061@N00/4080438540/ Audio: http

  • Public static BookDB instance() - java book store

    hi, can some one explain what is the use of instance function. ( the code is from sun's Duke bookstore example ) public static BookDB instance () { if (onlyInstance == null) onlyInstance = new BookDB(); return onlyInstance; thanks..

  • Save texts in notifications

    hellow all...... i have some problem.... i tring to to activate the function QM06_FM_TASK_SEND_PAPER_ATTACH when i press the function from the notification and chose the partner to send him e mail i get before a message no' so302 no save text exist.