Mail and attachment (Sender Channel)

Hi,
I receive e-mails with attachments. These are processed correctly because I addad the PayloadSwapBean into the module chain of the communication channel.
Sometimes (when I send an e-mail with attachment from my own e-mail account) the attachment is not processed.
Is there a specific way to send the attachments?
Best regards
ROn

Hi,
What I meant was that i send email from my account [email protected] to [email protected]
The mail adapter is polling with POP on [email protected]
When I look in the messaging system I find the message
2006-07-14 10:46:51 Success Swap: swapping by Content-Description ? MailAttachment-1
2006-07-14 10:46:51 Success Swap: no matching payload found
But the emails that are processed correctly also have this message....
We are on SP14
Ron
Message was edited by: Ron van der Sterren

Similar Messages

  • E-mail and Attachment Problem on web...

    hi guys,
    I developed a form in forms 6i for my client/server application. It was working well in c/s environment. I use to generate a PDF file and send the same file via attachment to the person by giving its e-mail address.
    But the same form is not working when i have deployed the form on web via forms9iAS.
    My code that use to send the e-mail and attachemnt was like this:
    Declare
    Outlook_Object OLE2.OBJ_TYPE;
    Mail_Object OLE2.OBJ_TYPE;
    Item1 OLE2.OBJ_TYPE;
    Item2 OLE2.OBJ_TYPE;
    OLEPARAM ole2.list_type;
    var_Send OLE2.OBJ_TYPE;
    var_Attach1 OLE2.OBJ_TYPE;
    var_Attach2 OLE2.OBJ_TYPE;
    plist ParamList;
    starting_date varchar2(10);
    ending_date varchar2(10) ;
    FileName varchar2(80);
    Lstarting_date varchar2(10);
    Get_Employee_ID varchar(200);
    Get_Where varchar(200);
    Mail_Subject varchar2(500);
    LcBody varchar2(2000);
    BEGIN
    -- Begining sending e-mail to Departmental Heads
    go_block('vBasc_inf');
    first_record;
         ---while :system.last_record = 'FALSE'
         loop
              if      :vBasc_inf.chkSend = 'Y' THEN
                   Plist := get_parameter_list ('Attendance');
                        if not Id_null(Plist) then
                             destroy_parameter_list(Plist);
                        end if ;
                        Plist := create_parameter_list('Attendance');
                        Starting_Date := To_char(:NonDatabase.txtStarting_date,'dd/mm/yyyy');
                        Ending_Date := To_char(:NonDatabase.txtending_date,'dd/mm/yyyy');
                   LStarting_date := to_char(:NonDatabase.txtStarting_date,'yyyy-mm-dd');
                   --FileName := 'c:\bss\attendance\'
                   -- || substr(:vBasc_inf.txtbranch,1,1) ||'-'
                   -- || Rtrim(substr(:vBasc_inf.txtDepartment,1,3)) || '-'
                   -- || LStarting_date || '.pdf';
                   FileName := 'c:\bss\attendance\'
                   || :vBasc_inf.Employee_id ||'-'
                   || LStarting_date || '.pdf';
                        mail_subject := 'Attendance Sheet ' || To_char(:NonDatabase.txtStarting_date,'dd-Mon-yy') || ' to ' || To_char(:NonDatabase.txtending_date,'dd-Mon-yy') || ' (' || :vBasc_inf.department_id || ')' ;
    --                    host('Del ' || filename ,NO_SCREEN );
                        --Add_parameter(plist,'PBranch_id',text_parameter,:vBasc_inf.branch_id);
                        --Add_parameter(plist,'pdepartment_id',text_parameter,:vBasc_inf.Department_ID);
                        Add_parameter(plist,'pstarting_date',text_parameter,Starting_date);
                        Add_parameter(plist,'pending_date',text_parameter,Ending_date);
                        Add_parameter(plist,'PEmployee_id',text_parameter, :vBasc_inf.employee_id);
                        Add_parameter(plist,'PARAMFORM',text_parameter,'NO');
                        Add_parameter(plist,'DESNAME',text_parameter,FileName);
                        Add_Parameter(plist,'DESTYPE',TEXT_PARAMETER,'FILE');
                        Add_Parameter(plist,'DESFORMAT',TEXT_PARAMETER,'PDF');
                        run_product(reports,'EmployeeWise_AttendanceSheet',synchronous,batch,filesystem,plist,screen);
                        SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
                        Outlook_Object := OLE2.CREATE_OBJ('Outlook.Application');
    ---               OLE2.Set_Property(Outlook_Object,'UserName', 'Daily Attendance');
    ---               message ('Yes');
    ---               message ('Yes');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,'MAPI');
                        Mail_Object := OLE2.INVOKE_OBJ(Outlook_Object,'GetNameSpace',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        --newMail
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,0);
                        Item1 := OLE2.INVOKE_OBJ(Outlook_Object,'CreateItem',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        -- If you want to display outlook new message screen
    --               Item2 := OLE2.INVOKE_OBJ(Item1,'Display');
              ole2.set_property(Item1,'To',:vBasc_inf.e_mail);
              ---ole2.set_property(Item1,'To','[email protected]');
                        ole2.set_property(Item1,'Subject',Mail_Subject );
                        LcBody := :vbasc_inf.emp_name||','|| chr(13) ||chr(13) || :nondatabase.txtmessage ;
                        ole2.set_property(Item1,'Body',LcBody );
                        --ole2.set_property(Item1,'Body','This is First mail of Attendance Sheet');
                        var_Attach1 := OLE2.GET_OBJ_PROPERTY(Item1,'Attachments');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,FileName);
                        var_Attach2 := OLE2.INVOKE_OBJ(var_Attach1,'add',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        var_Send := OLE2.INVOKE_OBJ(Item1,'Send');
              end if ;
              :vBasc_inf.chksend := 'N';
         IF :system.last_record = 'TRUE' THEN
                   set_item_property('vBasc_inf.CMDCHECKALL', label, 'Check All');
              EXIT ;
         END IF ;
              next_record;
              end loop ;     
              OLE2.RELEASE_OBJ( Item1);
              OLE2.RELEASE_OBJ( Mail_Object );
              OLE2.RELEASE_OBJ( Outlook_Object );
              SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
              first_record;
              Message('Mail sent seccessfully.........');
              Message('Mail sent seccessfully.........');
    -- Ending sending e-amil to Departmental Heads     
    END;
    BUT now on web its giving me the following error:
    REP-0081: Error during the IO operations.
    REP-0110: Unable to open file 'C:\bss\attendance\14210-01/01/2005.PDF'.
    scaba 14
    What changes i have to made to this form to run well on web?
    Or is there any other way to send mails and attachment in forms 6i for web using oracle9iAS?
    Pliz help.
    Imran Baig

    I have changed my Code from run product to :
    Declare
    Outlook_Object OLE2.OBJ_TYPE;
    Mail_Object OLE2.OBJ_TYPE;
    Item1 OLE2.OBJ_TYPE;
    Item2 OLE2.OBJ_TYPE;
    OLEPARAM ole2.list_type;
    var_Send OLE2.OBJ_TYPE;
    var_Attach1 OLE2.OBJ_TYPE;
    var_Attach2 OLE2.OBJ_TYPE;
    plist ParamList;
    starting_date varchar2(10);
    ending_date varchar2(10) ;
         FileName varchar2(80);
    Lstarting_date varchar2(10);
    ln_emp_id number(8);
    lc_email varchar2(100);
    Get_Employee_ID varchar(200);
    Get_Where varchar(200);
    Mail_Subject varchar2(500);
    LcBody varchar2(2000);
    lc_msg_txt VARCHAR2(2000);
         lc_slc_stmt VARCHAR2(4000);
         lc_slc_stmt2 VARCHAR2(4000);
         lc_Slct_Smry VARCHAR2(4000);
         lpl_para_id PARAMLIST;
    lc_alert_btn NUMBER;
    LC_RP_HD          VARCHAR2(4000);
    LC_RP_HD2 VARCHAR2(4000);
    Lc_Rp_Order VARCHAR2(4000);
    web_message varchar2(4000);
    cursor C1 is
    select emp_employees.employee_id, emp_emp_info.e_mail
         from emp_employees, emp_emp_info
         where emp_employees.employee_id = emp_emp_info.employee_id
         and emp_emp_info.e_mail is not null
         and emp_employees.employee_id between :emp_date_blk.from_id and :emp_date_blk.to_id
         and emp_employees.employee_id = 14210
         order by emp_employees.employee_id;
    BEGIN
         OPEN C1;
         IF C1%ISOPEN THEN
              LOOP
                   FETCH C1 INTO ln_emp_id, lc_email;
                   EXIT WHEN C1%NOTFOUND;
                        Plist := get_parameter_list ('email_sal_slip');
                             if not Id_null(Plist) then
                                  destroy_parameter_list(Plist);
                             end if ;
                        Plist := create_parameter_list('email_sal_slip');          
                        FileName := 'c:\'
                   || ln_emp_id || '.pdf';
                   mail_subject := 'Salary slip for the month of ' || To_char(:emp_date_blk.from_date,'Month-yyyy') ;
                   lc_slc_stmt := User_Selection(lc_msg_txt, lc_slct_smry,lc_Rp_Hd,lc_Rp_Hd2,lc_Rp_Order);
                   lc_slc_stmt := 'P_where=' || '"' || lc_slc_stmt || '"';
                   lc_Rp_Hd := ' Rp_Heading=' || '"' || lc_Rp_Hd || '"';
                        lc_Rp_Hd2 := ' Rp_Heading2=' || '"' || lc_Rp_Hd2 || '"';
                        lc_Rp_Order := ' P_Order_BY=' || '"' || lc_Rp_Order || '"';
                        Add_parameter(plist,'PARAMFORM',text_parameter,'NO');
                        Add_parameter(plist,'DESNAME',text_parameter,FileName);
                        Add_Parameter(plist,'DESTYPE',TEXT_PARAMETER,'FILE');
                        Add_Parameter(plist,'DESFORMAT',TEXT_PARAMETER,'PDF');
                        --run_product(reports,'EmployeeWise_AttendanceSheet',synchronous,batch,filesystem,plist,screen);
                        Execute_Report('EMP_SAL_SLIP', 'EMP_SAL_SLIP.rdf', 'EMP_SAL_SLIP.PDF', 'PDF', 'BSSRepSrvA', 'ora-test-app', lc_slc_stmt2, web_message);
                        SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
                        Outlook_Object := OLE2.CREATE_OBJ('Outlook.Application');
    ---               OLE2.Set_Property(Outlook_Object,'UserName', 'Daily Attendance');
    ---               message ('Yes');
    ---               message ('Yes');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,'MAPI');
                        Mail_Object := OLE2.INVOKE_OBJ(Outlook_Object,'GetNameSpace',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        --newMail
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,0);
                        Item1 := OLE2.INVOKE_OBJ(Outlook_Object,'CreateItem',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        -- If you want to display outlook new message screen
    --               Item2 := OLE2.INVOKE_OBJ(Item1,'Display');
              ole2.set_property(Item1,'To',lc_email);
              ---ole2.set_property(Item1,'To','[email protected]');
                        ole2.set_property(Item1,'Subject',Mail_Subject );
                        ole2.set_property(Item1,'Body',LcBody );
                        --ole2.set_property(Item1,'Body','This is First mail of Attendance Sheet');
                        var_Attach1 := OLE2.GET_OBJ_PROPERTY(Item1,'Attachments');
                        OLEPARAM := OLE2.CREATE_ARGLIST;
                        OLE2.ADD_ARG(OLEPARAM,FileName);
                        var_Attach2 := OLE2.INVOKE_OBJ(var_Attach1,'add',OLEPARAM);
                        OLE2.DESTROY_ARGLIST( OLEPARAM );
                        var_Send := OLE2.INVOKE_OBJ(Item1,'Send');
              END LOOP;
         CLOSE C1;
         OLE2.RELEASE_OBJ( Item1);
              OLE2.RELEASE_OBJ( Mail_Object );
              OLE2.RELEASE_OBJ( Outlook_Object );
              SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
              Message('Mail sent seccessfully.........');
              Message('Mail sent seccessfully.........');
         END IF;
    END;
    Have used d2kwutility to execute my report. i have also instaled outlook on my application server.
    Now when i try to run my report and send e-mail it gives the following error.
    ORA-305500
    What is this error about and how to resolve it?
    Imran

  • JDBC and FTP sender channels stop polling

    Hi,
    We have a great volume of sender JDBC and FTP sender channels.
    For this reason there is nothing unusual to have temporary error connections.
    Several months ago, with an XI 3.0 system, sender channels recover its functionality  automatically when temporary error connection is solved.
    But now, he have migrate to a  PI 7.1 sytem, and in the same scenario and configuration,  sender channel stop polling after a temporary error . In cc monitor this channels remains in  green status and there were no signs of stopped interfaces.
    Timeouts are correctly defined and there is no difference between channel configuration in our Xi and PI system.
    How to solve this problem?
    Thanks, in advance.
    Carme.

    Thanks for your fast response, Stefan.
    After writing this post, i ask the same question to our basis team and  we are in the latest sp.
    ¿do you know if there is any note or can you provide me some additional information?
    I'm not able to find any note about this issue...
    Regards,
    Carme.

  • 2 file to file scenarios and one sender channel

    hello there,
    i am implementing 2 file to file scenarios. referring to the below link i have 'by-pass' integration repository in order to perform my file to file transfer since both the input and output files have the same structure, hence no mapping is required.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417500%29ID0036662950DB01052533299951691312End?blog=/pub/wlg/4383 --> How to send any data (even binary) through XI, without using the Integration Repository
    as seen in the link provided above, it is mentioned to provide a 'dummy' interface and namespace as no such things were created in the IR.
    Now i have a second development which perform the same task(file 2 file) however the naming and source/target directory for the second one differs fromt eh first.
    that is for the first one the source directory is srcroot/folder1/ and for the secon one is  srcroot/folder2
    the  target for the first scenario is  trtroot/folder1 and second is trtroot/folder2.
    i wanted to use the same sender channel, making use of the advanced features to pick the files from the different directories, however the scenario always put my files, even those from srcroot/folder2, in the first target folder that is in trtroot/folder1 instead of trtroot/folder2.
    one easy way of doing this, is to create channels for each scenario, but if possible i want to use one sender channels for both, is that possible for my scenarios?
    can anyone please advise me?
    if there is a better way, you are welcome to share it with me.
    thank in advance.

    Hi,
    You can pick the data using same sender channel.
    But there are two ways of putting the files to their corresponding destinatios:
    1)Using 'Adapter Specific Message Attribute' in communication channel.
    But for this to work you have write UDF in your mapping, but as you are not using IR part, this approach can't be used.
    2) Another way is, you can use variable substitution method, where the values of the target directory is populated by payload of the incoming file.
    If this is not possible, then there is no way but to define 2 diffrent communication channels for receiver.
    -Supriya.

  • E-mail and attachement

    Hi there,
    i tried many time to send email with an attachment in yahoo i couldn't do that in Safari its closed and telling me, ignore or relogin, i can make email and attachement by Firefox everything is okay!
    any help please

    This is an Outlook problem (especially if other Mac and PC/Windoze users have none of these problems) and I believe it may depend on the Outlook version the recipient is using.
    Sounds like you are using RTF for message composition and if so, try using Plain Text instead.

  • Use action to send e-mail and attach e-mail to docflow

    Hello guys,
    I am having troubles achieving the following:
    My task is to create an action for a specific transaction type and send out an e-mail (I already finished this part). The e-mail should be available in the transaction history of the transaction.
    I created an action profile and an action for leads and used the method call to be able to use BAdI EXEC_METHODCALL_PPF. Based on implementation CRM_COMPL_MAIL I was able to send out my e-mail with a custom mail form.
    Now the question is how can I put this e-mail to the doc flow of the business transaction (lead)?
    Does somebody have an idea how to achieve that?
    Best regards
    Sascha

    Hello,
    in the meantime I achieved the following:
    - Implemented custom method for action
    - method is triggered when a new lead is saved
    - custom method determines a mail form and creates an e-mail with function modules CRM_ERMS_MAIL_COMPOSE  and CRM_ERMS_MAIL_SEND
    - create an custom activity with a Z process type for e-mail
    - attach the activity to the lead to make it available in the transaction history
    Now I am having troubles with putting the content of the created e-mail to the activity. Can somebody help me here? I am trying to achieve that by using BOL programming and putting the content to BTHeaderTextSet and BTTextHAll of the BTOrder that I created for the activity.
    Best regards
    Sascha

  • Interactive Forms, send e-mail and attach the PDF document

    Hi all, 
    I've the form and I don't know if I can send an email, trough a button (Jscript or Formcalc), with in attachment my filled form in PDF format (further the XML Data)?   
    I don't now also if with Jscript, i can invoke the print and set automatically the print device that I want use to print.
    Thanks in advance,
    Antonello Didonna

    Hi Michal,
    Ok for the email...
    now I'm looking for something to attach a file at the mail.
    For printing, I've found this older code to set the printer:
    var pp = this.getPrintParams();
    pp.interactive = pp.constants.interactionLevel.automatic;
    pp.printerName = "hp officejet d series";
    this.print(pp);
    This code seems that is supported on Abode 6 or later.
    You know another method to set the printer?
    The target is print the PDF at file.
    I've seen also that there's also this method but I don't understand how I can use it!
    FilePrintSilent
    Prints all pages in a document, without displaying a print dialog box to the user. For PostScript printing, only Level 1 operators are used, only ASCII data is generated, and the documentu2019s pages are not shrunk to fit into the imageable area of the printed page.
    FilePrintSilent is also supported in Adobe Reader.
    Syntax
    [FilePrintSilent(char* fullPath)]
    Parameters
    fullPath
    The full path of the file to be printed.
    FilePrintSilent [here|http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?&accessible=true].
    Thanks so much,
    Antonello Didonna

  • How can I attach individual e-mail address lists to an e-mail and then send the lists to another person?

    I want someone else to be able to send group e-mails, using mail lists that I have created. What is the easiest way of e-mailing my mail lists to someone else? I do not see how individual mail lists can be made as an attachment to an e-mail.

    Thanks. I suspected that was the answer.

  • How to pre-populate the sender's mail and attach a pdf report.

    I mean....supppose i want to prepopulate the senders email field in a email dialogue box and the have an option to attach a report to the mail...so that a mail can be sent to the senders mail id as well as the recepients id.

    Actually .....how should i do this in Flex......i mean the process...and that too...how to retrieve the email of the person who has logged in??

  • Mail and attachment

    I cannot any attachment with Mail. Either there is no attachment when the recipient open the email or the content of the attachment is the same as the content of the email. It happens between Mac computers.
    Any solutions

    Eric,
    Not sure what is happening, but please test using only Plain Text, rather than Rich Text, and if using a Signature, change to none for the test.
    Let me know the result.
    Ernie

  • I am getting bulk junk mail and the sender is using my email address. How do I stop it?

    They do not come into my main account, only through Thunderbird. I email myself sometimes, so I cannot make a filter to block myself.

    In most cases, someone has acquired your email address and is simply pasting it into the "From:" box when he builds and transmits his spam messages. He hasn't "hacked" your account, and he isn't sending from any equipment you have any control over. Changing passwords almost always has zero effect, since he isn't logging in as you. Have you ever found any of these messages in your Sent folder?
    You started a thread, then posted a reply in a separate thread. It's easy enough when you get an email notification of a reply to your thread, as the link in the email will bring you straight here.
    If you want to add to your own thread, look in your "profile" here on this forum to find a list of your previous postings. Or bookmark your thread in your browser.
    John99 has simply joined your two threads together to help anyone trying to help you.
    Since you have no control over what any 3rd party does on his own computer (or more likely, an "owned" or hijacked computer) you can't stop him.
    Anyway, why bother with a filter if the bad messages are being placed into Bulk or Spam? Your email provider's anti-spam system would appear to be doing its job. And if they aren't labelled as Spam or Junk, don't be afraid to do so yourself. Good spam and junk filtering is bit more sophisticated than just looking at the ostensible "From:" address; it will also be looking at IP addresses and checking against blacklists for known spam sources, and using heuristics to identify patterns.
    Plus what finitarry said. ;-)

  • Mail and iPhoto- sending distorted images

    When a batch of photos are emailed from iPhoto using Apple Mail, the first photo of the batch is distorted. Not sure how to remedy the problem. It has been happening for several weeks. Any suggestions?

    Another problem that may be related….
    I have Snapz Pro. I used to be able to save the snaps to my desktop or a folder. Now when I take a screenshot and try to save the file to my desktop or a folder on my desktop I get this message  "Files cannot be created in the selected location. You do not have permission to write to the selected location.   Please choose a different location."  I have found that i can only save the file to the clipboard.   I have repaired permissions many times and still I have this problem.

  • Sender Mail Adapter Attachment

    Hi All
    The mail I get from the 3rd party has a body and attachment. I have done the TRANSORM module as described in some of the forums, and then the Plain2XML.
    On sxmb_moni I see the MailMessage and MailAttachment-1, where the MailMessage is in XML format and MailAttachment in normal text. What should I do to completely ignore the MailMessage(body of the mail) and just send MailAttachment to the receiver.
    I have tried to split the message to two receivers, but because the attachment message does not transform to xml, it gives me a mapping error. Is there anyway I can either ignore the body and just send the attachment to the receiver without doing JAVA code.
    Thanks in advance
    Clinton

    Hi Jin
    Thanks for your answer.
    This is how I am using the module within the Sender Mail Adapter.
    localejbs/AF_Modules/PayloadSwapBean           TRANSFORM
    localejbs/AF_Modules/MessageTransformBean     Plain2XML
    TRANSFORM     swap.keyName     Content-Description
    TRANSFORM     swap.keyName     Content-Disposition
    TRANSFORM     swap.keyValue     attachment;filename="MailAttachment-1.xml"
    TRANSFORM     swap.keyValue     MailAttachment-1.xml
    Plain2XML     Transform.Class          com.sap.aii.messaging.adapter.Conversion
    Plain2XML     Transform.ContentType     text/xml;charset=utf-8
    Plain2XML     xml.conversionType     SimplePlain2XML
    Plain2XML     xml.documentName     MT_TEBA_Contractor_Details
    Plain2XML     xml.documentNamespace     http://lonmin.co.za/TEBA_to_SAP
    Plain2XML     xml.fieldNames          ENG_TYPE,INDUST_NO,COMPANY_NUMBER,SURNAME,INITIALS,NAME,REGISTERED,MALE,EXPERIENCE,RACE,MARITAL,DEPENDENTS,BIRTH_DATE,LANGUAGE,EDUCATION,SPOUSE,RELIGION,OFFICE,SERIAL_NO,REG_YEAR,SERV_START,SERV_EXPIRE,SERV_PER,LAST_CHANGE_DATE,LAST_CHNAGE_TIME,ID_DOC,ID_EFF_DATE,ID_EXP_DATE,PASSPORT,PASS_EFF_DATE,PASS_EXP_DATE,COUNTRY,DISTRICT,ADDR1,ADDR2,ADDR3,POSTCODE,PHONE,BI_1733_NO,REASON
    Plain2XML     xml.fieldSeparator     |
    Plain2XML     xml.processFieldNames     fromConfiguration
    Plain2XML     xml.structureTitle     Details
    Using it like this it does not do the swap correct and it still put the data within the body as xml, and leave the attachment as txt.
    Can you see something wrong here.
    Thanks
    Clinton

  • Convert Screen(spool) to PDF file sending mail with attach file

    Hi :
    I'd like convert spool list to pdf and sending file...
    so, I read thread about spool convert to PDF before,
    and know how to convert Spool to PDF file and send mail with attach file.
    but I have a problem.
    my solution as:
    step 1. Call function: "CONVERT_ABAPSPOOLJOB_2_PDF"
    step 2. Call function: "SO_NEW_DOCUMENT_ATT_SEND_API1"
    then, I got a mail with attached PDF file, but the PDF file display limited 255 line.( SO_NEW_DOCUMENT_ATT_SEND_API1 limited)
    I want to showing word is wider that 255.
    and then I find a manual method as:
    After program finished.
    Function Menu -> system -> List -> Send
    use Prog: "Create Document and Send"
    I use this prog sending mail and attached file ,
    PDF file do <b>NOT</b> have 255 word limit !
    finally. my question is, If I want sending mail as Prog: "Create Document and Send", how to do?
    which Function I have to use?...
    Please help me, Thanks!

    Hi,
    Check this sample code of sending spool as attachment to an email address..
    Parameters.
    PARAMETERS: p_email(50) LOWER CASE.
    PARAMETERS: p_spool LIKE tsp01-rqident.
    Data declarations.
    DATA: plist         LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: document_data LIKE sodocchgi1.
    DATA: so_ali        LIKE soli OCCURS 100 WITH HEADER LINE.
    DATA: real_type     LIKE soodk-objtp.
    DATA: sp_lang       LIKE tst01-dlang.
    DATA: line_size     TYPE i VALUE 255.
    DATA: v_name        LIKE soextreci1-receiver.
    DATA rec_tab        LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    Get the spool data.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
         EXPORTING
              rqident              = p_spool
              first_line           = 1
              last_line            = 0
              desired_type         = '   '
         IMPORTING
              real_type            = real_type
              sp_lang              = sp_lang
         TABLES
              buffer               = so_ali
         EXCEPTIONS
              no_such_job          = 1
              job_contains_no_data = 2
              selection_empty      = 3
              no_permission        = 4
              can_not_access       = 5
              read_error           = 6
              type_no_match        = 7
              OTHERS               = 8.
    IF sy-subrc <> 0.
      MESSAGE s208(00) WITH 'Error'.
      LEAVE LIST-PROCESSING.
    ENDIF.
    Prepare the data.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 0.
    plist-body_num = 0.
    plist-doc_type = 'RAW'.
    plist-obj_descr = 'Test ALV'.
    APPEND plist.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 1.
    DESCRIBE TABLE so_ali LINES plist-body_num.
    plist-doc_type = real_type.
    Get the size.
    READ TABLE so_ali INDEX plist-body_num.
    plist-doc_size = ( plist-body_num - 1 ) * line_size
                     + STRLEN( so_ali ).
    APPEND plist.
    Move the receiver address.
    MOVE: p_email  TO rec_tab-receiver,
          'U'      TO rec_tab-rec_type.
    APPEND rec_tab.
    IF NOT sp_lang IS INITIAL.
      document_data-obj_langu = sp_lang.
    ELSE.
      document_data-obj_langu = sy-langu.
    ENDIF.
    v_name = sy-uname.
    Send the email.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
         EXPORTING
              document_data              = document_data
              sender_address             = v_name
              sender_address_type        = 'B'
         TABLES
              packing_list               = plist
              contents_bin               = so_ali
              receivers                  = rec_tab
         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 e208(00) WITH 'Error'.
    ENDIF.
    COMMIT WORK.
    Send the email immediately.
    SUBMIT rsconn01
    WITH mode = 'INT'
    AND RETURN.
    Thanks,
    Naren

  • Help regd in sending mails with attachment

    Hi All,
    I have a requirement to send mails with attachements.The attachments can be simple word , excel anything. Please help.Is there a way I can send these from workflows also?

    hi use this , this is one of the best examples for sending mail ....
    1. We can send files with attachment.
    However, There is some trick involved
    in the binary files.
    2. I have made a program (and it works fantastic)
    ONLY 6 LINES FOR EMAILING
    BELIEVE ME
    ITS A FANTASTIC PROGRAM.
    IT WILL WORK LIKE OUTLOOK EXPRESS !
    3. The user is provided with
    a) file name
    b) email address to send mail
    and it sends ANY FILE (.xls,.pdf .xyz..)
    Instantaneously !
    4. Make two things first :
    1. Include with the name : ZAMI_INCLFOR_MAIL
    2. Report with the name : ZAM_TEMP147 (any name will do)
    3. Activate both and execute (2)
    4. After providing filename, email adress
    5. Code for Include :
    10.08.2005 Amit M - Created
    Include For Mail (First Req F16)
    Modification Log
    Data
    DATA: docdata LIKE sodocchgi1,
    objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
    objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
    objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
    objhex LIKE solix OCCURS 10 WITH HEADER LINE,
    reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    DATA: tab_lines TYPE i,
    doc_size TYPE i,
    att_type LIKE soodk-objtp.
    DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
    FORM
    FORM ml_customize USING objname objdesc.
    Clear Variables
    CLEAR docdata.
    REFRESH objpack.
    CLEAR objpack.
    REFRESH objhead.
    REFRESH objtxt.
    CLEAR objtxt.
    REFRESH objbin.
    CLEAR objbin.
    REFRESH objhex.
    CLEAR objhex.
    REFRESH reclist.
    CLEAR reclist.
    REFRESH listobject.
    CLEAR listobject.
    CLEAR tab_lines.
    CLEAR doc_size.
    CLEAR att_type.
    Set Variables
    docdata-obj_name = objname.
    docdata-obj_descr = objdesc.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addrecp USING preceiver prec_type.
    CLEAR reclist.
    reclist-receiver = preceiver.
    reclist-rec_type = prec_type.
    APPEND reclist.
    ENDFORM. "ml_customize
    FORM
    FORM ml_addtxt USING ptxt.
    CLEAR objtxt.
    objtxt = ptxt.
    APPEND objtxt.
    ENDFORM. "ml_customize
    FORM
    FORM ml_prepare USING bypassmemory whatatt_type whatname.
    IF bypassmemory = ''.
    Fetch List From Memory
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = listobject
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'LIST_FROM_MEMORY'.
    ENDIF.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    COMPRESSED_SIZE =
    TABLES
    in = listobject
    out = objbin
    EXCEPTIONS
    OTHERS = 1
    IF sy-subrc 0.
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
    WITH 'TABLE_COMPRESS'.
    ENDIF.
    ENDIF.
    Header Data
    Already Done Thru FM
    Main Text
    Already Done Thru FM
    Packing Info For Text Data
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'TXT'.
    APPEND objpack.
    Packing Info Attachment
    att_type = whatatt_type..
    DESCRIBE TABLE objbin LINES tab_lines.
    READ TABLE objbin INDEX tab_lines.
    objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = att_type.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = whatname.
    APPEND objpack.
    Receiver List
    Already done thru fm
    ENDFORM. "ml_prepare
    FORM
    FORM ml_dosend.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = docdata
    put_in_outbox = 'X'
    commit_work = 'X' "used from rel. 6.10
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    CONTENTS_HEX = objhex
    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 ID 'SO' TYPE 'S' NUMBER '023'
    WITH docdata-obj_name.
    ENDIF.
    ENDFORM. "ml_customize
    FORM
    FORM ml_spooltopdf USING whatspoolid.
    DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
    Call Function
    CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
    src_spoolid = whatspoolid
    TABLES
    pdf = pdf
    EXCEPTIONS
    err_no_otf_spooljob = 1
    OTHERS = 12.
    Convert
    PERFORM doconv TABLES pdf objbin.
    ENDFORM. "ml_spooltopdf
    FORM
    FORM doconv TABLES
    mypdf STRUCTURE tline
    outbin STRUCTURE solisti1.
    Data
    DATA : pos TYPE i.
    DATA : len TYPE i.
    Loop And Put Data
    LOOP AT mypdf.
    pos = 255 - len.
    IF pos > 134. "length of pdf_table
    pos = 134.
    ENDIF.
    outbin+len = mypdf(pos).
    len = len + pos.
    IF len = 255. "length of out (contents_bin)
    APPEND outbin.
    CLEAR: outbin, len.
    IF pos < 134.
    outbin = mypdf+pos.
    len = 134 - pos.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF len > 0.
    APPEND outbin.
    ENDIF.
    ENDFORM. "doconv
    CODE FOR PROGRAM
    5.
    REPORT zam_temp147 .
    INCLUDE zami_inclfor_mail.
    DATA
    DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA : file_name TYPE string.
    data : path like PCFILE-PATH.
    data : extension(5) type c.
    data : name(100) type c.
    SELECTION SCREEN
    PARAMETERS : receiver TYPE somlreci1-receiver lower case.
    PARAMETERS : p_file LIKE rlgrap-filename
    OBLIGATORY.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CLEAR p_file.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    file_name = p_file.
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM ml_customize USING 'Tst' 'Testing'.
    PERFORM ml_addrecp USING receiver 'U'.
    PERFORM upl.
    PERFORM doconv TABLES itab objbin.
    PERFORM ml_prepare USING 'X' extension name.
    PERFORM ml_dosend.
    SUBMIT rsconn01
    WITH mode EQ 'INT'
    AND RETURN.
    FORM
    FORM upl.
    file_name = p_file.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = file_name
    filetype = 'BIN'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    path = file_name.
    CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
    EXPORTING
    complete_filename = path
    CHECK_DOS_FORMAT =
    IMPORTING
    DRIVE =
    EXTENSION = extension
    NAME = name
    NAME_WITH_EXT =
    PATH =
    EXCEPTIONS
    INVALID_DRIVE = 1
    INVALID_EXTENSION = 2
    INVALID_NAME = 3
    INVALID_PATH = 4
    OTHERS = 5
    ENDFORM. "upl
    regards,
    venkat.

