Faxing Smartforms

I built a custom smartform report that i need to fax to a vendor.  My problem is i'm not sure how to get the form to SAPconnect.  This is a custom developed report it is not the output of any standard SAP application, therefore there is no standard message determination being invoked.  I have two questions about this process...
1.) Where is smartform suppose to output the form after it creates the form?
2.) Is there a program that is called to pass the smartform document on to SAPconnect?
I'm a novice to smartforms and the sap library does not give much detail on this feature.
If you could please take the time to be very detailed and/or descriptive in your response that would be very helpful.
Thanks:)

On basis 6.2 you must use a commit work statement to send form to SAPconnect

Similar Messages

  • FAX Smartforms out of SAP

    Hi,
    I've converted my smartform to PDF document using CONVERT_OTF function module. I want to send this pdf file to a fax machine. I presume I'll have to use SO_OBJECT_SEND function module to do it. Does anybody have code to do so?
    Regards,
    Vijay
    Message was edited by: vijay srikanth

    hi srikanth,
    check this prog          BCS_EXAMPLE_2
    REPORT bcs_example_2.
    * This example shows how to send
    *   - a simple text provided in an internal table of text lines
    *   - and an attached PC document (in form of text lines itab)
    *   - to a fax number.
    * All activities done via facade CL_BCS!
    DATA: send_request       TYPE REF TO cl_bcs.
    DATA: text               TYPE bcsy_text.
    DATA: att_text           TYPE bcsy_text.
    DATA: document           TYPE REF TO cl_document_bcs.
    DATA: sender             TYPE REF TO cl_sapuser_bcs.
    DATA: recipient          TYPE REF TO if_recipient_bcs.
    DATA: bcs_exception      type ref to cx_bcs.
    data: sent_to_all        type os_boolean.
    START-OF-SELECTION.
        PERFORM main.
    *       FORM main                                                     *
    FORM main.
      try.
    *     -------- create persistent send request ------------------------
          send_request = cl_bcs=>create_persistent( ).
    *     -------- create and set document with attachment ---------------
    *     create document from internal table with text
          APPEND 'Hello world!' TO text.
          document = cl_document_bcs=>create_document(
                          i_type    = 'RAW'
                          i_text    = text
                          i_length  = '12'
                          i_subject = 'test created by BCS_EXAMPLE_2' ).
    *     add attachment to document
          REFRESH text.
          APPEND 'This is an attachment' TO text.
          CALL METHOD document->add_attachment
            EXPORTING  i_attachment_type    = 'RAW'
                       i_attachment_subject = 'My attachment'
                       i_attachment_size    = '21'
                       i_att_content_text   = text.
    *     add document to send request
          CALL METHOD send_request->set_document( document ).
    *     --------- set sender -------------------------------------------
    *     note: this is necessary only if you want to set the sender
    *           different from actual user (SY-UNAME). Otherwise sender is
    *           set automatically with actual user.
          sender = cl_sapuser_bcs=>create( sy-uname ).
          CALL METHOD send_request->set_sender
            EXPORTING i_sender = sender.
    *     --------- add recipient (fax) -----------------------
    *     create recipient - please replace fax number !!!
          recipient = cl_cam_address_bcs=>create_fax_address(
            i_country = 'DE'
            i_number  = '09999-123456' ).
    *     add recipient with its respective attributes to send request
          CALL METHOD send_request->add_recipient
            EXPORTING
              i_recipient  = recipient
              i_express    = 'X'.
    *     ---------- send document ---------------------------------------
          CALL METHOD send_request->send(
            exporting
              i_with_error_screen = 'X'
            receiving
              result              = sent_to_all ).
          if sent_to_all = 'X'.
            write text-003.
          endif.
          COMMIT WORK.
    * *                     exception handling
    * * replace this very rudimentary exception handling
    * * with your own one !!!
        catch cx_bcs into bcs_exception.
          write: 'Fehler aufgetreten.'(001).
          write: 'Fehlertyp:'(002), bcs_exception->error_type.
          exit.
      endtry.
    ENDFORM.
    Message was edited by: Chandrasekhar Jagarlamudi

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

  • Email and Fax smartform for Sales Order Confirmation

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

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

  • 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

  • NACE and Smartforms

    Hi All,
    I have a requirement to configure a smartforms in output type using NACE tcode. The requirement is to generate a fax (smartform) based on an output type for shipments.
    I tried different combinations in the output type, but cant get it to work - how do you set up the processing routine part of NACE?
    What should be the values in
    Layout Module = ?
    SmartForm = Name of the smartform
    Processing 1 -> Program = Program name of the driver program
    Processing 1 -> Form routine = 'ENTRY' (since I have called the smart form function module within the 'ENTRY' subroutine).
    Please help me.
    Thanks,
    Jay Viswanathan.

    Hi Jay,
    Normally, the Layout Module should be blank for most of my config in NACE as for smartforms. The following is one of the example of how I input the values:
    Layout module: Blank
    Smartform: Smartform name
    Program: Print Program name (Driver Program Name)
    Form routine: ENTRY_NEU
    Form: MEDRUCK
    Hope the above helps.
    Cheers,
    Patrick

  • Custom fax cover sheet

    Hello,
    My scenario is this:
    I need to send a custom smartform or sapscript cover sheet in the same output process of faxing smartform PO's, Quotations, Invoces and several other documents.  I don't see anywhere in configuration where something like this can be done.  Does anyone have any ideas on how to accomplish this?
    Thank you,
    JR

    Time for a little give-back from me....
    Having just worked on this same issue and not finding a solution from SDN (which was unusual) I thought I'd better let you know what I have found..
    Transactions SO41,SO42 and SO43 show the default SAP fax cover sheets.
    They are kept in client 000 and you need to use SE71 (SAPScript forms) to copy the required form (and rename to Z...), then you are free to modify it as required (Add a logo etc).
    Make sure you classify the form as a SAP office form, there are instructions for doing this in the SAP library.
    You can test it in SO01 without sending the fax anywhere, create a fax to recipient GB 1234567 or any other fake number, double click on the sender and you will get a popup of the fax details (sender info, receiver info and the cover sheet to use).
    or you can use SO_OBJECT_SEND, make sure the recevicers-recextnam field is populated using the SADRFD structure.
    and here's the subroutine I use to send a list as a fax with a custom cover sheet :
    and below that is a similar subroutine to send emails...
    *&      Form  send_fax
       Send Fax of internal table GT_MAIL_LINES TYPE soli
    FORM send_fax using my_company_name TYPE name1_gp.
      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 = gs_address-fax.
      shift    ls_sadrfd-rec_fax left deleting leading '0'.
      condense ls_sadrfd-rec_fax no-gaps.
      ls_sadrfd-rec_street = gs_address-street.
      ls_sadrfd-rec_town   = gs_address-city.
      ls_sadrfd-rec_name1  = gs_address-name.
      ls_sadrfd-rec_state  = gs_address-country.
      ls_sadrfd-form_langu = gs_address-langu.
      ls_sadrfd-fax_form   = 'Z_FAX_COVER'.
      ls_sadrfd-send_comp  = my_company_name.
      ls_sadrfd-send_immi  = 'X'.
      IF ls_sadrfd-form_langu is initial.
        ls_sadrfd-form_langu = sy-langu.
      endif.
      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       = g_originator
          originator_type  = 'B'
        TABLES
          objcont          = gt_mail_lines
          receivers        = lt_receivers
        EXCEPTIONS
          OTHERS           = 01.
    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.
    ENDFORM. "send_fax
    *&      Form  send_email
       Send Email of internal table GT_MAIL_LINES
    FORM send_email USING      pi_email_address TYPE ad_smtpadr.
      DATA: ls_object_hd        TYPE  sood1,
            ls_receivers        TYPE  soos1,
            lt_receivers TYPE STANDARD TABLE OF soos1,
            l_lines      TYPE  i.
      CLEAR:  ls_object_hd, ls_receivers.
      REFRESH lt_receivers.
      ls_object_hd-objla  = sy-langu.
      ls_object_hd-objnam = 'NOTE'.
      ls_object_hd-objdes = 'Email title in here'.
    get size of text table to be sent
      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 ).
      ls_receivers-recextnam = pi_email_address.
      ls_receivers-recesc = 'E'.
      ls_receivers-mailstatus = 'E'.
      ls_receivers-sndart = 'INT'.
      ls_receivers-sndpri = '1'.
      APPEND ls_receivers TO lt_receivers.
    NB: G_originator is a SAP user ID with the email address that you want any
    replies to go to - its useful to have this not as sy-uname so any replies can go to
    a central email address like [email protected]
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          object_hd_change = ls_object_hd
          object_type      = 'RAW'
          owner            = sy-uname
          originator       = g_originator
          originator_type  = 'B'
        TABLES
          objcont          = gt_mail_lines
          receivers        = lt_receivers
        EXCEPTIONS
          OTHERS           = 01.
      IF sy-subrc = 0.
        COMMIT WORK AND WAIT.
      ELSE.
        WRITE: / 'Email failed RAISE ERROR '(010).
      ENDIF.
    ENDFORM.                    " send_email

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

  • 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

  • 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

  • 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

  • Problem while sending Smartform through Fax

    Hi Folks,
    I am sending a Smartform through fax by setting the essential Control Parameters and Output Options while calling the function module of the Smartform.
    In SOST I get the status message 710(Message transferred to node FAX(...) ) and later in around 20 minutes the message 812(No delivery to FAX(.......fax no) ) occurs for some requests.
    Only few requests are sent successfully by the same program and same O/P Type and shows the status message 701(Delivered to FAX (................)).
    There is no much time difference between those requests while creating.
    Do you know what could be the problem?
    Can you help me in solving the issue?

    may it be that in those cases where it doesnt work, that you got no fax number?
    Since it works soemtimes, it seems there are no errors, but rather in some cases some important info is missing, fax number may be one of thsoe important info in a FAX scenario.

  • Send smartform output as Fax

    Hello All,
    I have a requirement where i need to send the PO reminder smartform output to the user as Fax.
    Same is sent using the Program SAPFM06P using the form routine ENTRY_MAHN, which uses 2 FM's, but for SAP Scripts.
    Can anybody guide me over same requirement using smartforms.
    Waiting for useful pointers.
    Thanks in advance...
    Regards,
    Tarun

    Hi Tarun,
    I am also having the same requirement, to send a PO Reminder Smartform through Fax.
    Could you please let me know whether you were able to send it?
    Hi Folks,
    Could you please tell me what are all the settings and parameters to be passed while calling the smartform to send it through fax?

  • Sending smartform output as FAX

    Hi Gurus,
    I am sending a smartform output as Fax..
    I have written this this code
    READ TABLE lt_adr3
            INTO lwa_adr3
            INDEX 1.
          IF sy-subrc = 0.
            CONCATENATE lwa_adr3-fax_number text-002 INTO lwa_receivers-receiver.
            lwa_receivers-rec_type   = gc_u.
            lwa_receivers-com_type   = gc_int.
            lwa_receivers-notif_del  = gc_x.
            lwa_receivers-notif_ndel = gc_x.
            APPEND lwa_receivers TO lt_receivers.
    i have +9102267557100 as the fax number and i am sending it to the function module.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
              EXPORTING
                document_data              = lwa_document_data
           commit_work                = 'X'
              TABLES
                packing_list               = lt_packing_list
                contents_bin               = lt_mess_att
                receivers                  = lt_receivers
              EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    But i am not getting the pdf document at the FAX machine.
    Kindly reply

    Solved

  • Account clerk,Tele & Fax Number in Smartform

    Hi Gurus
    I am trying to print Account clerk,Tele phone number and Fax Number in Smartform but its not printing .I am using Structer FSABE .Fields are SALUT,TELF1 and TELFX.i am using the TC:VF02.please can anyone help me where i can get the details and which its pulling from.please can anyone tell me the solution please
    Thanks in advance
    Edited by: Reddy on May 19, 2010 8:25 AM

    Check table T001S to get user name of A/c clerk. Then you can read the details using BAPI_USER_GET_DETAIL.

