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

Similar Messages

  • Printing FAX in smartform

    Hi,
    We have a smartform, which has the ouput as 4 pages.
    In all the 4 pages data is same but the background layout is different.
    When we take the FAX copy then there is the only 1 page which is the first page is being printed , not all 4.
    Is the SAP connect does not take the copy of pages?
    If it takes then how to do the same, please confirm.
    Sandeep Garg

    Hi friend,
    Just see the SCOt and NACE settings.
    See whether all the data is correctly getting filled before the fax is sent.
    Also see the below link it will be use ful for you in solving your issue it discribes about the settings before sending fax see and check wheather you have also done the same.
    Link: [sending fax using Smartforms|Problem while sending fax using Smartforms;
    Just try all these if there is any issues please revert back to me i will help you.
    Thanks,
    Sri Hari

  • How to fax a smartform?

    Anyone have some sample code of how to fax a smartform?

    You must get its OTF output.
    When calling Smartform, parameters must be:
    Exporting
    control_params-getotf = 'X'.
    IMPORTING
          job_output_info    = structjob
    OTF data is in structjob-otfdata
    and there is a FM
    CONVERT_OTF_AND_FAX
    if it is useful please give points.

  • 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

  • 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

  • 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

  • Sending Smartform through Fax

    Hai All,
       could anyone help me with the sample code..I want to know the parameters for fax while calling the function module..
    Thanks

    HI LAXMI,
    CHECK THESE THREADS...
    Sending Smartforms through Fax
    Sending SMARTFORM output to FAX gateway
    How to fax a smartform?

  • Require help,please.Error in Faxing smartform

    I am trying to fax a smartform but i am getting the following errors:
    I am getting at the first place message 672 in SOST with waiting status.
    "waiting for communications service".
    If i send it from SOST then message 821 comes up with error status.
    "Cannot process message in node, parameters cannot be converted".
    Can anyone please help?
    Thank you,
    Regards,

    hi Philips,
    seems the error caused by lower case for infoobject InfoObject ZSITMDESC
    'Cash box, 5 x 7 x 7, small 577'
    try in transfer rules or update rules, translate it to upper case,
    create routine, and choose field where infoobject ZSITMDES assigned
    in transfer rules
    result = tran_structure-fieldname.
    translate result to upper case.
    (use  result = tran_structure-/bic/ZSITMDES if the same infoobject used)
    or in update rules
    result = comm_structure-/bic/ZSITMDES.
    translate result to upper case.
    hope this helps.

  • Mail & fax option in Smartforms

    Hi,
    Is there an option of sending mails & fax through Smartforms.Pleas guide me through this query.
    Thanks.

    Go to SPAD and check if u have configured Fax machine in SAP or not..
    Then u select the Medium as 5 and then go to NACE..select the application ...
    then press condition type...
    there u will get a list of output types..just select the one for your object and double click on it..
    Enter the necessary values and then u will be taken to a screen..
    There on Top left u can see communication method...
    Enter the Fax dest that u  have seen in SPAD tcode..
    Reward the points if u find the answer helpful.
    Thanks.

  • How can I solve these in smartforms

    Hi,
    I am stuck with the below issues.
    1. I want to email or fax a smartform.Can I get these features if I copy the standard program.If no, what additional changes do I need to incorporate.
    2. I will have main line items like 10, 20, 30 etc in the service sales order. and sub items like 11, 12, 13 etc in each of them.
    If user selects 10, I will need to fetch the info of respective 11.How do I get te link between those both.
    3. I want to print a scissors SAP Icon along with the dotted line.I managed to insert this sap symbol (it shows as 869).But I dont see this in the o/p.
    Any clues on the above please.
    Thanks
    Kiran

    Kiran,
    1.It can be done.Convert the Smartform into PDF and send it through mail.Lot many snippets are available in SCN on how to convert a smartform to pdf and sending it through mail.Fax I have  no idea,but it can be done too.
    3. Did you checked the Print output? I guess it can't be seen in the Print preview but only in the output..
    K.Kiran.

  • 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

  • Help required in smartform output medium

    Hi All!
    I have a requirement where in the smart form, may be either:
    printed,
    saved as a pdf,
    sent as a fax,
    sent as an e-mail.
    we want all the logics to be in the print program based on any criteria.
    Is it possible to include all such logic in the same print program, and if so how can we choose the output medium, at the runtime i meant based on what criteria, the program is going to give the output.
    Thank in advance!!!
    Ashok
    Assured reward points.

    Hi,
    This is possible.
    You have to provide controls in your driver program and accordingly call the FM for either print, email or FAX on user choice.
    1. For Printing you have to directly call the smartform in your program.
    2. For Pdf - printing smartform
    3. For email/Fax -  How to send smartform as an email or fax
    Re: Smartforms to PDF
    Regards,
    Amit

  • FSCM correspondance mail has to be configured to have mail body

    Hi Experts,
    We have configured correspondace in FSCM to send out mail/FAX/print smartforms. Now, these smart-forms when sent as e-mail, go as attachment to mail. We have a requirement wherein we want to add some text in mail body.
    After debug we found that internally it is calling FM SO_OBJECT_SEND to send mail but, not passing any tables parameters to it.
    Request you to please provide us some pointers in case you have already worked on this. Also, let us know some workarounds in case you are aware/think of.
    Any input will be highly appreciable.
    Thanks,
    Gouri.

    Odgenite,
    Please first complete your profile, if you don't know how please click Profile Update for instructions.
    The first thing to do is restart in Recovery Mode, open Disk Utility and run Repair Permissions 2x. If you don't know how to start in Recovery Mode then hold down the Option key when you hear the startup tone and you will see what partitions to start from. Choose Recovery, then open Disk Utility. After running Repair Permissions 2x restart normally and re test. If this does not work then open in Recovery Mode again this time reinstall OS X, this will leave your data alone however it is ALWAYS wise to backup your data prior to doing any update or upgrade.

  • Error in sending smartform as fax

    Hi everyone,
    I am trying to send a smartform through Fax, and i am getting the following error;
    Cannot process message in node, parameters cannot be converted
         Message no. XS821
    Diagnosis
         The message cannot be processed in the node as parameters such as 'Send
         time' or 'Priority' cannot be converted. It is possible that entire
         parameters such as 'Recipient list' or 'Packet list' are missing.
    System Response
         Processing was terminated.
         SAP system additional information (error number, if available):
         MRSUM
         Additional information of the node used (in the system language of the
         node)
    Can you guys please help me solving this problem?
    Thanking you,
    Kind regards,
    I have changed my code several times, using different functions to send  the fax and i am getting the same error message each time.
    Please find below the piece of code i am using to send the fax.
    DATA:GT_MAIL_LINES TYPE STANDARD TABLE OF soli.
      data: gs_mail_lines TYPE soli.
    DATA: ls_object_hd TYPE sood1,
    ls_receivers TYPE soos1,
    lt_receivers TYPE STANDARD TABLE OF soos1,
    l_lines TYPE i,
    ls_sadrfd TYPE sadrfd.
    CLEAR: ls_object_hd, ls_receivers.
    REFRESH lt_receivers.
    ls_object_hd-objla = sy-langu.
    ls_object_hd-objnam = 'NOTE'.
    ls_object_hd-objdes = 'Fax subject line in here'.
    "Calculate size of table
    DESCRIBE TABLE gt_mail_lines LINES l_lines.
    READ TABLE gt_mail_lines INDEX l_lines INTO gs_mail_lines.
    ls_object_hd-objlen = ( l_lines - 1 ) * 255 + STRLEN( gs_mail_lines ).
    "Set Fax control structure
    "Fax number in structure must have no leading zero
    "as this is added by SAPOffice from the country code
    ls_sadrfd-rec_fax = '4421844
    ls_sadrfd-rec_street = 'Addr'.
    ls_sadrfd-rec_town = 'Addr'.
    ls_sadrfd-rec_name1 = 'Name'.
    ls_sadrfd-rec_state = 'MU'.
    ls_sadrfd-form_langu = 'EN'.
    ls_sadrfd-fax_form = 'Z_FAX_COVER'.
    ls_sadrfd-send_comp = 'USER'
    ls_sadrfd-send_immi = 'X'.
    ls_sadrfd-send_nam = sy-uname.
    ls_sadrfd-send_date = sy-datum.
    ls_sadrfd-send_time = sy-uzeit.
    "Convert Receiver information to char field
    CALL FUNCTION 'C147_WORKAREA_TO_CHARFIELD'
    EXPORTING
    I_WORKAREA = ls_sadrfd
    IMPORTING
    E_CHARFIELD = ls_receivers-recextnam.
    ls_receivers-recesc = 'F'.
    ls_receivers-mailstatus = 'E'.
    ls_receivers-sndart = 'FAX'.
    ls_receivers-sndpri = '1'.
    APPEND ls_receivers TO lt_receivers.
    "Send fax
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    object_hd_change = ls_object_hd
    object_type = 'RAW'
    owner = sy-uname
    originator_type = 'B'
    TABLES
    objcont   = gt_mail_lines
    receivers = lt_receivers
    EXCEPTIONS
    OTHERS = 01.
    break buantoch.
    "The function doesn't commit so we must
    "do it if successful.
    IF sy-subrc = 0.
    COMMIT WORK AND WAIT.
    ELSE.
    WRITE: / 'Fax failed RAISE ERROR '(012).
    ENDIF.

    Hi,
    Then, you can test the FAX fuctionality like:
    go to System->Short Message->give a test message,give recipient as the FAX number,type as FAX->Shift+F8 the see if it works... else only SCOT errors will be there...
    See:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2b/d925bf4b8a11d1894c0000e8323c4f/frameset.htm
    Also see:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4b4fa090-0201-0010-d3b7-b233296d95ff
    Regards,
    Renjith Michael.

  • Print program for the smartform for selecting the output type (email/fax)

    Hi All,
    Requirement :I have to create a print program for the smartform where the output type may be print out,email or fax ,so i need to put the condition for selecting the output type (like printout,email,fax).
    can any body please let me know how  to put the condition for selecting the desired  output type ?
    Thanks in advance
    Rahul

    Hi
    It is not the output type that has to be changed
    it is the MEDIUM which you have to change and configure
    for printout medium is 1
    for FAX medium is 2
    for MAIL it is 7.
    so instead of printout change the medium to 2 or 7 for the same output type and attach to the same driver program and smartform/form.
    Reward points for useful Answers
    Regards
    Anji

Maybe you are looking for

  • Creating a new User in BO 4.1

    Hello everyone, When I am creating a new user and check the security I find that Administrator group is automatically inherited. Where is it inheriting the admin group from.  I cannot remove it since it is inherited. Any idea where it is coming from

  • Iphone 5 Help 6.0.2 Draining

    Hello, Guys Just updated my iphone 5 from 6.0.1 to 6.0.2 the battery draining is going crazy only getting 2 hours usage and 5 hours standby before. I was getting on 6.0.1 was 8 hours usage and 3 days standby Tried DFU restore, Reset and even draining

  • VENDOR_MAIN delta replication

    Hi Experts, Is there any practice how to update vendor changes from ERP to CRM 5.0? (Business object: VENDOR_MAIN.) Thanks in advance. A

  • CSS in Web Portlet (JSP)

    Hi I just worte a portlet and I want to use an external CascadeStyleSheet (css) that I have. Is this possible? If so, can anybody tell me how to do it? Thanks in advance, Matias

  • Number Range for Transfer Order

    Hi, When I create transfer order with reference to outbound delivery, an error message says "Maintain number range 01 for transfer order". I could see the number range 01 maintained in T- code SDPI. But I would like to know how we maintain number ran