Telefax in smartforms

Dear All,
I have worked on smartform and also worked on driver program for Purchase order forms.
Problem:i have tried code for telefax by passing 'device' in contrl paramaters and also in the output options in my fname in function module.
solution that i have tried for:
IF nast-tcode EQ 'XTST'."16/09/2009
   wa_cparam-getotf     = 'X'.
   wa_cparam-no_dialog  = 'X'.
   wa_cparam-preview    = 'X'.
  ELSE."16/09/2009
Settings for Print
  IF nast-nacha = 1.
    wa_cparam-device    = 'PRINTER'.
   wa_cparam-getotf     = ''.
    wa_cparam-no_dialog = 'X'.
    CLEAR it_ssfcompop.
Settings for Fax
  ELSEIF nast-nacha = 2.
    wa_cparam-device     = 'TELEFAX'.
   wa_cparam-getotf     = ''.
    wa_cparam-no_dialog  = 'X'.
Settings for Email
  ELSEIF nast-nacha = 5.
     wa_cparam-device     = 'MAIL'.
    wa_cparam-getotf     = 'X'.
    wa_cparam-no_dialog  = 'X'.
  ENDIF.
ENDIF.16/09/2009
*14/09/2009
Ende Formulardruck --------------------------------------------------*
  DATA:fname TYPE rs38l_fnam.
  IF it_ekko-bstyp = 'F'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'ZMMPUR_PO_OUTPUT'
      IMPORTING
        fm_name            = fname
      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.
    CALL FUNCTION fname
EXPORTING
   archive_index                    = toa_dara
  ARCHIVE_INDEX_TAB          =
   archive_parameters               = arc_params
   control_parameters               = wa_cparam
   output_options                   = it_ssfcompop
     IMPORTING
       job_output_info              = w_return              "14/09/2009
       adress_ekf                   =   ig-adress_ekf
       v_belnr2                     =   v_belnr2
       v_xblnr2                     =   v_xblnr2
       v_xblnr3                     =   v_xblnr3
       v_xblnr1                     =   v_xblnr1
       v_belnr3                     =   v_belnr3
       v_belnr1                     =   v_belnr1
       g_abtbz                      =   g_abtbz
       var                          =   var
      TABLES
         it_ekko                    = it_ekko
         it_ekpo                    = it_ekpo
         it_tinct                   = it_tinct
         it_lfm1                    = it_lfm1
         it_t163d                   = it_t163d
         it_t165m                   = it_t165m
         it_t001                    = it_t001
         it_t166u                   = it_t166u
         it_ekpa                    = it_ekpa
         it_t024                    = it_t024
         it_t161n                   = it_t161n
    IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF nast-nacha  = 5.
      li_otfdata[] = w_return-otfdata[].
    ENDIF.
Please help me if there is any solution other than this.only for fax as mail is working.
Regards,
Bhavani.

Hi,
The error is coming when I am executing the program
that is generating the form.
I wrote a program that is generation a smartform but insted of device PRINTER i set the device to TELEFAX. and there is an option in smartforms transaction to call an SFP form insted of the smartform : Utilities->Migration->Interactive Form
->Switch runtime.
Thanks,
Naama