Maybe you are looking for

  • Printing a PDF larger (twice normal size)

    Hello all, I have a PDF I wanna print out. When I print it it's 1 pg long. I want to double its size & print it over 2 pages. I have tried the following: in PREVIEW.app--increasing Page Setup print size to 200%. This just centers the PDF and leaves o

  • Exchange Provisioning - Provisioning error

    Hi everyone, I use OIM 11g R2. I want to make provisioning and reconciliation between exchange and oim. Scenario 1: I made reconciliation a user from exchange machine. This user created in OIM. And I want to provisioning this user form OIM to exchang

  • No sound in iTune downloaded TV show

    I have the latest iTune version (6.0.2.23) and latest version of Quick Time (7.0.4). I downloaded a few TV shows from iTunes along with a few songs. The songs will play on my computer fine, but there is no volume on the TV shows. I use the Control (u

  • SBO Service Manager button disabled

    Dear Experts, Hi, I try to run SBO Service Manager, it used to have dropdown drill with some options like "SBO Backup","SBO DI Server" and "License Manager". But now I see the dropdown no longer has those 3 options, but only blank and the button is t

  • HP Officejet4630 All-in-One

    Orginal black in cartridge expired and I purchased two new black cartridges through HP. Twin-pack showing HP on the box with the number 61. The package the cartridges come in show the number CH561W HP 61 and so do the cartridges in side. I opened the