Sending po printout by fax

hi!
i have a very urgent problem,
we implemented fax server for sending purchase order printout to the vendor.
we used userexit vn00001 for receiving the fax number of the agent.
we need to get also the country code and change it to the country code of the agent.
the situation now is that we get the fax number in israel , and the country code of the vendor in the U.S.A.
and it connects then together.
is there any way to do it?
by userexit or some other way?
thank you
yifat

You should really post this question to the ABAP group, although not a specific ABAP problem, if there is a way to do it with a user exit you'll get the answer there quite quickly!

Similar Messages

  • Sending po printout by fax server

    hi!
    i have a very urgent problem,
    we implemented fax server for sending purchase order printout to the vendor.
    we used userexit vn00001 for recieving the vax number of the agent.
    we need to get also the country code and change it to te country code of the agent.
    is there any way to do it?
    by userexit or some other way?
    thank you
    yifat

    You should really post this question to the ABAP group, although not a specific ABAP problem, if there is a way to do it with a user exit you'll get the answer there quite quickly!

  • 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

  • Configuration to send the smartform through fax

    Hi,
    I have used CONVERT_OTF_AND_FAX and SO_OBJECT_SEND FM's to send the smartform through fax.After executing SO_OBJECT_SEND function module,I am getting sy-subrc alue as 9(OBJECT_NOT_SEND).I am able to send the document through fax.But when I click on display in SOST transaction it is just printing the output of the smartform.It is not coming in PDF format.
    The code looks fine.I think there is some problem with confuration settings.Is there any configuration to be done to send the smartform  output through fax?
    Please reply.
    Regards,
    Hema

    Hi,
    Actually,my requirement is to send the smartform output through email with medium 'external send'.I have done some coding for that.it is working fine and I am able to send the smartform through email and open the attachment in PDF format.
    But if the email id of the recipient is not present then the smartform output has to be sent through fax with the same medium 'external send'.
    So I have done some coding to send the smartform through fax when the email id is not present.
    I am able to send the output of smartform through fax.But when I clicked on display in SOST transaction,it is not coming in PDF format.It is coming in RAW format.
    Is it possible to send the smartform output through fax with medium 'external send'?
    Regards,
    Hema

  • Send order  attachment  by fax

    Hi friends,
    I need to send the order attachment as well as the order by fax.
    1. is it possible?
    2. how can this be achieved?
    thanks in advance,
    Michal.

    Hello,
    As you know you can't send an attachment through FAX.
    But you can send an order through fax. For that you have to do the following setting.
    1. Set the Medium  as FAX for the vendor for a purchasing organisation .
    2. You have to create a smart from and using BADI bbp_output_change badi you have to set that smartfrom for a logical system.
    3. Now when a PO will be created on that purchasing organisation for that Vendor , PO will automatically send to the vendor through FAX . Vendor will  get a documents which is created using the smartfrom.
    Regards,
    Anindya

  • How to send alerts to Pager/Fax

    Hi all,
    How to send alerts to Pager/Fax......
    I know that this can be done by checking the checkbox SMS,FAX in alert inbox.
    For receiving the Alert through Email,We define the Receipents in TCode ALRTCATDEF under fixed receipents.
    Where does we provide the Pager number/Fax number /Mob number so that I can receive Alerts Even trough Pager and SMS.
    Thanks,
    Srinivasa

    Go to RWB->Alert Inbox->Personalize->Check SMS,
    Go to SU01->UserId->Change->Give mobile number & Fax Number in Communication Area
    G to SCOT -> Check weather SMS/Pager/Fax is configured or not
    ( It need to be Configured , Otherwise there is no medum to send the alerts to mobile,page,FaX ( Manditory))
    Check out SAP Connect (SCOT).
    http://help.sap.com/saphelp_me21sp2/helpdata/en/2b/d927734b8a11d1894c0000e8323c4f/frameset.htm
    SAPconnect provides a standard interface for external communication, which supports sending with telecommunication services, such as FAX, text message (pager/SMS), Internet mail, and X.400, as well as sending to printers and between different SAP systems. It enables external communication components to be connected to the SAP system.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b6d59590-0201-0010-5f9d-adb9f6b14d80

  • OS X 10.4.11 will send but not receive faxes on Power Mac G4 MDD

    OS X 10.4.11 will send but not receive faxes on my Power Mac G4 MDD. Perhaps I should remove the relevant .plist preference file(s). But which one(s) is it /are they? Or is there something else I should do?

    Thank you for your reply, BDAqua. I have set the fax feature to answer after 3 rings, but the phone rings only once when someone is trying to send a fax. The phone icon in the menu bar changes to "ringing ..." but nothing more happens. The phone line on which I receive faxes is dedicated to that use. I phoned in to its number earlier today from another phone. I heard it ring once and then it went to the busy signal. I then disconnected the fax phone line from its wall jack, connected a phone to the jack, and phoned in to it. The phone now rang and rang as it should. So this confirms the assumption that the fault is in the computer, presumably in the Print & Fax software. I should also mention that I don't find com.apple.print.FaxPrefs.plist in /Library/Preferences.

  • How send a sapscript by Fax from an abap program

    Hello!
    We are using the PP module to edit some forms.
    With standard SAP I didn't find how to send this form by FAx.
    Now I'm searching to send it from the print program.
    Is there a function modul or other way to send the form by Fax ?
    Thanks for your help.

    hi,
    Refer the following links:
    [http://help.sap.com/saphelp_nw70/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/content.htm]
    [http://arthur_ong.tripod.com/xbc020.htm]
    [Sending SAP Script Output to Mail & Fax;
    [http://www.sap-img.com/abap/sending-fax-from-abap.htm]
    Hope this will help you.
    Regards,
    Renuka S.

  • Send confirmations by both Fax and e-mail

    Hi , all
    my client has requirement in address data section of the customer master record, it has a field for Standard Communication Method.Fax and e-mail are among the choices.
    would like to have the option to choose "Both" in order to send confirmations by both Fax and e-mail to the same customer.
    Can we add the value "Both" to the list of possible options for Standard Communication method?
    How can we allow both forms ot communication to be sent automatically for the same customer?
    can any one help me how to configure this scenario and what are all the configuration i do to send Both  in order to send confirmations by both Fax and e-mail
    Thanks
    Rakesh

    Dear Rajesh,
    U can configure this with the help of "output determination" utility:
    1 of the paths being:  SPRO-> IMG-> Basic Functions-> Output Control-> Output Determination-> Output Determination using Condition Technique- >Output Determination for Sales Documents.
    There u can configure the thing as per ur reqmnt. using O/P type n O/P condition records (VV11).
    If ur query is answered then plz do close the thread.
    Regards
    Param

  • How to send AT Command in fax modem from fax api?

    hi,
    i want to send a dial pad number in my fax modem.
    i am using Interop.FAXCOMEXLib dll in my C# Project.i can send and receive fax.
    i want to send a number of dial (after 20 sec dialing) for example send 5 number or send at command : "AT5" for dialing pad.
    can i send AT Command in Interop.FAXCOMEXLib ?
    please help me.
    Thanks.

    Hi Ali,
    I am not expert on AT Command.
    I have seen
    Send and Read SMS through a GSM Modem using AT Commands and
    AT commands Send/receive SMS. But i have never seen send AT Command in Interop.FAXCOMEXLib. I am afraid this is not support.
    Actually, this case related to desktop. If you still not resolve this issue, please redirect to
    Windows Desktop Development  >
    General Windows Desktop Development Issues
    forum for better support.
    Thanks for your understanding.
    Good Luck.
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Running a ALV Report in bakcground and sending it to Email/FAX

    Hi,
         I am designing a ALV report to send a email/fax/Printer which has to be run in background or foreground according to selection screen inputs.
    I am doing the following
    1. After generating ALV report, converting it to pdf
    2. Sending Email or Fax or Print from selection screen value.
    3. after that scheduling in background using JOB_OPEN and JOB_SUBMIT FM's.
    Can I use SO_DOCUMENT_SEND_API1 FM for both Email and Fax.
    When I schedule the report in the background using JOB_OPEN, at which point I have to code it inside the report. Is it after I generate the ALV Report and Email sending code or before it..
    Thanks

    Hi
    How did you end up doing the emailing? I have the same task.....

  • Error while sending the PO to Fax

    Hi Friends,
    we are sending a PO to the fax. we are getting a error message saying processing routine ENTRY_NEU in program /SMB40/FM06P does not exist.
    but processing routine exists for the same.
    Could you please tell me what could be the reason for the same and let me know how can i fix it.

    Execute this program RSNAST0F in SE38
    Object key : Your Purchase Order Number
    Output type : NEU
    Transmission medium : 1
    Output application : EF
    If it is printing correctly, then goto nace tcode and check everything is assigned correctly, i.e transmission medium etc.
    Regards,
    Sairam

  • Sending a message to fax using JavaMail

    Hello all,
    we are trying to create a system to send messages. The input will come from an Oracle 9i (9.0.2) database, our goal is to create email messages which can either be delivered to an email address or to a fax number.
    The systems works if all addresses are regular email adresses, but we get the following message when using a fax number :javax.mail.internet.AddressException: Illegal route-addr in string ``fax:[email protected]''
    I have already change the parse-method to parseHeader with the parseOption false, so that the addresses are not controlled against the standard. I expect the ':' (colon) in fax:012345678 is the cause of our problem, replacing it with a random character returns a 'normal' error message for a non-existing address.
    I have included the log message with the exception, the sourcecode of our SendMailTest and the source of SendMail.
    Is there any work around to this colon, so we can send faxes as well as emails.
    Kind regards,
    Nemata
    log message----------------------------------------------------
    C:\ProgramFiles\jdevstudio1013\jdk\bin\javaw.exe -ojvm -classpath C:\ProgramFiles\jdevstudio1013\jdev\mywork\ocbs\Client\classes;C:\ProgramFiles\jdevstudio1013\j2ee\home\lib;C:\ProgramFiles\jdevstudio1013\j2ee\home\lib\mail.jar;C:\ProgramFiles\jdevstudio1013\j2ee\home\lib\activation.jar com.vdscomputing.carpinvest.ocbs.db.io.SendMailTest
    Constructor entered
    return from constructor
    com.vdscomputing.carpinvest.ocbs.db.io.SendMail@a Hello
    javax.mail.internet.AddressException: Illegal route-addr in string ``fax:[email protected]''
    message sent
    Process exited with exit code 0.
    source SendMailTest-------------------------------------
    package com.vdscomputing.carpinvest.ocbs.db.io;
    //class designed to test SendMail
    public class SendMailTest {
    public static void main( String args[]) {
    String SMTPserver = "192.168.1.23";
    String SMTPport = "25";
    String Sender = "[email protected]";
    String Recipient ="fax:[email protected]";
    String CcRecipient = "[email protected]";
    String BccRecipient = "";
    String Subject = "faxinationTest";
    String Body = "test mail 12 from test class";
    String[] ErrorMessage = new String[1];
    String Attachments ="";
    // create mesage and monitor constructor
    SendMail testMessage = new SendMail();
    System.out.println("return from constructor");
    System.out.println(testMessage + " Hello");
    testMessage.Send(SMTPserver, SMTPport, Sender, Recipient, CcRecipient,
    BccRecipient, Subject, Body, ErrorMessage, Attachments);
    System.out.println("message sent");
    Source SendMail---------------------------------------
    package com.vdscomputing.carpinvest.ocbs.db.io;
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class SendMail {
    //default constructor with monitor message
    public SendMail(){
    System.out.println("Constructor entered");
    // preparing the message and sending it
    public static int Send(String SMTPServer,
    String SMTPPort,
    String Sender,
    String Recipient,
    String CcRecipient,
    String BccRecipient,
    String Subject,
    String Body,
    String ErrorMessage[],
    String Attachments) {
    // Error status;
    int ErrorStatus = 0;
         // create some properties and get the default Session;
         Properties props = System.getProperties();
         props.put("mail.smtp.host", SMTPServer);
         props.put("mail.smtp.port", SMTPPort);
    Session session = Session.getDefaultInstance(props, null);
    try {
         boolean ParseOption = false; //do not enforce RFC822
    // create a message;
    MimeMessage msg = new MimeMessage(session);
    // extracts the senders and adds them to the message;
    InternetAddress[] TheAddresses =
    InternetAddress.parseHeader(Sender, ParseOption);
    msg.addFrom(TheAddresses);
         // extract the recipients and assign them to the message;
    InternetAddress[] TheAddresses =
    InternetAddress.parseHeader(Recipient, ParseOption);
    msg.addRecipients(Message.RecipientType.TO,
    TheAddresses);
         // extract the Cc-recipients and assign them to the message;
    if (null != CcRecipient) {
    InternetAddress[] TheAddresses =
    InternetAddress.parseHeader(CcRecipient, ParseOption);
    msg.addRecipients(Message.RecipientType.CC,
    TheAddresses);
         // extract the Bcc-recipients and assign them to the message;
    if (null != BccRecipient) {
    InternetAddress[] TheAddresses =
    InternetAddress.parseHeader(BccRecipient, ParseOption);
    msg.addRecipients(Message.RecipientType.BCC,
    TheAddresses);
    // subject field;
    msg.setSubject(Subject);
    // create the Multipart to be added the parts to;
    Multipart mp = new MimeMultipart();
    // create and fill the first message part;
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText(Body);
    // attach the part to the multipart;
    mp.addBodyPart(mbp);
    // attach the files to the message;
    if (null != Attachments) {
    int StartIndex = 0, PosIndex = 0;
    while (-1 != (PosIndex = Attachments.indexOf("///",
    StartIndex))) {
    // create and fill other message parts;
    MimeBodyPart mbp = new MimeBodyPart();
    FileDataSource fds =
    new FileDataSource(Attachments.substring(StartIndex,
    PosIndex));
    mbp.setDataHandler(new DataHandler(fds));
    mbp.setFileName(fds.getName());
    mp.addBodyPart(mbp);
    PosIndex += 3;
    StartIndex = PosIndex;
    // last, or only, attachment file;
    if (StartIndex < Attachments.length()) {
    MimeBodyPart mbp = new MimeBodyPart();
    FileDataSource fds =
    new FileDataSource(Attachments.substring(StartIndex));
    mbp.setDataHandler(new DataHandler(fds));
    mbp.setFileName(fds.getName());
    mp.addBodyPart(mbp);
    // add the Multipart to the message;
    msg.setContent(mp);
    // set the Date: header;
    msg.setSentDate(new Date());
    // send the message with monitor message
    Transport.send(msg);
    System.out.println("message on transport");
    } catch (MessagingException MsgException) {
    ErrorMessage[0] = MsgException.toString();
    System.out.println(ErrorMessage[0]); // catch to console
    Exception TheException = null;
    if ((TheException = MsgException.getNextException()) !=
    null)
    ErrorMessage[0] = ErrorMessage[0] + "\n" +
    TheException.toString();
    ErrorStatus = 1;
    return ErrorStatus;
    }

    Hi,
    I want to fax using java. presently I m using mail api to email & its working. Now I have to fax the attached pdf file with out using any third party or commercial software.
    Any idea or suggestion would be very help full
    regards
    Prakash Sen

  • 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

Maybe you are looking for

  • Windows 7: No On-Screen Display

    I have updated my T60 to Windows 7 and have installed all the latest drivers for my system.  I have installed the latest drivers for hotkey and system interface, but still cannot get the on screen display to show up.  I do get the on screen display t

  • How to load 1 milloin rows ???

    Hi, I want to load 1 million rows in one of my table through sql loader,is it possible to load??or I have a table named sales in which i have 1 milloin rows how could I write those rows into notepad or any other text editor or even excel?? thanks in

  • Multiple Leopard Servers - DNS Setup

    Hi guys, Just wandering what I need to do when setting up more than one server on the network with my DNS settings. I already have a leopard server box, running advanced with DNS setup and working correctly. How do I setup the second server? Do I cre

  • Grid Control Post Changes Slow

    I have a primary database on one server, a standby database on another server. The fast start failover observer is on the same server as the grid control. When I do a fast start failover it takes approximately 25 minutes to update the grid control. I

  • Problematic InDesign CS5 Animation and exporting, any help?

    Hi there, I am an experienced InDesign user, and have recently started using CS5. I am using it to create a very simple flash website however I am encountering 2 problems. 1. WHENEVER I have consecutive animations, such as a) Object 1, Fly in from to