Issue with attachment file name

Hi All,
This is about an issue with attachment file name:
we have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
Regards
kiran

we have a scenario wherein we have payload with attachments ...(attachments can be any doc ,pdf) , problem is main document is comming with messageid.sap.com and thats normal but attachments are comming with file names for example something.pdf or something.doc or something.txt ...this is failing in adapter as it expects same name as u have in main document...anybody have any idea to get through this issue...
- <SAP:Payload xlink:href="cid:payload-4CED452F17C601BDE10080000A492050---sap.com">
  <SAP:Name>1 .Header1.txt</SAP:Name>
Error we are getting is
Cannot cast 'Header' to boolean] in class com.sap.aii.mappingtool.flib7.NodeFunctions method createIf[Header, com.sap.aii.mappingtool.tf7.rt.Context---27a73bfa]
So we have to change the File name Header1.txt to something which we can cast to creatif....(we cannot tell the sendr to change the file name as its is set already)
Thanks for interste and assisting
Regards
Kiran

Similar Messages

  • Need attachment file name which had sent or received in entire days.

    Hi Friends
    I need your help for getting information on exchange mailbox user who had sent or received  mails along with attachment file name for entire day.
    Basically I get the information of entire mails which had received or sent in all days but I am unable to get the information about attachment file name.
    Please do the needful.
    Regards, Md Ehteshamuddin Khan All the opinions expressed here is mine. This posting is provided "AS IS" with no warranties or guarantees and confers no rights.

    Hi,
    Based on my knowledge, Exchange has no built-in feature to get the attachment statistics report. But you can check if EWS can achieve it.
    About issues related to EWS, actually, we have a dedicated support team regarding the Exchange Server Development. I recommend you ask your question on our Exchange Server Development forum which is staffed by more experts specializing in this kind of problems.
    Thanks for your understanding.
    For your convenience:
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads
    Hope this can be helpful.
    Best regards,
    Amy Wang
    TechNet Community Support

  • Javamail API doesn't support special characters in attachment file name

    Hi,
    We are using Java Mail API to retrieve the attachment's file name, but it sometimes returns the file name as junk character (if the attachment contains special characters) and it is not able to return original file name for some attachments:
    Our code sample :
    void getFileName(Part part) {
    String fname=null;
    fname = part.getFileName();                          
    Actually the problem is with the attachment file name which contains special character. For example below is the attachment file name (please find the sample attached file which is causing this issue):
    Sample – 1234abc.doc
    From above you could see the file name contains a special character (Sample – 1234abc.doc), i.e. The character ‘–’ is not a regular hyphen character, it’s a special character. Hence the Java mail API returns the name as below:
    Sample ? 1234abc.doc
    So the special character is being replaced with ‘?’ symbol. But if I store this file in local folder and try reading the file name using Java IO packages, it returns the file name without adding ‘?’ symbol.
    Is there any way to handle such kind of special characters in Mail API?
    Regards,
    Vinodh

    We dealt with this issue in a private email conversation.
    JavaMail is returning the correct data for the filename.  The problem is in the way the filename is being displayed.

  • I just order 8 calendars from iPhoto and they came to me fine. Now I need to order two more but when I go thru the process I get a message  saying:unable to assemble calendar. There is a probleme with the photo with the file name"(Null)"   more........ .

    Would someone be able to explain to me the following issue with Iphoto?
    I ordered 8 same calendars for my soccer team and received them fine. Although a couple of pictures on it are a little off (out of focus). I need to order two more of the same calendars but when I go thru the process ireceive an error message saying:
    "Unable to to assemble  calendar" There is a problem with the photo with the file name "(Null)" The full resolution version of this photo either cannot be located or is corrupt. Please replace this photo or delete it from your calendar.
    How can  I fine this "corrupt" photo? How did it go thru with the first batch of calendars but won't go thru now?
    Thank you for your help.   

    Apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start
    with Option #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • A serious issue with excel file read in ODI

    hi gurus,
    Issue with excel file read is that we can read only one file by setting the path from ODBC Data Source Administrator-->System DNS -->Select Work book
    what i want to read the dynamic path(Every time I cant go back and set the Work book to select the excel file..
    So i came up with a solution to write a Vbscript that convert the excel to csv my problem got solved for dynamic paths the script is as follow:
    Set objArgs = WScript.Arguments
    For I = 0 to objArgs.Count - 1
    FullName = objArgs(I)
    FileName = Left(objArgs(I), InstrRev(objArgs(I), ".") )
    Set objExcel = CreateObject("Excel.application")
    set objExcelBook = objExcel.Workbooks.Open(FullName)
    objExcel.application.visible=false
    objExcel.application.displayalerts=false
    objExcelBook.SaveAs FileName & "csv",23
    objExcel.Application.Quit
    objExcel.Quit
    Set objExcel = Nothing
    set objExcelBook = Nothing
    Next
    Now this script convert the xls file to csv with comma seprated values
    e.g in excel sheet if data is ABC XYZ PQR
    csv will come with ABC,XYZ,PQR
    here the delimiter is , i want the delimiter as pipe | who's ascii code is 124
    but if i change 23 with 124 its not working i getting the error cannot save as...
    can anyone tell me that what should be the correct code for pipe
    so that the output is ABC|XYZ|PQR
    AS WE CAN USE THE SCRIPTS IN TOOLS
    Edited by: 789141 on Sep 14, 2010 11:33 PM

    I dont have the answer for your question but i have different approach in handling multiple Excel File.
    Step 1. Copy a sample source Excel File and Call it Final.xls .
    Step 2. Map this Final.xls to DSN and in Topology call this Final.xls
    Step 3. Do the Reversing and Map and test the Interface . Once its done.
    Step 4. Create a Package and using a http://odiexperts.com/?p=1426 get the list of all the Excel File
    Step 5 . Using this http://odiexperts.com/?p=273 create a Loop to Read the Excel File name
    Step 6 . Copy using OdiFileCopy to Final.xls and run your interface .
    Step 7. Increment the Loop and copy your next File for Final and run the interface
    Step 8 . Finally you will be able to read all the Excel File .
    Step 9 . Delete the source file [ Optional ]
    Hope this helps.

  • Issue with attachment in OAF

    Hi All,
    I have a issue with attachment functionality in OAF,
    I have a custom OAF page, in the header part of the page i have one attachment button there i am attaching a file, so i am able to attach the file the issue is.
    when the page loads for the first time it will populate a sequence in one of the field in the page , but when i am clicking the add attachment button i am able to aatched a file but the sequence getting chnaging, but i need the same sequence wht it was displayed during first page loads, so how i can restict page refreshing in attachment functionaly so that i can store the attachment file in the same sequence number what it was populared first time, please help me on this.
    Thnaks

    I could able to solve the issue by using the above code in an if else statement, in process request i kept
    like below:
    if (aFlag.equals("attachment")) {
    am=(OAApplicationModule)pageContext.getSessionValueDirect("xxretainAM");
    else
    rest of my code in process request
    Thnaks

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • Mail adapter- Attachment file name of scheme ddmm

    Hi ,
    I am working on File to Mail scenario.
    I checked on SDN, but I could not find exact solution.
    My requirement is :
    I need to mail HTML report file as attachment.
    To generate attachment file, I have done XSL mapping.
    Attachment file name should be : yyyymmdd.htm
    Mail text should be: This is autogenerated mail, please do not reply.
    Mail subject: SAP XI report ddmmyyy
    Please provide your inputs.
    Best Regards,
    Divyesh

    Hi Henrique,
    Thanks a lot for your response.
    Your answer is very helpful.
    I tried your code.
    I am getting error in RWB:  here I am including audit Log:
    2009-04-02 17:39:41 Success MP: Entering module processor
    2009-04-02 17:39:41 Success MP: Processing local module localejbs/CreateAttachment
    2009-04-02 17:39:41 Success MP: Processing local module localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    2009-04-02 17:39:41 Success Mail: message entering the adapter
    2009-04-02 17:39:41 Success Mail: Receiver adapter entered with qos ExactlyOnceInOrder
    2009-04-02 17:39:41 Success Mail: calling the adpter for processing
    2009-04-02 17:39:42 Error Mail: call failed; java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Success Mail: sending a delivery error ack ...
    2009-04-02 17:39:42 Success Mail: sent a delivery error ack
    2009-04-02 17:39:42 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Error Mail: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Error Exception caught by adapter framework: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Error Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>.
    2009-04-02 17:39:42 Success The message status set to WAIT.
    Can you please provide me help on this?
    Best Regards,
    Divyesh

  • I am having issues with Sidebar files not appearing from within InDesign CS5.5. They show up fine from other Adobe applications. Using OS10.6.8.

    I am having issues with Sidebar files not appearing from within InDesign CS5.5. They show up fine from other Adobe applications. Using OS10.6.8.

    I would first of all trash the preference file for InDesign, make sure the application is closed then find the prefs in
    /Users/USER NAME/Library/Preferences/Adobe InDesign and just throw the entire folder away, it will generate a new one after you launch InDesign again.
    Now launch InDesign and see if the problems are resolved.
    If not I would repair your permissions on your hard drive wih disk utility, and if that fails then di-install InDesign and re-install that single application.
    Let me know if any of these suggestions work for you
    I will be checking my email although you might have to wait for a response as I will be taking a microlight flight over the Victoria Falls tomorrow. Yay can hardly wait.

  • Issue with Sender File FCC

    Hi Experts,
    I have an issue with Sender File FCC Adapter. The file being picked is of type TXT and it is tab seperated. The first line contains the field names and from next line onwards we have values for those fields.
    The field names and field values are tab seperated. Even inserting a single letter in some field value manually disrupts the whole setup & alignment of the TXT file and the Sender File CC is unable to pick up the file from the shared folder. If the first file is errorenous and after that a correct TXT file is posted, it fails to pick up the correct file as it is trying to pick the errorenous file first.
    The Error thrown is :
    "Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 2 according to structure 'ABCD':java.lang.Exception: ERROR in configuration / structure 'ABCD.': More elements in file csv structure than field names specified!"
    I have two questions:
    1. Is there a way to handle such a scenario? For e.g., the errornous TXT file gets picked but throws error in PI.
    2. Is there an alternative that the sender FCC channel picks up the correct files and filter out the errorneous ones ? ?
    Thanks,
    Arkesh

    Hi Arkesh,
    I think you are passing more number of fields than expected. Please check paramters defined and send the data accordingly.
    In the processing parameters tab of sender file adapter, you have an option called Archive faulty source files, below to that you would have option to enter the " Directory for Archiving files with Errors".
    I hope this helps you....
    Thanks,

  • Send a mail with attached file .xls but i got file without

    i tried to send a mail with attached file .xls. but i am able to send the file , we recived the file without file name. please do the same
    thnaks in advance.
    END-OF-SELECTION.
    Populate message body text
    PERFORM POPULATE_EMAIL_MESSAGE_BODY.
    Send file by email as .xls speadsheet
    PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
    TABLES IT_MESSAGE
    IT_ATTACH
    USING P_EMAIL
    'Example .xls documnet attachment'
    'XLS'
    'filename'
    CHANGING GD_ERROR
    GD_RECIEVER.
    Instructs mail send program for SAPCONNECT to send email(rsconn01)
    PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
    SELECT EBELN EBELP AEDAT MATNR
    UP TO 10 ROWS
    FROM EKPO
    INTO TABLE IT_EKPO.
    ENDFORM. " DATA_RETRIEVAL
    *& Form BUILD_XLS_DATA_TABLE
    Build data table for .xls document
    FORM BUILD_XLS_DATA_TABLE.
    CONSTANTS: CON_CRET TYPE X VALUE '0D', "OK for non Unicode
    CON_TAB TYPE X VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
    CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
    INTO IT_ATTACH SEPARATED BY ''.
    CONCATENATE '' IT_ATTACH INTO IT_ATTACH.
    APPEND IT_ATTACH.
    LOOP AT IT_EKPO INTO WA_CHAREKPO.
    CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
    WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
    INTO IT_ATTACH SEPARATED BY ''.
    CONCATENATE '' IT_ATTACH INTO IT_ATTACH.
    APPEND IT_ATTACH.
    ENDLOOP.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    Send email
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
    PIT_ATTACH
    USING P_EMAIL
    P_MTITLE
    P_FORMAT
    P_FILENAME
    P_ATTDESCRIPTION
    P_SENDER_ADDRESS
    P_SENDER_ADDRES_TYPE
    CHANGING P_ERROR
    P_RECIEVER.
    DATA: LD_ERROR TYPE SY-SUBRC,
    LD_RECIEVER TYPE SY-SUBRC,
    LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
    LD_EMAIL LIKE SOMLRECI1-RECEIVER,
    LD_FORMAT TYPE SO_OBJ_TP ,
    LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
    LD_ATTFILENAME TYPE SO_OBJ_DES ,
    LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
    LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
    LD_RECEIVER LIKE SY-SUBRC.
    LD_EMAIL = P_EMAIL.
    LD_MTITLE = P_MTITLE.
    LD_FORMAT = P_FORMAT.
    LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
    LD_ATTFILENAME = P_FILENAME.
    LD_SENDER_ADDRESS = P_SENDER_ADDRESS.
    LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    Fill the document data.
    W_DOC_DATA-DOC_SIZE = 1.
    Populate the subject/generic message attributes
    W_DOC_DATA-OBJ_LANGU = SY-LANGU.
    W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
    W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
    W_DOC_DATA-SENSITIVTY = 'F'.
    Fill the document data and get size of attachment
    CLEAR W_DOC_DATA.
    READ TABLE IT_ATTACH INDEX W_CNT.
    W_DOC_DATA-DOC_SIZE =
    ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
    W_DOC_DATA-OBJ_LANGU = SY-LANGU.
    W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
    W_DOC_DATA-OBJ_DESCR = LD_MTITLE.
    W_DOC_DATA-SENSITIVTY = 'F'.
    CLEAR T_ATTACHMENT.
    REFRESH T_ATTACHMENT.
    T_ATTACHMENT[] = PIT_ATTACH[].
    Describe the body of the message
    CLEAR T_PACKING_LIST.
    REFRESH T_PACKING_LIST.
    T_PACKING_LIST-TRANSF_BIN = SPACE.
    T_PACKING_LIST-HEAD_START = 1.
    T_PACKING_LIST-HEAD_NUM = 0.
    T_PACKING_LIST-BODY_START = 1.
    DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
    T_PACKING_LIST-DOC_TYPE = 'RAW'.
    APPEND T_PACKING_LIST.
    Create attachment notification
    T_PACKING_LIST-TRANSF_BIN = 'X'.
    T_PACKING_LIST-HEAD_START = 1.
    T_PACKING_LIST-HEAD_NUM = 1.
    T_PACKING_LIST-BODY_START = 1.
    DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
    T_PACKING_LIST-DOC_TYPE = LD_FORMAT.
    T_PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
    T_PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
    T_PACKING_LIST-DOC_SIZE = T_PACKING_LIST-BODY_NUM * 255.
    APPEND T_PACKING_LIST.
    Add the recipients email address
    CLEAR T_RECEIVERS.
    REFRESH T_RECEIVERS.
    T_RECEIVERS-RECEIVER = LD_EMAIL.
    T_RECEIVERS-REC_TYPE = 'U'.
    T_RECEIVERS-COM_TYPE = 'INT'.
    T_RECEIVERS-NOTIF_DEL = 'X'.
    T_RECEIVERS-NOTIF_NDEL = 'X'.
    APPEND T_RECEIVERS.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = W_DOC_DATA
    PUT_IN_OUTBOX = 'X'
    SENDER_ADDRESS = LD_SENDER_ADDRESS
    SENDER_ADDRESS_TYPE = LD_SENDER_ADDRESS_TYPE
    COMMIT_WORK = 'X'
    IMPORTING
    SENT_TO_ALL = W_SENT_ALL
    TABLES
    PACKING_LIST = T_PACKING_LIST
    CONTENTS_BIN = T_ATTACHMENT
    CONTENTS_TXT = IT_MESSAGE
    RECEIVERS = T_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.
    Populate zerror return code
    LD_ERROR = SY-SUBRC.
    Populate zreceiver return code
    LOOP AT T_RECEIVERS.
    LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
    ENDLOOP.
    ENDFORM.
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    Instructs mail send program for SAPCONNECT to send email.
    FORM INITIATE_MAIL_EXECUTE_PROGRAM.
    WAIT UP TO 2 SECONDS.
    SUBMIT RSCONN01 WITH MODE = 'INT'
    WITH OUTPUT = 'X'
    AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    Populate message body text
    FORM POPULATE_EMAIL_MESSAGE_BODY.
    REFRESH IT_MESSAGE.
    IT_MESSAGE = 'Please find attached a list test ekpo records'.
    APPEND IT_MESSAGE.
    ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY

    PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
      TABLES IT_MESSAGE
      IT_ATTACH
      USING P_EMAIL
      'Failed IDOC Analysis report'(020)
      'xls'(021)
      'IDOC_REP'(022)
      CHANGING GD_ERROR
      GD_RECIEVER.
    Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
    ENDFORM.                    " F_MAIL
    *& Form BUILD_XLS_DATA_TABLE
    Build data table for .xls document
    FORM BUILD_XLS_DATA_TABLE.
    *CONSTANTS: CON_CRET TYPE X VALUE '0D', "OK for non Unicode
    *CON_TAB TYPE X VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
      constants:
       con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE text-040 text-041 text-042 text-043 text-044 text-045 text-046 text-047 text-048 text-049
      INTO IT_ATTACH SEPARATED BY con_tab.
      CONCATENATE con_cret IT_ATTACH INTO IT_ATTACH.
      APPEND IT_ATTACH.
      clear IT_ATTACH.
      loop at i_final_t into w_final.
        CONCATENATE
        w_final-mestyp w_final-docnum  w_final-statxt w_final-msgno w_final-rvplant w_final-kunnr w_final-vbeln w_final-credat
                w_final-cretim w_final-flag INTO IT_ATTACH SEPARATED BY con_tab.
        CONCATENATE con_cret IT_ATTACH INTO IT_ATTACH.
        APPEND IT_ATTACH.
        clear IT_attach.
      endloop.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    Send email
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
    PIT_ATTACH
    USING P_EMAIL
    P_MTITLE
    P_FORMAT
    P_FILENAME
    P_ATTDESCRIPTION
    P_SENDER_ADDRESS
    P_SENDER_ADDRES_TYPE
    CHANGING P_ERROR
    P_RECIEVER.
      DATA: LD_ERROR TYPE SY-SUBRC,
      LD_RECIEVER TYPE SY-SUBRC,
      LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
      LD_EMAIL LIKE SOMLRECI1-RECEIVER,
      LD_FORMAT TYPE SO_OBJ_TP ,
      LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
      LD_ATTFILENAME TYPE SO_OBJ_DES ,
      LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
      LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
      LD_RECEIVER LIKE SY-SUBRC.
      LD_EMAIL = P_EMAIL.
      LD_MTITLE = P_MTITLE.
      LD_FORMAT = P_FORMAT.
      LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
      LD_ATTFILENAME = P_FILENAME.
      LD_SENDER_ADDRESS = P_SENDER_ADDRESS.
      LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    Fill the document data.
      W_DOC_DATA-DOC_SIZE = 1.
    Populate the subject/generic message attributes
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
      W_DOC_DATA-SENSITIVTY = 'F'.
    Fill the document data and get size of attachment
      CLEAR W_DOC_DATA.
      READ TABLE IT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
      ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE.
      W_DOC_DATA-SENSITIVTY = 'F'.
      CLEAR T_ATTACHMENT.
      REFRESH T_ATTACHMENT.
      T_ATTACHMENT[] = PIT_ATTACH[].
    Describe the body of the message
      CLEAR T_PACKING_LIST.
      REFRESH T_PACKING_LIST.
      T_PACKING_LIST-TRANSF_BIN = SPACE.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 0.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND T_PACKING_LIST.
    Create attachment notification
      T_PACKING_LIST-TRANSF_BIN = 'X'.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 1.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = LD_FORMAT.
      T_PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
      T_PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
      T_PACKING_LIST-DOC_SIZE = T_PACKING_LIST-BODY_NUM * 255.
      APPEND T_PACKING_LIST.
    Add the recipients email address
      CLEAR T_RECEIVERS.
      REFRESH T_RECEIVERS.
      T_RECEIVERS-RECEIVER = LD_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
      T_RECEIVERS-NOTIF_DEL = 'X'.
      T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = W_DOC_DATA
          PUT_IN_OUTBOX              = 'X'
          SENDER_ADDRESS             = LD_SENDER_ADDRESS
          SENDER_ADDRESS_TYPE        = LD_SENDER_ADDRESS_TYPE
          COMMIT_WORK                = 'X'
        IMPORTING
          SENT_TO_ALL                = W_SENT_ALL
        TABLES
          PACKING_LIST               = T_PACKING_LIST
          CONTENTS_BIN               = T_ATTACHMENT
          CONTENTS_TXT               = IT_MESSAGE
          RECEIVERS                  = T_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.
    Populate zerror return code
      LD_ERROR = SY-SUBRC.
    Populate zreceiver return code
      LOOP AT T_RECEIVERS.
        LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
      ENDLOOP.
    ENDFORM.                    "SEND_FILE_AS_EMAIL_ATTACHMENT
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    Instructs mail send program for SAPCONNECT to send email.
    FORM INITIATE_MAIL_EXECUTE_PROGRAM.
      WAIT UP TO 2 SECONDS.
      SUBMIT RSCONN01 WITH MODE = 'INT'
      WITH OUTPUT = 'X'
      AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    Populate message body text
    FORM POPULATE_EMAIL_MESSAGE_BODY.
      data: l1(99)    type c,
             l2(15)    type c,
             lt_message         type standard table of solisti1,
             ls_message      like line of lt_message.
      clear ls_message.
      l1 = 'Dear'(007).
      l2 =  'Sir/Madam'(008).
      concatenate l1 l2 ',' into
      ls_message-line separated by space.
      append ls_message to lt_message.
    *insert Blank Line
      clear ls_message.
      ls_message-line = space.
      append ls_message to lt_message.
    *Assign Message text
      clear ls_message.
      concatenate text-011
                  text-012
                  into ls_message-line separated by space.
      append ls_message to lt_message.
    *insert Blank Line
      clear ls_message.
      ls_message-line = space.
      append ls_message to lt_message.
    *Assign Message text
      clear ls_message.
      concatenate text-013
                  text-014
                  text-015
                  into ls_message-line separated by space.
      append ls_message to lt_message.
      concatenate text-016
                  text-017
                  into ls_message-line separated by space.
      append ls_message to lt_message.
    *insert Blank Line
      clear ls_message.
      ls_message-line = space.
      append ls_message to lt_message.
      ls_message-line = text-018.
      append ls_message to lt_message.
      ls_message-line = text-019.
      append ls_message to lt_message.
      clear: ls_message.
      REFRESH IT_MESSAGE.
      it_message[] = lt_message[].
      APPEND IT_MESSAGE.
    ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY

  • Mail attachment file name changes

    when i send mail with attached file having english file name, mail receiver can receive it as correct file name.
    But if having korean file name(ex: 우리나라.doc), recipient receives it as different file name(ie 우리나라.라.doc).
    how can i solve this problem?

    Is the reciever using windows? If so you can choose Edit > Attachments > Always Send Windows Friendly Attachments.

  • Email attachment file names

    I have a sender mail adapter that picks up emails with file attachments from a mail box using the IMAP transport protocol.
    The mail adapter passes processing onto the PayloadSwapBean and then onto a customised module that processes the file attachment (a CSV file).
    When I use the messaging system i.e. http://xiserver:port/MessagingSystem/monitor/monitor.jsp
    I can see that Content-Type includes the attachment's file name:-
    Content-Type: application/octet-stream;name="INV_5016888091848_20060912_00001.csv"
    Content-Disposition: attachment;filename="MailMessage.bin"
    Content-Description: MailMessage
    In my customised module I would like to pick up this file name so that it can be stored in a database table. I have attempted to pick up this file name from the payload using the "getContentType" method of the "XMLPayload" class but this only returns "application/octet-stream" and does not include the file name.
    Does anyone know how I can get hold of the above file name using the Adapter Framework API? Or, alternatively, by some other method/approach.
    Any help on this would be greatly appreciated.

    Hi,
    I never used this but an idea.Have a try ..
    Please chcek this link -
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/a9d240a0a98431e10000000a1550b0/frameset.htm
    Please check for Adapter -Specific Message Attributes
    ->To store adapter attributes in the message header of the XI message, set the Use Adapter-Specific Message Attributes indicator.
    The following attributes are added to the XI message header if the sender makes them available, and if you choose Variable Transport Binding.
    To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:
    You can set the details in header with the file names you required  like this Variable Header-> XHeaderName1
    Nanda

  • Issue with corrupted file when dragging to timeline

    Has anyone ever had an issue with a files audio becoming corrupted when moving the file from the editing window to the timeline.  I am also seeing the my camtasia mp4 becomes blurry on the timeline but plays fine in the editing screen.
    I had not problem with camtasia Mp4s previously and today I have had so many issues with premier pro

    Hi,
    Even i faced this issue before...the problem with file adapter is the attribute nxsd:quotedBy takes &quot; as default even if u dont mention it takes the same and now after the quotes it immediately expects | wch is not there in the data and it throws the error...now the fix for the problem is put some symbol for nxsd:quotedBy wch u never expect in the data some thing like less than or greater than symbol ....some thing like below
    <element name="FieldTwo" type="string" nxsd:style="terminated"
    nxsd:terminatedBy="|" nxsd:quotedBy="<"/>

  • [svn:fx-trunk] 12982: Fix for issue with exposing accessible names for combobox list items

    Revision: 12982
    Revision: 12982
    Author:   [email protected]
    Date:     2009-12-15 20:44:23 -0800 (Tue, 15 Dec 2009)
    Log Message:
    Fix for issue with exposing accessible names for combobox list items
    QE notes: none
    Doc notes: none
    Bugs: n/a
    Reviewer: Gordon
    Tests run: checkintests
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ComboBoxAccImpl.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/ListBaseAccImpl.as

    Add this to the end of your nav p CSS selector at Line 209 of your HTML file, after 'background-repeat...':
    margin-bottom: -2px;
    Your nav p will then look like this:
    nav p {
              font-size: 90%;
              font-weight: bold;
              color: #FFC;
              background-color: #090;
              text-align: right;
              padding-top: 5px;
              padding-right: 20px;
              padding-bottom: 5px;
              border-bottom-width: 2px;
              border-bottom-style: solid;
              border-bottom-color: #060;
              background-image: url(images/background.png);
              background-repeat: repeat-x;
              margin-bottom: -2px;

Maybe you are looking for

  • Mismatch in EBP and backend SAP system

    Hi Experts,           When checking the status of the shopping carts we have found some shopping carts which has status as "Item in Transfer process" but PO has been created in the backend. We are running the job for CLEAN_REQREQ_UP every hour and BB

  • Is it possible to create a contact form via Flash cs5.5 and package out app for desktop?

    I need to create a desktop app for windows.  Im using Flash cs5.5 and I wanted to know of an easy to way to create a simple contact form that would work once installed on a desktop/ Thanks guys for any input!

  • Airport Express with HP PSC 1410 printer

    I have an airport/airtunes express and have an HP PSC 1410 all in one printer. I can't get it to work as my "network printer" I was surfing the Apple website looking at FAQs and it directed me to the HP site. There are a list of known printers that w

  • ADFMobile - Web service data control problem for android

    Hi, I created an application for android and testing it on an emulator. I am able to create web service data control for a jax-ws web service. But when I invoke the web service and the call comes to the web service host, there are no namespaces in so

  • File server migration with Offline files involved

    Hi, We are planning a file server migration in following weeks. This morning, our customer came with the good old "Ow, and I just thought about something else" Here's the scenario : -They are using 1 network drive -That network drive is made offline