Maybe you are looking for

  • High memory use when checking downloads folder through browser

    High memory use when checking downloads folder through browser. I have a total of 3 DDR2 Gbytes of ram. Pentium(R) Dual-Core CPU T4500 @ 2.30GHz Win 7 home pr. 64bit. Firefox 27.0 beta I right click on a file to "open containing folder" from the drop

  • I Need Help urgent

    recently bought a blackberry 8520 its imei is in italy  3584720********* and the pin is 215***** company: TIM color: Blue Frost  the problem is that I brought to the Dominican Republic and I've been using here  in this country and after I broke the s

  • Install Oracle 10g XE in ubuntu

    Hi every body; I have installed Oracle 10g XE for n-time, and for each new install I find new problems: previously the welcome page http://127.0.0.1:8080/apex seems to work but I found a lot of problems so I decided to-reinstall the whole application

  • Why does Safari become unresponsive when more than 20 windows are open

    Does 3.0.3 fix this? It is extremely annoying to wait for the beachball for minutes on end after a certain number of windows( 15 to 25) are open. You can't open a new one , you can't close old ones, you can't scroll, you can't use the back arrow, you

  • Catalog tab in PM 0rder

    I want to connect the Catalog button at the bottom of Componenet tab in a PM order with some External Website. What are the settings in IMG? Does it require involvement of Basis and ABAP ? Regards VM