Similar Messages

  • Problems when trying to send a smartform through fax

    Hi,
    Im currently confronting a problem when sending smartforms through fax to multiple recipients.
    This is the scenario Im working on:
    The client needs to be able to send a document, could be a PO or invoices, to diferent recipients at the same time. So far in case of purchase orders, we have been able to find the respective faxes and emails for each of the partner functions.
    Functionality for email is working as desired but when sending faxes I have problems.
    Reviewing the output through SOST I get all my receipients which are email and faxes. Emails are fine since it creates a PDF attachment with the order and all of its details.
    For fax I get the same even though the paramenters are set for fax.
    Here is my code if you could please help me here on this one.
    SELECT lifn2 FROM EkPA into l_ekpa-lifn2
                 WHERE EBELN = a_EBELN.
        APPEND l_EKPA.
      ENDSELECT.
      SELECT adrnr
        FROM lfa1
        INTO itab-q_adrnr
        FOR ALL ENTRIES IN l_ekpa WHERE lifnr = l_ekpa-lifn2.
        APPEND itab.
      ENDSELECT.
    *& End of partner address
    *& Selection of Address or Fax number from ADR3 & ADR6 according to ADRNR
    *& Nato
      IF sy-subrc EQ 0.
        loop at itab.
          SELECT SINGLE smtp_addr INTO (itab-q_mail)
       from adr6 where addrnumber = itab-q_adrnr and flg_nouse eq space.
          IF itab-q_mail ne Space.
            Move 'U' to itab-q_typ2(1).
            Move 'X' to itab-q_express(1).
          Move 'EXT' to itab-XOBJT.
          ENdIF.
       SELECT SINGLE FAXNR_LONG INTO (itab-q_fax)
          SELECT SINGLE country FAX_NUMBER INTO (itab-q_cty, itab-q_fax )
       from adr3 where addrnumber = itab-q_adrnr and flg_nouse eq space.
          If itab-q_fax ne space.
            Move 'F' to itab-q_typ(1).
            Move 'TELEFAX' to itab-q_com.
          Endif.
          Modify itab.
        endloop.
    *&  END of ITAB
        CLEAR : DOC_CHNG.
        REFRESH LINES.
        IF NAST-NACHA eq '7'.
    * Fill both the fax & email Receiver lists
          clear:   reclist, reclist2.
          refresh: reclist, reclist2.
    *& loop table itab to update receipient list in table Reclist
    *& Nato
          loop at itab.
            IF not itab-q_typ is initial.
             concatenate itab-q_cty itab-q_fax into reclist2-RECNAM separated by space. "FAX NUMBER
              move itab-q_fax to reclist2-receiver. "FAX NUMBER
    *&>>>>>>>>>>>>>>>>>>>new entry for testing nato 080206<<<<<<<<<<<&
              move itab-q_cty to RECLIST2-COUNTRY.        "Country Code
              move itab-q_fax to Reclist2-FAX.            "Fax number
    *&>>>>>>>>>>>>>>ENd of entry<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<&
              move itab-q_typ to REClist2-REC_TYPE.  "Communication type for fax
          move itab-q_EXPRESS to Express.        "comment for testing
              move itab-q_com to REClist2-COM_TYPE.
              Move 'X' to reclist2-NOTIF_DEL.
             Move 'TELEFAX' to reclist2-SNDART.    "TYPE OF DEVICE
              Move a_ebeln to sood-OBJDES.              "new addition for testing nato
              append Reclist2.
            endif.
            IF not itab-q_typ2 is initial.
              move itab-q_mail to REclist-receiver.  "SMT ADDRESS
              move itab-q_typ2 to REClist-REC_TYPE.
              move itab-q_EXPRESS to REClist-express.
              move 'X' to reclist-TO_ANSWER.
              Move a_ebeln to sood-OBJDES.              "new addition for testing nato
          move itab-q_com to REClist-COM_TYPE.   "comment for testing only
              append Reclist.
            Endif.
            move reclist-receiver to address.
          endLoop.
    *& END OF RECipient
        ENDIF.
        DOC_CHNG-OBJ_DESCR  = nast-objky.
      ELSE.
        IF RECLIST IS INITIAL.
         LOOP AT reclist INTO RECIPIENT .        " This logic might get commented or deleted. Nato 08/01/06
         ENDLOOP.
        ENDIF.
        DOC_CHNG-OBJ_DESCR  = L_TITLE.
      ENDIF.
      IF RECLIST[] IS INITIAL.
        MESSAGE E573(VE) RAISING RECEIVER_NOT_FOUND.
      ENDIF.
    *& New entry to determine path according to communication
    *& type
    *& If comm type eq U follow convert_otf
    *& then Read text, finaly send API
    *& If comm type eq F follow path to "Convert OTF & FAX
    *& Nato 080106
      REFRESH : HOTFDATA, LT_SOLIX, OBJBIN.
      LOOP AT JOB_OUTPUT_INFO-OTFDATA INTO HOTFDATA.
        APPEND HOTFDATA.
      ENDLOOP.
    *& Prepare content to be converted to PDF format
    *& nato
      CALL FUNCTION 'CONVERT_OTF'
           EXPORTING
                FORMAT                = 'PDF'
                    MAX_LINEWIDTH         = 132
           IMPORTING
                BIN_FILESIZE          = DOC_SIZE
                BIN_FILE              = LD_BINFILE
           TABLES
                OTF                   = HOTFDATA
                LINES                 = HTLINE
           EXCEPTIONS
                ERR_MAX_LINEWIDTH     = 1
                ERR_FORMAT            = 2
                ERR_CONV_NOT_POSSIBLE = 3
                OTHERS                = 4.
    *& new entry just for test today 080306
    *&nato
    *endif.
    *&--end of entry--
      I = 0.
      N = XSTRLEN( LD_BINFILE ).
      WHILE I < N.
        LT_SOLIX-LINE = LD_BINFILE+I.
        APPEND LT_SOLIX.
        I = I + 255.
      ENDWHILE.
    *& end of convertion pdf
      LOOP AT LT_SOLIX INTO WA_SOLIX.
        CLEAR WA_SOLI.
        ASSIGN WA_SOLI TO <PTR_HEX> CASTING.
        MOVE WA_SOLIX TO <PTR_HEX>.
        APPEND WA_SOLI TO OBJBIN.
      ENDLOOP.
    *& Prepare send mail
      CLEAR : NAME, DOCNAME.
      REFRESH : OBJTXT, OBJPACK.
      CONCATENATE NAST-KAPPL NAST-KSCHL INTO NAME.
      CONDENSE NAME.
      IF NAST-NACHA NE '7'.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
      CLIENT                        = SY-MANDT
            ID                            = 'STAM'
            LANGUAGE                      = SY-LANGU
            NAME                          = NAME
            OBJECT                        = 'OCS'
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
          TABLES
            LINES                         = LINES
       EXCEPTIONS
         ID                            = 1
         LANGUAGE                      = 2
         NAME                          = 3
         NOT_FOUND                     = 4
         OBJECT                        = 5
         REFERENCE_CHECK               = 6
         WRONG_ACCESS_TO_ARCHIVE       = 7
         OTHERS                        = 8
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      CONCATENATE NAST-OBJKY '.PDF' INTO DOCNAME .
      CONDENSE DOCNAME.
    *endif.      "temp nato -080406
      if reclist-rec_type eq 'U'.
        DOC_CHNG-OBJ_NAME   = 'Delivery'.
        LOOP AT LINES.
          OBJTXT = LINES-TDLINE.
          APPEND OBJTXT.
        ENDLOOP.
        DESCRIBE TABLE OBJTXT LINES TAB_LINES.
        IF TAB_LINES > 0.
          READ TABLE OBJTXT INDEX TAB_LINES.
          DOC_CHNG-DOC_SIZE  = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
        ENDIF.
        CLEAR OBJPACK-TRANSF_BIN.
        OBJPACK-HEAD_START = 1.
        OBJPACK-HEAD_NUM   = 0.
        OBJPACK-BODY_START = 1.
        OBJPACK-BODY_NUM   = TAB_LINES.
        OBJPACK-DOC_TYPE   = 'RAW'.
        APPEND OBJPACK.
        DESCRIBE TABLE OBJBIN LINES TAB_LINES.
        OBJHEAD            = DOCNAME.
        APPEND OBJHEAD.
        OBJPACK-TRANSF_BIN = 'X'.
        OBJPACK-HEAD_START = 1.
        OBJPACK-HEAD_NUM   = 1.
        OBJPACK-BODY_START = 1.
        OBJPACK-BODY_NUM   = TAB_LINES.
        OBJPACK-DOC_TYPE   = 'PDF'.
        OBJPACK-OBJ_NAME   = 'Delivery'.
    OBJPACK-OBJ_DESCR  = NAST-OBJKY.
        OBJPACK-OBJ_DESCR  = A_EBELN.
        OBJPACK-DOC_SIZE   = TAB_LINES * 255.
        APPEND OBJPACK.
        break nhernandez.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
             DOCUMENT_DATA                    = DOC_CHNG
        PUT_IN_OUTBOX                    = 'X'
      COMMIT_WORK                      = ' '
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
          TABLES
           PACKING_LIST                     = OBJPACK
           OBJECT_HEADER                    = OBJHEAD
           CONTENTS_BIN                     =  OBJBIN
           CONTENTS_TXT                     =  OBJTXT
      CONTENTS_HEX                     =
      OBJECT_PARA                      =
      OBJECT_PARB                      =
            RECEIVERS                        =  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
        IF SY-SUBRC <> 0.
          MESSAGE E081(ZGLO) WITH SY-SUBRC RAISING MAIL_SENDING_ERROR.
        ENDIF.
      endif.
    AM I missing something?

    Hi Nat,
    You can check this link which shows how to use the PRINT_TEXT for sending fax.
    http://www.sap-img.com/abap/sending-fax-from-abap.htm
    Also you can check these
    Smartforms
    Sending Smartforms through Fax
    Sending SMARTFORM output to FAX gateway
    How to fax a smartform?
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
    ftp
    Cheers
    VJ

  • Smartform faxing problem - No delivery to FAX

    Hi gurus,
    I'm sending a smartform by fax in a company that has never used smartforms before (using ECC6). The output goes to sost but upon releasing it it fails with the error messages "No delivery to FAX" and "Document Conversion failed". On checking with our basis team it appears that the format of the file sent is not right and fails at the point of sending. Existing sapscripts and standard output types are faxed correctly. Both emailed and printed versions of the output are working correctly.
    The smartform is called from a custom output type on the purchase order. I've checked OSS and apart from an older note nothing seems to exist there. This is the code I am using to send it. I have been searching for a solution to this without any success for some time. What am I doing wrong here?
    If this is a fax output
      IF nast-nacha = 2.
        ls_cont_par-device       = 'TELEFAX'.
        ls_cont_par-no_dialog    = 'X'.
        ls_cont_par-getotf       = 'X'.
        ls_cont_par-no_open      = ' '.
        ls_cont_par-no_close     = ' '.
        ls_cont_par-langu        = 'E'.
        ls_cont_par-preview      = ' '.
        ls_options-tdtitle       = gv_con_subject.
        ls_options-tdteleland    = nast-tland.
        ls_options-tdtelenum     = nast-telfx.
        ls_options-tdtelenume    = nast-telfx.
        ls_options-tdschedule    = 'IMM'.
        ls_options-tdsenddate    = sy-datum.
        ls_options-tdsendtime    = sy-timlo.
        ls_options-faxformat     = 'PDF'.
        ls_options-tdnoprev      = 'X'.
      Call the smartform output
        CALL FUNCTION lv_function_call
          EXPORTING
            control_parameters = ls_cont_par
            output_options     = ls_options
            user_settings      = ''
            i_language         = sy-langu
            i_values           = gs_values
          IMPORTING
            job_output_info    = ls_job
          TABLES
            it_po_items        = gt_po_items
          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.
        lt_otf_data[] = ls_job-otfdata[].
        ls_faxoptions-tdotftype  = 'ASC'.
        ls_faxoptions-faxformat  = 'ASC'.
        ls_faxoptions-tddevice   = 'TELEFAX'.
        ls_faxoptions-tdteleland = nast-tland.
        ls_faxoptions-tdtelenum  = nast-telfx.
        ls_faxoptions-tdsenddate = sy-datum.
        ls_faxoptions-tdsendtime = sy-uzeit.
        ls_faxoptions-tdcover    = ' '.
        ls_faxoptions-tdtitle    = nast-objky.
        ls_faxoptions-tdcopies   = 1.
        ls_faxoptions-tdnewid    = 'X'.
        ls_faxoptions-tddataset  = 'ZP01 PO Output'.
        ls_faxoptions-tdsuffix1  = 'FAX'.
        ls_faxoptions-tdsuffix2  = sy-uname.
        ls_faxoptions-tdimmed    = 'X'.
        ls_faxoptions-tdlifetime = 8.
        ls_faxoptions-tdcover    = 'ZP01'.
        ls_faxoptions-tdcovtitle = 'ZP01'.
        ls_faxoptions-tdfaxuser  = sy-uname.
        CALL FUNCTION 'CONVERT_OTF_AND_FAX'
          EXPORTING
            faxoptions   = ls_faxoptions
            user         = ls_faxoptions-tdfaxuser
          IMPORTING
            fax_ok       = ok
            office_objid = off_obj
            msgno        = msgno
            msgid        = msgid
            msgv1        = msgv1
            msgv2        = msgv2
            msgv3        = msgv3
            msgv4        = msgv4
          TABLES
            otf          = lt_otf_data.
        IF ok = 'X'.
          MESSAGE s459(td) WITH off_obj-objno. "fax request was succ. created AS
        ELSE.l
          MESSAGE ID msgid TYPE 'E' NUMBER msgno
          WITH msgv1 msgv2 msgv3 msgv4
          RAISING send_error.
        ENDIF.
    ENDIF.

    Hi,
    if you check via the debugger, are the parameters lt_otf_data and ls_job-otfdata[ ] filled with valid OTF data before the call to function 'CONVERT_OTF_AND_FAX'?
    regards,
    Aidan

  • PDF to TELEFAX using BCS

    We have a requirement to send an Adobe PDF form to a FAX. I talked to an Adobe guy and told me that was possible, there is no need to reconvert in OTF, before posting this I search on SDN and found nothing.
    First I am using the ABAP CL_BCS (Business Communication Services) class to send PDF has a fax, this is the same as for email, so far so good, it works for email but not for FAX, I am missing a piece in the puzzle but I think I am very close, my FAX is generated and visible in transaction SOST, but the light is red.
    The only difference between FAX and EMAIL using BCS is when you create the recipient, it should looks something like this for FAX
    recipient = cl_cam_address_bcs=>create_fax_address(
                  i_country = <lf_recipient>-c_country
                  i_number  = <lf_recipient>-c_fax_number ).
    Interrogation
    In transaction SCOT, we have 2 nodes under TELEFAX, both active. When I saw my FAX in SOST, it's red, I can see by which node id it was assigned, how the system determine that ?
    Wen you click on a telefax node, click on the set button where the checkbox for fax is, your are in the restriction dialog window, this is where you set the country and output type PDF, RAW, PCL, for example the first drow down is for SAPscript / Smartforms, we currently have PCL, it should be PDF ? But if I change the sapscript and smartforms maybe won't work ?
    thanks for help
    Alex
    If we already have a node in transaction SCOT under TELEFAX, but this node is setup has PCL for SAPscript/Smartforms in the restriction, should we change it for PDF in the dropdown list, my guest is yes! But if we do, the smartforms & sapscript output will not fax correctly cause they are PCL, how can we have 2 nodes for PCL / PDF
    you help is very welcome,
    regards,
    Alexandre Giguere

    Hi I tried with the lowercase 's' in saveAs(),
    I am still getting the same error
    'UnsupportedValueError: Value is unsupported. ===> Parameter cConvID.'
    Wierd thing is I am not getting the 'saveAs()' method as an option for the JSObj at all I am just forcibily typing it. May be, do you guys think I am missing any reference. I have a project reference for the Acrobat 9 com component (Component Name: Acrobat Typelib version 1.0, C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.tlb
    Please help.
    My exact code is:
    Dim JSObj As Object, strPDFText As String
    ' Create Acrobat Application object
    PDFApp = CreateObject("AcroExch.App")
    ' Create Acrobat Document object
    PDDoc = CreateObject("AcroExch.PDDoc")
    ' Open PDF file
    PDDoc.Open("D:\Applications\Test_winapp\PDFUtility\WindowsApplication1\WindowsApplication 1\sample.pdf") ' Path of some PDF you want to open
    ' Hide Acrobat application so everything is done in silent mode
    PDFApp.Hide()
    ' Create Javascript bridge object
    JSObj = PDDoc.GetJSObject()
    ' Create Tiff file
    JSObj.saveAs("D:/Applications/sample.tiff", "com.adobe.Acrobat.tiff")
    PDDoc.Close()
    PDFApp.CloseAllDocs()
    ' Clean up
    System.Runtime.InteropServices.Marshal.ReleaseComObject(JSObj)
    JSObj = Nothing
    System.Runtime.InteropServices.Marshal.ReleaseComObject(PDFApp)
    PDFApp = Nothing
    System.Runtime.InteropServices.Marshal.ReleaseComObject(PDDoc)
    PDDoc = Nothing

  • Smartform to PDF conversion having issue with Russian address

    We are having a business situation we are the invoice in English language and the the address of ship-to party and sold-to party in Russian.
    The issue we face is.
    When the  smartform is converted to PDF the Russian specific characters are missing in the PDF output. The same are perfect in the smart form print preview.
    we are using   CONVERT_OTF function module and we are getting the Russian characters correctly in the table parameter OTF.
    We are using "SX_TABLE_LINE_WIDTH_CHANGE" and " SO_DOCUMENT_SEND_API1"
    function module to attach and mail the pdf.
    In the PDF we are missing the Russian specific characters .
    For Example in "Sedláčkova čč" the output is "Sedláčkova    " means "čč" is mising
    Thanks in advance
    Regards
    Joby

    Hi,
    As described in note 999712 - PDF conversion for Unicode, there is a new unicode PDF converter PDFUC.
    It depends on the SAP Version if you have to install the device type or not. You can check also via SPAD -> Full Administration -> Device Types -> Display.
    You can pass the device type in the output options. I used:
    SSFCTRLOP-no_dialog   = 'X'.
    SSFCTRLOP-getotf      = 'X'.
    SSFCTRLOP-langu       = 'EN'.
    SSFCOMPOP-tdprinter = 'PDFUC'.
    If you specify a device other than printer in the control options like SSFCTRLOP-device      = 'TELEFAX'., above will not work as
    SSFCOMPOP-tdprinter is only evaluated for printer.
    You have to check in SCOT -> Settings -> Device Types for Format Conversion.
    You can make a general entry or for a specific language:
    PDF                           SAPscript/Smart Forms    PDFUC
    PDF    EN    English    SAPscript/Smart Forms    PDFUC
    Let me know if you get this working.
    Jeroen.

  • Sending smartform as faxMessage transferred by node to communication system

    Hi All,
    I want to send the smartform output as FAX . So I am following below steps:
    1. Call the smartform function module.
    2. get the otf format
    3. call the function module "CONVERT_OTF_AND_FAX"
    4. Commit work
    5. submit RSCONN01 with MODE = 'FAX' with OUTPUT = 'X' and return.
    When I checked in SOST, it gives the status text as "Message transferred by node to communication system"
    And the last transmission history is "Document deleted from queue".
    And FAX doesn't come.
    How to do this.
    rgds,
    MAdhuri

    Hi
             To send the smart form output as Fax, Do the following steps
              a) Call the function module SSF_FUNCTION_MODULE_NAME give the form         
                  name, then we gets the function module name         
              b) To get the fax number for a particular customer, Go to KNA1 table get the 
                  fax number "TELFX" field by giving the customer number
              c) Get the communication method (DEFLT_COMM) from ADRC table by giving 
                  the address number which is getting from KNA1 table
              d)  If the communication method (DEFLT_COMM) = "FAX" then
                   DATA:  Control_parameters type ssfctrlop,
                              Output_options       type ssfcompop,
                               Control_parameters-device = "TELEFAX".
                               Control_parameters-preview   = ' '.
                               Control_parameters-no_dialog = "X"
                               Output_options-tdtelenum = KNA1-TELFX.
                               Output_options-tdnoprev = "X".
               Call the function module by giving the name as getting in step (a). And pass the 
               control_parameters and output_options
             Try with this logic. It will work
    Thanks
    Srikanth(sriiiiiiiii)

  • To fax the smartform output

    Hi,
    Actually my requirement is to send the smartform through email using medium external send..If the email Id of the recipient is not present then the smarform has to be sent through fax using medium external send.So I have changed the value of nast-nacha from 5 to 2 and added the following code to my program.
    ls_control_param-device = 'TELEFAX'.
    ls_control_param-preview = 'X'.
    ls_control_param-no_dialog = 'X'.
    ls_control_param-getotf = 'X'.
    ls_composer_param-tdtitle = 'Advance shipment notification'.
    ls_composer_param-tdtelenum = lv_telfx.
    ls_composer_param-tdteleland = lv_land1.
    ls_composer_param-tdschedule = 'IMM'.
    ls_composer_param-tdsenddate = sy-datum.
    ls_composer_param-tdsendtime = sy-timlo.
    CALL FUNCTION lf_fm_name
    EXPORTING
    archive_index = toa_dara
    archive_parameters = arc_params
    control_parameters = ls_control_param
    mail_appl_obj =
    mail_recipient = lv_recipient
    mail_sender = lv_sender
    output_options = ls_composer_param
    user_settings = ' '
    vttkvb = vttkvb
    IS_DLV_DELNOTE = LS_DLV_DELNOTE
    is_nast = nast
    IMPORTING
    document_output_info = document_output_info
    job_output_info = ls_return
    job_output_options = job_output_options
    TABLES xvttp = xvttp
    xvtts = xvtts
    xvtsp = xvtsp
    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.
    While debugging i am not finding any error in the program.But in SOST transaction,it is not showing any entry for the smartform o/p which is sent through fax.
    Could anyone give me a proper solution for this?

    Hi,
    All the configuration is done in SCOT transaction to send the smartform through fax.The issue is I am able to send the smartform through fax.I am able to see that in SOST transaction.But the output is coming in abap list format.It should come in OTF format.What can be done for this?
    Regards,
    Hema

  • Sending Smartform as fax

    Hi All ,
    I have a requirement in which i need to send Smartform output as a Fax . fax number will be filled dynamically in the program in a  internal table .
    Any pointer to will be useful .
    If You can send a sample code it would be best ,
    Regards
    Saurabh Garg

    I don't have any code but this is the notes i've tought it would be helpfull to you. ANd before this your system should be configured for the Fax settings.
    Another important field is DEVICE where in the type of output type device is specified. The possible set of values is PRINTER, TELEFAX and MAIL. The default is PRINTER. If the TELEFAX is chosen it shows a dialog box where in all the fax parameters can be entered. This dialog box can also be suppressed. And the preview option can be enabled. The problem here is it will not give any exception or prompt the user to enter the Fax Number and its parameters even if they are not maintained properly. So take care of maintaining them in the OUTPUT_OPTIONS parameter.
    Key Note: Fax the output.
              TDTELELAND used to refer to the 2 digit country code. The country key                contains information which the system uses to check entries such as the                length of the postal code or bank account number.
       TDTELENUM and TDTELENUME Telecommunication number, as it is       dialed in the receiving country. The country dialing code is      automatically      added. Alternatively an '&' can be used as the first character to disable      number testing and number formatting.  In this case you must enter the      complete number, inclusive of country dialing code but without the      exchange.
         TDFAXUSER SAP: Office user name. Default is user’s name.
         TDSCHEDULE: Using this field the send mode can be set like whether it       is to be send immediately ( Value ‘IMM’)or at night ( Value ‘NIG’).
         TDSENDDATE: This is requested send date.
         TDSENDTIME: This is requested send time.
         BCS_REQST: This contains the mode in which the request status is sent      back. If it is set to ‘N’ no status is to be returned, if ‘E’ only error status is      to be returned and if ‘A’ all statuses are to be returned.
         BCS_STATUS: Setting for Which Statuses Are Reported by Mail. If it is           set to ‘N’ no status is to be returned, if ‘E’ only error status is     to be returned and if ‘A’ all statuses are to be returned.
         BCS_COMMIT: This is a general flag that is specifically does not have any use. This can be used to pass any other flag from the program.

  • Smartform ---- email/fax

    Hi All,
       We have developed smartform  from scratch in PDF. It will trigger from vt02n,The requirement is this generated PDF file should be send thru via email/fax.I want to know the code for this please send me the code and share some ideas.

    <b>1. PDF & Mail</b>
    You need to get the spool of smartform output and convert it to PDF using an FM & then send it as email.
    Please refer following link for a sample program :
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    <b>2. Fax</b>
    Use FM 'PRINT_TEXT' for FAX.
    Pass parameters as follows :-
    Exporting
    DEVICE = 'TELEFAX'  " For printing call the same FM again & Pass printer name
    DIALOG = 'X'  " To get the option of Print Preview along with the fax number on dialog box
    HEADER = POPT
    Importing
    RESULT = PRES " of type ITCPP
    Tables
    LINE = ITAB_DATA.
    POPT is structure of type ITCPO.
    Populate following values in POPT :
    POPT-TDNEWID = 'X'
    POPT-TDIMMED = 'X'
    POPT-TDLIFETIME = 8 "To keep 8 days in spool
    POPT-TDTELENUM = <Fax Number> " Without country code
    POPT-TELELAND = <Country> " Country code
    Best regards,
    Prashant Patil

  • Sending Smartforms through Fax

    Hi,
      Can anybody suggest me, how to send the smartform through FAX? The output need not be printed instead it should be sent as FAX.
    Thanks and Regards,
    Lakshmi

    Hi,
    Check this sample code helps your purpose.If so,kindly reward points by clicking the star on the elft of reply,if it helps.
    The following program shows you how to send a fax from within ABAP/4. The report is delivered
    in the standard system and is used in Transaction SCOM for the function "Send test fax".
    Only the method via the call of SAPscript with DEVICE='TELEFAX', described below, ensures the
    generation of a correct transmission request, independent of the R/3 release and of the used
    fax server solution and its configuration.
    The regular printing (for example, with NEW-PAGE PRINT ON...) on an output device created in
    the spool administration of the device class 'Telefax' does generally not work!
    REPORT RSKSENDF MESSAGE-ID SK.
    Test report to send a test fax
    sends a fax to the number <TO_CNTRY>-<TO_NMBER>
    containing an automatically generated message text.
    TABLES: USR03.
    PARAMETERS: TO_CNTRY LIKE T005-LAND1 OBLIGATORY,
    TO_NMBER LIKE TSP01-RQTELENUM OBLIGATORY,
    FROM_USR(30) TYPE C DEFAULT SY-UNAME,
    TO_RECIP(30) TYPE C DEFAULT SY-UNAME.
    SAPscript content ITAB
    DATA: BEGIN OF TEST_DOC OCCURS 10.
    INCLUDE STRUCTURE TLINE.
    DATA: END OF TEST_DOC.
    SAPscript header struct
    DATA BEGIN OF HEADER.
    INCLUDE STRUCTURE THEAD.
    DATA END OF HEADER.
    INITIALIZATION.
    get county from user addres in usr03
    system->user profile->user address
    check if not empty
    SELECT SINGLE * FROM USR03 WHERE BNAME = SY-UNAME.
    IF SY-SUBRC = 0 AND USR03-LAND1 <> SPACE.
    TO_CNTRY = USR03-LAND1.
    ENDIF.
    START-OF-SELECTION.
    PERFORM FILL_UP_TEST_DOC.
    PERFORM SHOW_TEST_DOC.
    AT PF08.
    PERFORM SEND_FAX TABLES TEST_DOC USING TO_CNTRY
    TO_NMBER.
    AT SELECTION-SCREEN ON TO_NMBER.
    PERFORM CHECK_NUMBER USING TO_CNTRY TO_NMBER.
    *& Form CHECK_NUMBER
    FORM CHECK_NUMBER USING
    COUNTRY
    NUMBER.
    DATA: SERVICE LIKE TSKPA-SERVICE VALUE 'TELEFAX',
    LEN LIKE SY-FDPOS.
    FIELD-SYMBOLS <P>.
    windows GUI push the ? from mandatory input instead
    of overwriting it
    LEN = STRLEN( TO_NMBER ).
    IF LEN > 1.
    SUBTRACT 1 FROM LEN.
    ASSIGN TO_NMBER+LEN(1) TO <P>.
    IF <P> = '?'.
    <P> = SPACE.
    ENDIF.
    ENDIF.
    official check FM
    CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'
    EXPORTING
    COUNTRY = COUNTRY
    NUMBER = NUMBER
    SERVICE = SERVICE.
    on old 21?/22? release you may have to handle the
    exception
    because the Function uses RAISE instead of
    MESSAGE... RAISING....
    ENDFORM. " CHECK_NUMBER
    *& Form FILL_UP_TEST_DOC
    fills test text in itab TEST_DOC *
    real life example needs to get real life data *
    FORM FILL_UP_TEST_DOC.
    DATA: DATUM(12) TYPE C,
    UZEIT(10) TYPE C.
    SAPscript initialization
    of course, you may want to set a few parameter
    (FORM,LAYOUT,....)
    CALL FUNCTION 'INIT_TEXT'
    EXPORTING
    ID = 'ST '
    LANGUAGE = SY-LANGU
    NAME = 'FOO-BAR'
    OBJECT = 'TEXT'
    IMPORTING
    HEADER = HEADER
    TABLES
    LINES = TEST_DOC
    EXCEPTIONS
    OTHERS = 1.
    IF SY-SUBRC <> 0.
    MESSAGE A400 WITH 'INIT_TEXT'.
    ENDIF.
    PERFORM ADD_EMPTY_LINE.
    WRITE: SY-DATUM TO DATUM.
    WRITE: SY-UZEIT TO UZEIT.
    PERFORM ADD_LINES USING 'This is test Telefax'(001)
    DATUM UZEIT.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'From: &'(002) FROM_USR SPACE.
    PERFORM ADD_LINES USING 'To: &'(003) TO_RECIP SPACE.
    PERFORM ADD_LINES USING 'Fax number: & &'(004)
    TO_CNTRY TO_NMBER.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'This is a test fax send by Report RSKSENDF'(005)
    SPACE SPACE.
    PERFORM ADD_LINES USING 'on SAP system & '(006)
    SY-SYSID SPACE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'the quick brown fox jumps over the lazy dog.'(101)
    SPACE SAPCE.
    PERFORM ADD_LINES USING
    'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'(102)
    SPACE SAPCE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'End of test'(007) SPACE
    SPACE.
    ENDFORM. " FILL_UP_TEST_DOC
    *& Form ADD_LINES
    printf a line an appends it in test_doc *
    --> cformat format.
    --> p1 param1
    --> p2 param2
    FORM ADD_LINES USING CFORMAT P1 P2.
    TEST_DOC-TDFORMAT = '/'.
    TEST_DOC-TDLINE = CFORMAT.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P1 INTO TEST_DOC-TDLINE.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P2 INTO TEST_DOC-TDLINE.
    ENDIF.
    ENDIF.
    APPEND TEST_DOC.
    ENDFORM. " ADD_LINES
    *& Form ADD_EMPTY_LINE
    appends an empty line to test_doc *
    FORM ADD_EMPTY_LINE.
    TEST_DOC-TDFORMAT = '/'.
    CLEAR TEST_DOC-TDLINE.
    APPEND TEST_DOC.
    ENDFORM. " ADD_EMPTY_LINE
    *& Form SHOW_TEST_DOC
    lists the test doc for aproval *
    *>>>> this is for fun only because PRINT_TEXT also
    offers a preview *
    FORM SHOW_TEST_DOC.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
    WRITE: / 'Test fax would look like this:'(020).
    ULINE.
    SKIP.
    LOOP AT TEST_DOC.
    IF TEST_DOC-TDLINE <> SPACE.
    WRITE:/ TEST_DOC-TDLINE.
    ELSE.
    SKIP.
    ENDIF.
    ENDLOOP.
    SKIP.
    ULINE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE: 'Press PF8 to send it'(021).
    ENDFORM. " SHOW_TEST_DOC
    *& Form SEND_FAX
    send fax by calling SAPscript *
    Note: Instead of using PRINT_TEXT you may also *
    call OPEN_FORM / WRITE_FORM_LINES / CLOSE_FORM, *
    this allows you to use a similar program structure *
    as with NEW-PAGE PRINT ON / WRITE / NEW-PAGE PRINT
    OFF *
    FORM SEND_FAX
    TABLES DOC2FAX STRUCTURE TEST_DOC
    USING COUNTRY
    NUMBER.
    DATA: SID(5) TYPE N.
    DATA BEGIN OF POPT.
    INCLUDE STRUCTURE ITCPO.
    DATA END OF POPT.
    DATA BEGIN OF PRES.
    INCLUDE STRUCTURE ITCPP.
    DATA END OF PRES.
    CLEAR POPT.
    POPT-TDCOPIES = 1. " one copy
    POPT-TDDEST = " done internaly by script,
    POPT-TDPRINTER = " do not fill !!!
    POPT-TDNEWID = 'X'. " do not reuse old spool request
    POPT-TDDATASET = 'TEST'(022). " fill as you want
    POPT-TDSUFFIX1 = 'FAX'(023). " fill as you want
    POPT-TDSUFFIX2 = SY-UNAME. " fill as you want
    POPT-TDIMMED = 'X'. " send now
    POPT-TDLIFETIME = 8. " keep 8 days in spool
    POPT-TDTELENUM = NUMBER. " number without country code
    POPT-TDTELELAND = COUNTRY. " country of recipient
    POPT-TDCOVER = 'test fax'(024).
    POPT-TDCOVTITLE = 'test fax'(024).
    POPT-TDIEXIT = 'X'.
    CALL FUNCTION 'PRINT_TEXT'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX = ' '
    ARCHIVE_PARAMS = ' '
    DEVICE = 'TELEFAX' "<<< here we say: fax it !
    DIALOG = 'X'
    HEADER = HEADER
    OPTIONS = POPT
    IMPORTING
    RESULT = PRES
    TABLES
    LINES = DOC2FAX
    EXCEPTIONS
    OTHERS = 01.
    do not bother with exception in sample code
    CANCELED = 01
    DEVICE = 02
    FORM = 03
    OPTIONS = 04
    UNCLOSED = 05
    UNKNOWN = 06
    FORMAT = 07
    TEXTFORMAT = 08
    EXTERNAL = 09.
    IF SY-SUBRC = 0.
    arriving here means we could send:
    SID = PRES-TDSPOOLID.
    IF SID > '00000'.
    MESSAGE S433 WITH SID.
    ENDIF.
    LEAVE .
    ELSE.
    do not bother with exception in sample code
    MESSAGE A400 WITH 'PRIN_TEXT'.
    ENDIF.
    ENDFORM. " SEND_FAX

  • Problem: Smartform not sent as Fax

    I am trying to send a fax but it is not going. I am encountering no error.
    Please help, its urgent.   Thank you.
    Below is the code i am using .
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            FORMNAME           = c_formname
          IMPORTING
            FM_NAME            = v_fmname
          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.
    wa_ctrlop-NO_DIALOG = 'X'.
    wa_ctrlop-DEVICE = 'TELEFAX'.
    wa_ctrlop-PREVIEW = 'X'.
    wa_ctrlop-GETOTF = 'X'.
    *---SET OUTPUT PARAMETERS FOR FAX
    wa_compop-TDTELELAND = 'MU'.
    wa_compop-TDTELENUM = '2304021800'.
    wa_compop-TDSCHEDULE = 'IMM'.
    wa_compop-TDSENDDATE = SY-DATUM.
    wa_compop-TDSENDTIME = SY-TIMLO.
    *---NOW CALL THE GENERATED FUNCTION MODULE
    CALL FUNCTION v_fmname
    EXPORTING
      V_FLAGI            = v_flagi
      V_FLAGP            = v_flagp
      V_BUKRS            = v_bukrs
      WA_HEADER_DETAILS  = wa_header_details
    ARCHIVE_INDEX =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS = wa_ctrlop
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS = wa_compop
    USER_SETTINGS = WA_USER_SETTING
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO = wa_return
          TABLES
    *-- passing internal tables
            I_ITEMS            = i_lips
            I_PALLETS          = i_pallets
    *-- passing internal tables
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    COMMIT WORK.
    IF sy-subrc EQ 0.
        MESSAGE i001.
    ENDIF.

    Looking at your code I think it's the parameter;
    wa_ctrlop-GETOTF = 'X'.
    This field is described as "Return of OTF table. No printing, display, or faxing", so by setting this flag the smartform will only return the output in OTF format to the calling program.  I don't think this is what you want to happen.
    Regards,
    Nick

  • FAX a smartform

    Hi all,
    I am new to smartforms and i'm trying to FAX a smartform. I am generating the smartform through an ABAP program and passing the following parameters:
          CLEAR: SF_CONTROL_P, SF_OUTPUT_P.
          SF_CONTROL_P-NO_DIALOG = 'X'.
          SF_CONTROL_P-DEVICE    = 'TELEFAX'.
          SF_CONTROL_P-PREVIEW   = 'X'.
          SF_CONTROL_P-GETOTF    = 'X'.
    *---SET OUTPUT PARAMETERS FOR FAX
          SF_OUTPUT_P-TDTELELAND = WA_LFA1-LAND1.
          SF_OUTPUT_P-TDTELENUM  = WA_ZZFAXREL-TELFX.
          SF_OUTPUT_P-TDSCHEDULE = 'IMM'.
          SF_OUTPUT_P-TDSENDDATE = SY-DATUM.
          SF_OUTPUT_P-TDSENDTIME = SY-TIMLO.
    *---NOW CALL THE GENERATED FUNCTION MODULE
          CALL FUNCTION FM_NAME
          EXPORTING
        ARCHIVE_INDEX        =
        ARCHIVE_PARAMETERS   =
          CONTROL_PARAMETERS   = SF_CONTROL_P
        MAIL_APPL_OBJ        =
        MAIL_RECIPIENT       =
        MAIL_SENDER          =
          OUTPUT_OPTIONS       = SF_OUTPUT_P
        USER_SETTINGS        = WA_USER_SETTING
        IMPORTING
        DOCUMENT_OUTPUT_INFO =
          JOB_OUTPUT_INFO      = STRUCTOUTPUT
        JOB_OUTPUT_OPTIONS   =
          TABLES
          GV_ITAB              = GV_ITAB
          EXCEPTIONS
          FORMATTING_ERROR     = 1
          INTERNAL_ERROR       = 2
          SEND_ERROR           = 3
          USER_CANCELED        = 4
          OTHERS               = 5.
    When I run this, nothing is seen in SAP connect (SCOT)...
    Then I read somewhere that I can send the OTF format of my smartform to the func module SO_NEW_DOCUMENT_ATT_SEND_API1 and fax it. But data sent to this func mod is a 255 length text table. How would my form layout be maintained when I fax from this module...Isn't there a direct method of sending fax from the generated smartform function module?

    As an alternative to Sending smartform by fax with fm 'CONVERT_OTF_AND_FAX provided in Sending smartform by fax with fm 'CONVERT_OTF_AND_FAX' I found the fould the code provided below worked for me.
    This is based on the documentation in
    /help.sap.com/saphelp_470/helpdata/en/9b/e3b0dcc2a711d3b558006094192fe3/frameset.htm (Sending Forms by E-Mail or Telefax)
    where it states "To send forms by e-mail or telefax, SAP Smart Forms uses the Business Communication Interface (BCI). "  along with the content from example ABAP RSSOKIF2.  A copy of the code from RSSOKIF2 to create the Sender, Receiver and Application BOR objectid was used to create the content of the FORM get_bor_data (the remainder of the code preparing the data for SAPSCRIPT is left out).
    I don't know what significance it has but the setting to PDF format was used to match the setting in SCOT for FAX
    FORM fax_smartform.
      DATA:   ls_output_opt     TYPE ssfcompop,
              ls_sender_id      TYPE swotobjid,
              ls_recipient_id   TYPE swotobjid,
              ls_appl_object_id LIKE swotobjid,
              ls_document_output_info TYPE  ssfcrespd,
              ls_job_output_info TYPE  ssfcrescl,
              ls_job_output_options TYPE  ssfcresop.
      PERFORM get_bor_data CHANGING ls_sender_id
                                    ls_recipient_id
                                    ls_appl_object_id.
      ls_output_opt-tdteleland = itcpo-tdteleland.
      ls_output_opt-tdtelenum  = itcpo-tdtelenum.
      ls_output_opt-tdtelenume = itcpo-tdtelenum.
      ls_output_opt-tdfaxuser  = itcpo-tdfaxuser.
      ls_output_opt-faxformat  = 'PDF'.
      ls_output_opt-tdschedule = 'IMM'.
      ls_output_opt-tdnewid = 'X'.              "new spool request
      CLEAR gs_cntrl_par.
      gs_cntrl_par-no_open = ' '.
      gs_cntrl_par-no_close = ' '.
      gs_cntrl_par-device = 'TELEFAX'.
      gs_cntrl_par-no_dialog = 'X'.
      gs_cntrl_par-langu = 'E'.
      gs_cntrl_par-preview = ' '.
      CALL FUNCTION G_SF_FUNCTNM
        EXPORTING
        control_parameters         = gs_cntrl_par
        mail_appl_obj              = ls_appl_object_id
        mail_recipient             = ls_recipient_id
        mail_sender                = ls_sender_id
        output_options             = ls_output_opt
          dkadr                      = dkadr
          rf05a                      = rf05a
          v_pay_terms_desc           = v_pay_terms_desc
          knb1                       = knb1
          g_open_bal                 = g_open_bal
    IMPORTING
       document_output_info       = ls_document_output_info
       job_output_info            = ls_job_output_info
       job_output_options         = ls_job_output_options
        TABLES
          rf140_tab                  = rf140_tab
      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.
      ELSE.
        COMMIT WORK.
      ENDIF.
    ENDFORM.                    " fax_smartform

  • Faxing a SmartForm

    I need information on how to fax a smartform.  I have looked in the SAP Press "SAP Smart Forms" and searched SDN, as well as Google, and I couldn't come up with anything.  It seems as though the search on SDN isn't working at all today.
    If anybody has information regarding telefax as the output type with SmartForms I would appreciate it.  I have tried it and it looks like everything is done correctly but when I run the form and check SOST, nothing is in there.
    Regards,
    Davis

    Here is the code I am curently using.  I am not post all of it but I am only posting the relevant code.  I realize that it isn't written the best but it was the best I could do in a short amount of time.  Get_Com is run and then SmartForm_Print is run:
    *       FORM get_comm                                               *
    *  -->  US_SCREEN  Output on screen                                   *
    *                  ' ' = printer                                      *
    *                  'X' = screen                                       *
    *  -->  US_COUNTRY County for telecommunication and SET COUNTRY       *
    FORM get_comm USING us_screen us_country.
      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.
    *   ... 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.
      SET COUNTRY us_country.
    *  include rvadopfo.
    ENDFORM.                    "get_comm
    *&      Form  smartform_print
    *       text
    *      -->P_RETCODE  text
    *      -->P_PROC_SCREEN  text
    FORM smartform_print  USING    p_retcode
                                   p_proc_screen.
      DATA: lf_fm_name            TYPE rs38l_fnam.
      DATA: ls_control_param      TYPE ssfctrlop.
      DATA: ls_composer_param     TYPE ssfcompop.
      DATA: ls_recipient          TYPE swotobjid.
      DATA: ls_sender             TYPE swotobjid.
      DATA: lf_formname           TYPE tdsfname.
      DATA: ls_addr_key           LIKE addr_key.
      PERFORM set_print_param USING    ls_addr_key
                              CHANGING ls_control_param
                                       ls_composer_param
                                       ls_recipient
                                       ls_sender
                                       retcode.
    *Get the Smart Form name.
      IF vbdkl-vkorg = '0035'.         "DYNAIR ONLY
        IF w_regio = 'QC'.      "QUEBEC
          tnapr-fonam = 'ZPCC_PACKLST_FR'.
        ENDIF.
      ELSE.
        IF NOT tnapr-sform IS INITIAL.
          lf_formname = tnapr-sform.
        ELSE.
          MESSAGE e001(/smb40/ssfcomposer).
        ENDIF.
      ENDIF.
    * determine smartform function module for invoice
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING  formname           = lf_formname
    *                 variant            = ' '
    *                 direct_call        = ' '
           IMPORTING  fm_name            = lf_fm_name
           EXCEPTIONS no_form            = 1
                      no_function_module = 2
                      OTHERS             = 3.
      IF sy-subrc <> 0.
    *   error handling
        retcode = sy-subrc.
        IF sy-subrc = 1.
          MESSAGE e001(/smb40/ssfcomposer).
        ENDIF.
        IF sy-subrc = 2.
          MESSAGE e002(/smb40/ssfcomposer).
        ENDIF.
        PERFORM protocol_update.
      ENDIF.
      CALL FUNCTION lf_fm_name
        EXPORTING
           archive_index              = toa_dara
    *   ARCHIVE_INDEX_TAB          =
           archive_parameters         = arc_params
           control_parameters         = ls_control_param
    *   MAIL_APPL_OBJ              =
           mail_recipient             = ls_recipient
           mail_sender                = ls_sender
           output_options             = ls_composer_param
           user_settings              = ' '
           vbdkl                      = vbdkl
           kna1                       = kna1
           nast                       = nast
           tvst                       = tvst
           vbco3                      = vbco3
           lfa1                       = lfa1
           likp                       = likp
           vbdpl                      = vbdpl
           tvko                       = tvko
           w_regio                    = w_regio
          TABLES
           tvbdpl                     = tvbdpl
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
    formatting_error           = 1
    internal_error             = 2
    send_error                 = 3
    user_canceled              = 4
    OTHERS                     = 5.
    COMMIT WORK.
      IF sy-subrc <> 0.
        retcode = sy-subrc.
        PERFORM protocol_update.
    * get SmartForm protocoll and store it in the NAST protocoll
        PERFORM add_smfrm_prot.
      ENDIF.
    ENDFORM.                    "SMARTFORM_PRINT
    Regards,
    Davis

  • EMailing and Faxing Smartforms

    Dear Experts,
    I have created a Smartform for testing purposes. I would like to send it as an eMail / Fax directly from transaction SMARTFORMS.
    Does anybody have an idea how I can do so?
    Thanks a lot for any input!
    Regards,
    Marc

    Hi,
    Assuming you have SCOT configured you can fax from transaction smartforms, but not mail.
    Test the form as usual and enter the DEVICE in CONTROL_PARAMETERS as TELEFAX, when you execute you should get a pop-up to enter the fax details.  In theory the same should happen when you enter MAIL in this field, but instead of a pop-up you get a recipient error.  If you entered the recipient parameters as well you could avoid this, but as OUTPUT_OPTIONS cannot be maintained manually this isn't an option.
    Regards,
    Nick

  • Sending smartform by fax with fm 'CONVERT_OTF_AND_FAX'

    Hi all,
    i'm having problems with the sending of smartforms by fax using the fm 'CONVERT_OTF_AND_FAX'.
    Precisely, i have written a fm that does the following steps:
    1- calls the smartform passing the parameter control_parameters as
            ls_control_param-device = 'TELEFAX'.
            ls_control_param-getotf    = 'X'.
            ls_control_param-no_dialog = 'X'.
           CALL FUNCTION lf_fm_name
              EXPORTING
                  control_parameters = ls_control_param
             IMPORTING
                    job_output_info    = job_output_info
    2- sets the parameter faxoption of the fm 'CONVERT_OTF_AND_FAX' as
                 faxoptions-tdotftype = 'ASC'.
                 faxoptions-faxformat = 'ASC'.
                 faxoptions-tddevice = 'TELEFAX'.
                 faxoptions-tdteleland = 'IT'.
                 faxoptions-tdtelenum = faxnumber.
                 faxoptions-tdsenddate = sy-datum.
                 faxoptions-tdsendtime = sy-uzeit.
                 faxoptions-tdcover = ' '.
                 faxoptions-tdtitle = 'Fax di Prova ASC'.
             the faxnumber format is:
                          dialling code + fax number
             for example, if the dialling code is 06 and the fax number is 123456789, the value assigned to faxoptions-tdtelenum is 06123456789
    3- calls the fm 'CONVERT_OTF_AND_FAX' as follow (the table otf_data is taken from the smartform)
                  CALL FUNCTION 'CONVERT_OTF_AND_FAX'
                      EXPORTING
                           faxoptions         = faxoptions
                           user               = sy-uname
                      TABLES
                           otf                = otf_data[]
                   COMMIT WORK.   
    The fm seems to be working because the document to be sent is accounted on the SOST transaction, but after i send it by SOST, the fax recipient doesn't receive nothing.
    Why? There are some additional parameters to be added?
    Thanks.
    Lello

      DATA: zstructure TYPE zsolstructure OCCURS 0   WITH HEADER LINE,
                 faxoptions TYPE itcpp.
      DATA: numerofax LIKE faxoptions-tdtelenum.
    lf_formname = 'ZSTAMPA_PROVAFAX'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = lf_formname
        IMPORTING
          fm_name            = lf_fm_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      ls_control_param-device = 'TELEFAX'.
      ls_control_param-getotf    = 'X'.
      ls_control_param-no_dialog = 'X'.
    CALL FUNCTION lf_fm_name
        EXPORTING
          control_parameters = ls_control_param
          datastructure      = zstructure
          v_langu            = v_langu
        IMPORTING
          job_output_info    = job_output_info
          totpage            = totalpage
        TABLES
          f150v              = t_f150v
        EXCEPTIONS
          formatting_error   = 1
          internal_error     = 2
          send_error         = 3
          user_canceled      = 4
          OTHERS             = 5.
      MOVE: job_output_info-otfdata[] TO otf_data[].
      faxoptions-tdotftype = 'ASC'.
      faxoptions-faxformat = 'ASC'.
      faxoptions-tddevice = 'TELEFAX'.
      faxoptions-tdteleland = 'IT'.
      numerofax = '0612345678'.
      faxoptions-tdtelenum = numerofax.
      faxoptions-tdsenddate = sy-datum.
      faxoptions-tdsendtime = sy-uzeit.
      faxoptions-tdtitle = 'Fax di Prova ASC'.
      faxoptions-TDCOPIES    = 1.
      faxoptions-TDNEWID     = 'X'.
      faxoptions-TDDATASET   = 'Notification'.
      faxoptions-TDSUFFIX1   = 'FAX'.
      faxoptions-TDSUFFIX2   = SY-UNAME.
      faxoptions-TDIMMED     = 'X'.
      faxoptions-TDLIFETIME  = 8.
      faxoptions-TDCOVER     = 'Prova FAX'.
      faxoptions-TDCOVTITLE  = 'Prova FAX'.
    CALL FUNCTION 'CONVERT_OTF_AND_FAX'
      EXPORTING
        faxoptions         = faxoptions
        user               = sy-uname
    * IMPORTING
    *   FAX_OK             =
    *   OFFICE_OBJID       =
    *   MSGID              =
    *   MSGNO              =
    *   MSGV1              =
    *   MSGV2              =
    *   MSGV3              =
    *   MSGV4              =
      TABLES
        otf                = otf_data[]
      COMMIT WORK.
    SUBMIT rsconn01 WITH mode = 'FAX' WITH output = 'X' AND RETURN.
    I have put as fax number 0612345678 instead of the real number for privacy.

Maybe you are looking for

  • HT204053 ok folks , icloud  has ceased syncing between devices  and i do not know why

    shortly after  upgrading  my  desktop to lion , all my devices  seem to have disconnected from each other , Itunes is the only thing  that continues to push  new material to  the other devices  . I  am such  a mac challenged person i  don't know how

  • In dialog programming i want to leave the current transaction

    Hi, In dialog programming i want to leave the current transaction and come out to the standard   sap initial screen. Please advise me how can i apply. Thanks.

  • Menu Item Icons

    Hi, I was wondering if there was a simple way to add an icon to the specific items in the menu bar. I see that there is a property in the portal file to select an active, inactive, and rollover image; but using them will replace the page/book title.

  • Creating Private Inner Classes in Separate Files

    I sometimes find myself wanting to use private inner classes to do things, but then moving the classes to separate files and giving them package access just because I don't like having single large files. Is there a way to create private inner classe

  • IIS Plug-in with WLS 6.1 SP2 Connection Pool ?

    I have the following setup. For QA, 1 IIS Server (using plug-in from 6.1 SP2) forwarding all request to a cluster on the backend. (2 Physical Servers, 4 JVM's). I do have a firewall in between the IIS Server & the backend servers. According to the do