Problem with xls attachment

Hi ,
I have a problem while receiving xl attachment can anyone guide me.
Thanks,
Yogesh

Check this program
*& Report  ZEMAIL_ATTACH                                               *
*& Example of sending external email via SAPCONNECT                    *
REPORT  zemail_attach                   .
TABLES: ekko.
PARAMETERS: p_email   TYPE somlreci1-receiver
                             DEFAULT 'YOUR ID',
p_fname TYPE rlgrap-filename OBLIGATORY,
p_ebeln TYPE ekko-ebeln.
TYPES: BEGIN OF t_ekpo,
  ebeln TYPE ekpo-ebeln,
  ebelp TYPE ekpo-ebelp,
  aedat TYPE ekpo-aedat,
  matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
      wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
  ebeln(10) TYPE c,
  ebelp(5)  TYPE c,
  aedat(8)  TYPE c,
  matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                WITH HEADER LINE.
DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                WITH HEADER LINE.
DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
        t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
        t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
        w_cnt TYPE i,
        w_sent_all(1) TYPE c,
        w_doc_data LIKE sodocchgi1,
        gd_error    TYPE sy-subrc,
        gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
  Retrieve sample data from table ekpo
  PERFORM data_retrieval.
  Populate table with detaisl to be entered into .xls file
  PERFORM build_xls_data_table.
*END-OF-SELECTION
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
    FROM ekpo
    INTO TABLE it_ekpo where ebeln = p_ebeln.
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 con_tab.
  CONCATENATE con_cret 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 con_tab.
    CONCATENATE con_cret 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

Similar Messages

  • Problem with DRL Attachment

    Hi, I have a problem with DRL Attachment.
    In GSM Spec, when I try to attach a file (few Kb) in Supporting Document Section, upload works fine. But when I try to download attached file returns this error:
    Server Error in '/drl' Application.
    Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated or authorized ---> System.Exception: WSE565: The password provided the SecurityTokenManager does not match the one on the incoming token.
    at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPlainTextPassword(UsernameToken token, String authenticatedPassword)
    at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPassword(UsernameToken token, String authenticatedPassword)
    at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyToken(SecurityToken securityToken)
    at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityToken(XmlElement element)
    --- End of inner exception stack trace ---
    at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityToken(XmlElement element)
    at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenFromXml(XmlElement element)
    at Microsoft.Web.Services2.Security.Security.LoadToken(XmlElement element, SecurityConfiguration configuration, Int32& tokenCount)
    at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement element)
    at Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnvelope envelope)
    at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope envelope)
    at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.Services.Protocols.SoapHeaderException: Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated or authorized ---> System.Exception: WSE565: The password provided the SecurityTokenManager does not match the one on the incoming token.
    at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPlainTextPassword(UsernameToken token, String authenticatedPassword)
    at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPassword(UsernameToken token, String authenticatedPassword)
    at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyToken(SecurityToken securityToken)
    at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityToken(XmlElement element)
    --- End of inner exception stack trace ---
    at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityToken(XmlElement element)
    at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenFromXml(XmlElement element)
    at Microsoft.Web.Services2.Security.Security.LoadToken(XmlElement element, SecurityConfiguration configuration, Int32& tokenCount)
    at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement element)
    at Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnvelope envelope)
    at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope envelope)
    at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    *[SoapHeaderException: Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated or authorized ---> System.Exception: WSE565: The password provided the SecurityTokenManager does not match the one on the incoming token.*
       *at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPlainTextPassword(UsernameToken token, String authenticatedPassword)*
       *at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPassword(UsernameToken token, String authenticatedPassword)*
       *at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyToken(SecurityToken securityToken)*
       *at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityToken(XmlElement element)*
       *--- End of inner exception stack trace ---*
       *at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.LoadXmlSecurityToken(XmlElement element)*
       *at Microsoft.Web.Services2.Security.Tokens.SecurityTokenManager.GetTokenFromXml(XmlElement element)*
       *at Microsoft.Web.Services2.Security.Security.LoadToken(XmlElement element, SecurityConfiguration configuration, Int32& tokenCount)*
       *at Microsoft.Web.Services2.Security.Security.LoadXml(XmlElement element)*
       *at Microsoft.Web.Services2.Security.SecurityInputFilter.ProcessMessage(SoapEnvelope envelope)*
       *at Microsoft.Web.Services2.Pipeline.ProcessInputMessage(SoapEnvelope envelope)*
       *at Microsoft.Web.Services2.WebServicesExtension.BeforeDeserializeServer(SoapServerMessage message)]*
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431714
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
    Xeno.Prodika.XenoDoc.Handlers.DRL.DrlService.GetAttachment(tIdentifier Identifier) +50
    Xeno.Prodika.XenoDoc.Handlers.DRL.DrlWebServiceLifecycleHandler.Load(IXDocument xdoc, String pkid) +151
    Xeno.Prodika.XenoDoc.BaseLibraryManager.LoadDocumentPhaseII(IXLibraryConfiguration libConfig, IXDocument xdoc, String pkid) +42
    Xeno.Prodika.XenoDoc.BaseLibraryManager.LoadDocument(String pkid) +18
    Xeno.Prodika.XenoDoc.XDocumentSystem.LoadDocument(String library, String pkid) +39
    Xeno.Prodika.XenoDoc.XDocService.LoadDocument(String library, String pkid) +24
    Xeno.Web.UI.Common.Controls.Popups.DRL.DrlAttachmentViewerPopup.OnLoad(EventArgs e) +320
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    this problem happened to anyone?
    Thanks.

    You didnt say whether this is 6.1 or 6.0, but if 6.1, make sure the domain user you have set in SetupAssistant for DRL Service has access and is using the correct password to the file share where the files are stored.
    If 6.0 the user and password are in the environmentvaribales.config file.
    Hope that helps.
    --Trey                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • SO_NEW_DOCUMENT_ATT_SEND_API1: problem with the attachment.

    Hi gurus!
    I have a problem when i send e-mail with the attachment with this function.
    I don't know why the object is blank.
    After execute the batch input I see the result in alv and i want to send this by e-mail, but...when I open the attachment there is nothing..
    Help me!
    Thanks!

    Hi,
    See this example and see if anything is missed in your code:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
    Regards,
    Renjith Michael

  • Problems with sending attachements.

    Hello I've a problem with sending attachments.
    I've got mail  Version 5.0 (1244.2/1244.3) and Hosted Exchange (xs4all in the Netherlands). Most of my mail works fine (sending and receive mails).
    The most irritating problem is I cannot send messages with a attachement even 1 KB.
    Hope anyone can help?
    Ohter synchronisation Calender & contacts are even not working fine - but a cable will help. So if anyone can help there to, I will be happy.
    Thanks Vanessa

    Im having same problem with BTINTERNET account email, tbh ive had issues with this from the start. keeps going on about yahoo *** is that about... could do with someone verifying settings ive done what all the website says but same issue....attachment is only 11.7mb surely thats not an issue.......anybody know whats going on????

  • Problem with PDF attach

    Hi, my problem es this, I use de FM 'CONVERT_OTFSPOOLJOB_2_PDF' to convert a spool to PDF document, it work ok.
    Then I convert th PDF doc from 132 to 255 char, and the end I send the PDF with FM 'SO_OBJECT_SEND' 
    The mail is sending correctly but when a try to open the PDF attached occurs an error "Error (14)" or "Format Error"
    Anyone?
    Thanks in advance.

    Instead of using the function module 'SO_OBJECT_SEND' try to use 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    For more information: check  Abhishek Suppal's response in this [thread|PDF attachment in mail;.

  • Problem with SOAP Attachment in MM7

    Hi, I'm developing with Bea Weblogic 7 sp2 a MM7 server. My problem is when I add an attachment to SOAP message, Weblogic can't receive the message and say something as "The ID referenced by .... is unknow" but the href attribute in SOAP Message has the same value as the Content-ID of the attachment.
    The attachment is multipart/mixed. Please, I need help.
    I add here an old post from other user about this problem.
    <i>Hi
    I need some help for a problem I have with bea 7.0 sp1 web services.
    I'm trying to develop a SOAP Message Handler to intercept a SOAP Messages.It seems
    work properly for simple soap requests.
    But I need to send attachements so my request is like:
    POST /mm7/mm7Service HTTP/1.0
    Content-Type: multipart/related; type="text/xml"; start="<2ED4C017A7C250C35409DE82D1A8E6B1>";
    boundary="----=_Part_18_90248.1076664111251"
    Accept: application/soap+xml, application/dime, multipart/related, text/*
    User-Agent: Axis/1.1
    Host: xxx.xxx.xxx.xxx
    Cache-Control: no-cache
    Pragma: no-cache
    SOAPAction: "http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2?operation=Deliver"
    Content-Length: 5177
    ------=_Part_18_90248.1076664111251
    Content-Type: text/xml; charset=UTF-8
    Content-Transfer-Encoding: binary
    Content-Id: <2ED4C017A7C250C35409DE82D1A8E6B1>
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
    <ns1:TransactionID soapenv:mustUnderstand="0" xsi:type="xsd:string" xmlns:ns1="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">E8D97EC0A80A712B5CF3C7E5A56AF121</ns1:TransactionID>
    </soapenv:Header>
    <soapenv:Body>
    <DeliverReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">
    <MM7Version>5.3.0</MM7Version>
    <LinkedID>fa571b8e93C0A809513c33d383069dfb</LinkedID>
    <Sender>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    </Sender>
    <Recipients>
    <To>
    <Number displayOnly="false">+123454678</Number>
    </To>
    <Cc>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    </Cc>
    <Bcc>
    <RFC2822Address displayOnly="false">[email protected]</RFC2822Address>
    </Bcc>
    </Recipients>
    <Priority>High</Priority>
    <Content href="cid:74935BFBD687B557CE9C25A591FEE0DA" allowAdaptations="true"/>
    </DeliverReq>
    </soapenv:Body>
    </soapenv:Envelope>
    ------=_Part_18_90248.1076664111251
    Content-Type: multipart/mixed;
    boundary="----=_Part_17_2373292.1076664111231"
    Content-Transfer-Encoding: binary
    Content-Id: <74935BFBD687B557CE9C25A591FEE0DA>
    ------=_Part_17_2373292.1076664111231
    I implemented a simple Handler with a system.out in
    public boolean handleRequest(MessageContext mc)
    method
    But weblogic never gets there. It gives me this error instead:
    javax.xml.soap.SOAPException: failed to receive message:
    at weblogic.webservice.core.DefaultWebService.invoke(DefaultWebService.java:227)
    This seems related to this line
    <Content href="cid:74935BFBD687B557CE9C25A591FEE0DA" allowAdaptations="true"/>
    If I remove it, it can reach the handleRequest() method.
    Unfortunately I need the Content parameter....
    Does weblogic support href attributes in soap ?
    many thanks to whatever help
    (I already lost 3 days on that problem.....)
    alan</i>
    Thanks.

    Hello,
    Problem 1)
    In a previous question about this in SDN, someone (sorry, can't remember who) answered:
    "Have you or the user logged into the SAP GUI before? If not, have them login in. Our problems occured
    with new users that never logged into the SAP gui and so the user profile was never loaded with the ini
    file."
    Please try that.
    Problem 2)
    Are you sure it's running with the same variant in the background?
    What if you try every 5 minutes instead - maybe a minute is too short and it gets mixed up.
    You could also try copying RSWUWFML2 to ZRSWUWFML2, inserting an infinite loop and then attaching to it in order to debug it in the background.
    regards
    Rick Bakker
    Hanabi Technology

  • Problem with transfering  attachment on item of purchase order in Sus

    Dear customizer,
    I 'm implementing a scenario of plan driven procurement with R/3, i have a release of SRM SERVER 5.5,R/3 is connected to sus via XI.
    I'm not able to trasfer attachment and text from R/3 purchase order item to Sus purchase order item.To reach this goal,I have only activate "the service docserver" in Srm,but i can't trasfer my attachment.
    Can you help me?
    Best regards.
    Alessio Pernasetti

    Hi
    Incase you want to transfer attachements from SRM to R/3, then you try implementing the BADI in SRM side. The BADI which will help in this case is
    <b>BBP_CREATE_PO_BACK</b> BADI.
    <b>Please read the standard SAP documentation of this BADI using SE18 Transaction, before making any code changes.</b>
    <u>Few Important SAP OSS notes to refer in this case -></u>
    Note 989184 - Transferred shopping cart with internal attachments
    Note 550071 - FAQ: EBP - Shopping Cart
    Note 916347 - Transfer shopping cart with internal attachments
    Note 1001130 - FAQ - Attachment questions (Buyside)
    <u>Few useful links -></u>
    <b>http://help.sap.com/saphelp_srm50/helpdata/en/49/b32640632cea01e10000000a155106/frameset.htm
    Re: Attachments to backend
    Re: Document Attachments in Shopping Cart
    Re: Attachment in SRM
    Re: SRM Documents and Attachments
    Re: Limit in Attachments of an item in Shopping Cart
    Re: return delivery text from material document is not passed to SUS
    </b>
    Do let me know, incase you face any problems.
    Regards
    - Atul

  • Problem with shortcut attachment in email

    Hi Workflow consultants,
    I have 2 problems using the program RSWUWFML2.
    Iu2019m using RSWUWFML2 program with the following data as input data and scheduled it to run every minute in background to send email for the work items.
    Job suffix: 2
    Task: <our respective task>
    New Work Items Only <checkbox>
    One Message per Work Item
    Work Item Execution <checkbox>
    Message Class for Subject:      SWU_NOTIF     
    Message Number for Subject:      2
    All <Radio button>
    Problem1:
    This is a PR approval scenario. Whenever a PR is released at a particular level, the next level approver will be intimated via email to release from his side. The email contains the attachment u201CExecute Work Item.SAPu201D. When I click the attachment I get the following messages before getting the logon dialog box.
    Screen 1:
    Not all data for SAP GUI shortcut is available.
    System description and GUI start parameter are unknown.
    Enter the missing data.
    After giving OK.
    Screen 2:
    Screen title: SAP shortcut properties
    Title: <blank>
    Type: Transaction
    Transaction: *swnwiex p_action=EXECUTE; p_wi_id=000000660172; DYNP_OKCODE=ONLI
    System description: (Other system)
    System ID: DEV
    Start parameter: <blank>
    Client: <displayed correctly>
    User: <respective approveru2019s user id>
    Password: <disable>
    Language: EN
    When I select the system description manually as my development system and given OK, then the logon dialog box comes as expected.
    Problem2:
    The program RSWUWFML2 which is scheduled to run at background every minute sends the same email every one minute to outlook.
    But when I run the program manually, it sends the email only once. And when I execute it again immediately after receiving the email, it says u201C0 work items were read. None were sentu201D .
    Please help me on what to do to get the logon dialog box once the shortcut is double clicked from email.

    Hello,
    Problem 1)
    In a previous question about this in SDN, someone (sorry, can't remember who) answered:
    "Have you or the user logged into the SAP GUI before? If not, have them login in. Our problems occured
    with new users that never logged into the SAP gui and so the user profile was never loaded with the ini
    file."
    Please try that.
    Problem 2)
    Are you sure it's running with the same variant in the background?
    What if you try every 5 minutes instead - maybe a minute is too short and it gets mixed up.
    You could also try copying RSWUWFML2 to ZRSWUWFML2, inserting an infinite loop and then attaching to it in order to debug it in the background.
    regards
    Rick Bakker
    Hanabi Technology

  • Problem with Email attachment

    Hi,
    I am using the method add_attachment, to add attachments to my Email.
    The mail is being triggered successfully with the attachments, but with the following problems:
    a. The attachment is being populated with incomplete data.
    CALL METHOD document->add_attachment
    EXPORTING
    i_attachment_type    = file_type
    i_attachment_subject = attach_name1
    i_att_content_text   = it_attach[].
    Although it_attach[] has all the data in it, the data in the attachment is incomplete.
    Is there a limit on the attachment size? How can this be increased.
    b. There is a space after every character in the attachment data. How can this be corrected?
    Thanks,
    Smitha.

    Below is the code:
    FUNCTION Z_XI_SEND_MAIL_ATT_DYN_EMAILID.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SUBJECT) TYPE  SO_OBJ_DES OPTIONAL
    *"     VALUE(ATTACH_NAME1) TYPE  SOOD-OBJDES OPTIONAL
    *"     VALUE(FILE_TYPE) TYPE  SOODK-OBJTP OPTIONAL
    *"     VALUE(ATTACH_NAME2) TYPE  SOOD-OBJDES OPTIONAL
    *"  TABLES
    *"      IT_CONTENT TYPE  SOLI_TAB OPTIONAL
    *"      IT_ATTACH TYPE  SOLI_TAB OPTIONAL
    *"      IT_ATTACH1 TYPE  SOLI_TAB OPTIONAL
    *"      IT_EMAILID TYPE  SOLI_TAB OPTIONAL
    DATA: send_request       TYPE REF TO cl_bcs.
      DATA: document           TYPE REF TO cl_document_bcs.
      DATA: sender             TYPE REF TO cl_sapuser_bcs.
      DATA: recipient          TYPE REF TO if_recipient_bcs.
      DATA: exception_info     TYPE REF TO if_os_exception_info,
      bcs_exception      TYPE REF TO cx_document_bcs.
      DATA i_attachment_size TYPE sood-objlen.
      DATA it_recv LIKE zmailmap OCCURS 0 WITH HEADER LINE.
      DATA ext(3).
      DATA: it_attach_hex type standard table of solix .
      DATA: it_attach1_hex type standard table of solix .
    * Create persistent send request
      send_request = cl_bcs=>create_persistent( ).
      TRY.
          document = cl_document_bcs=>create_document(
                                        i_type    = 'txt'
                                        i_text = it_content[]
                                        i_subject = subject ).
          DESCRIBE TABLE it_attach.
          SPLIT attach_name1 AT '.' INTO attach_name1 ext.
    **************** Convert text to binary***********************
    call function 'SO_SOLITAB_TO_SOLIXTAB'
    exporting
    ip_solitab = it_attach[]
    importing
    ep_solixtab = it_attach_hex[].
          CALL METHOD document->add_attachment
            EXPORTING
              i_attachment_type    = file_type
              i_attachment_subject = attach_name1
              i_att_content_hex   = it_attach_hex[].
    ****Additional code for QRN Interface*****
          IF file_type = 'QRN'.
            SPLIT attach_name2 AT '.' INTO attach_name2 ext.
            DESCRIBE TABLE it_attach1.
    *********Convert text to binary***************
    call function 'SO_SOLITAB_TO_SOLIXTAB'
    exporting
    ip_solitab = it_attach1[]
    importing
    ep_solixtab = it_attach1_hex[].
            CALL METHOD document->add_attachment
              EXPORTING
                i_attachment_type    = 'QTX'
                i_attachment_subject = attach_name2
                i_att_content_hex   = it_attach1_hex[].
          ENDIF.
    * Add document to send request
          CALL METHOD send_request->set_document( document ).
    * Get sender object
          sender = cl_sapuser_bcs=>create( sy-uname ).
    * Add sender
          CALL METHOD send_request->set_sender
            EXPORTING
            i_sender = sender.
    ********Determine the receipients (Extra code added for QRN interface - 31st May 2007)************
    ****Add Reciepents
    IF file_type = 'QRN'.
      LOOP AT IT_EMAILID.
      it_recv-MAILID = IT_EMAILID.
      APPEND it_recv.
      CLEAR it_recv.
      ENDLOOP.
    **it_recv-mailid = IT_EMAILID.
    **APPEND it_recv.
    ELSE.
      SELECT * FROM zmailmap INTO TABLE it_recv  WHERE filetype = file_type.
    ENDIF.
          LOOP AT it_recv.
            TRANSLATE it_recv-mailid TO LOWER CASE.
            recipient = cl_cam_address_bcs=>create_internet_address(
           it_recv-mailid ).
            CALL METHOD send_request->add_recipient
              EXPORTING
                i_recipient  = recipient
                i_express    = 'U'
                i_copy       = ' '
                i_blind_copy = ' '
                i_no_forward = ' '.
          ENDLOOP.
    ***********Trigger e-mails immediately*****************************
          send_request->set_send_immediately( 'X' ).
          CALL METHOD send_request->send( ).
          COMMIT WORK.
        CATCH cx_document_bcs INTO bcs_exception.
      ENDTRY.
    ENDFUNCTION.

  • Problems with txt attachment in the mail

    Hi,
    I noticed a big problem for the mail in mac os x. Every time I received my txt format data file in attachment with email, it automatically displayed at the end of my email in the Mail instead of remaining as a txt attachment file ready for download. How can I set it to stay as an attachment instead of being forced to show up as plain text in the end of my received email? Thanks.

    Hi,
    I noticed a big problem for the mail in mac os x. Every time I received my txt format data file in attachment with email, it automatically displayed at the end of my email in the Mail instead of remaining as a txt attachment file ready for download. How can I set it to stay as an attachment instead of being forced to show up as plain text in the end of my received email? Thanks.

  • Problem with PDF Attachment (from GOS)

    Hi Experts,
    Below is the code in a ZFM. We are trying to get GOS attachments and the same are to be sent to SAP Inbox through Workitem. When we executed, the attachment is being shown but couldn't be opened.  It's throwing an error as 'The file has been damaged'.
    As per my understanding, we are getting PDF file into lt_object_content_l and we are trying to convert that to binary file and send the same to SAP_WAPI_ATTACHMENT_ADD.
    FUNCTION ztest_service_atta.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IV_WORKITEMID) TYPE  SWW_WIID OPTIONAL
    *"     REFERENCE(IV_PERNR) TYPE  PERSNO
    *"     REFERENCE(IV_REINR) TYPE  REINR
    *"  EXPORTING
    *"     REFERENCE(ES_ATT_ID) TYPE  SWR_ATT_ID
    *"  EXCEPTIONS
    *"      ATTACH_FAILED
      DATA: gs_att_header TYPE swr_att_header.
      DATA: ls_lpor TYPE sibflporb,
      lt_lpor LIKE TABLE OF ls_lpor,
      ls_option TYPE obl_s_relt,
      lt_option TYPE obl_t_relt,
      ls_rol_op TYPE obl_s_rolt,
      lt_rol_op TYPE obl_t_rolt,
      ls_links TYPE obl_s_link,
      lt_links TYPE obl_t_link,
      ls_folder TYPE soodk,
      ls_object TYPE soodk,
      ls_obj_hd TYPE sood2,
      lt_object_content_l TYPE TABLE OF solisti1,
      ls_object_content_l TYPE solisti1,
      lt_obj_cont TYPE TABLE OF soli.
    * Work areas
      DATA: lwa_doc_data        LIKE sodocchgi1,
            lwa_document_data   LIKE sofolenti1,
            lv_document_id      TYPE sofolenti1-doc_id,
            lwa_links           LIKE LINE OF lt_links,
            lwa_object          TYPE borident,
            ev_binfile TYPE xstring.
      FIELD-SYMBOLS <p> TYPE x.
      ls_lpor-instid = '000011110000000123'.
      ls_lpor-typeid = 'BUS2089'.
      ls_lpor-catid = 'BO'.
      APPEND ls_lpor TO lt_lpor.
      ls_option-sign = 'I'.
      ls_option-option = 'EQ'.
      ls_option-low = 'ATTA'.
      APPEND ls_option TO lt_option.
      ls_rol_op-sign = 'I'.
      ls_rol_op-option = 'EQ'.
      ls_rol_op-low = 'GOSAPPLOBJ'.
      APPEND ls_rol_op TO lt_rol_op.
      CALL METHOD cl_binary_relation=>read_links
        EXPORTING
          is_object           = ls_lpor
          it_relation_options = lt_option
          it_role_options     = lt_rol_op
        IMPORTING
          et_links            = lt_links.
    * Process the attachment list
      LOOP AT lt_links INTO ls_links.
        lv_document_id = ls_links-instid_b.
    * Read the data
        CALL FUNCTION 'SO_DOCUMENT_READ_API1'
          EXPORTING
            document_id                = lv_document_id
          IMPORTING
            document_data              = lwa_document_data
          TABLES
            object_content             = lt_object_content_l
          EXCEPTIONS
            document_id_not_exist      = 1
            operation_no_authorization = 2
            x_error                    = 3
            OTHERS                     = 4.
      ENDLOOP.
      LOOP AT lt_object_content_l INTO ls_object_content_l.
        ASSIGN ls_object_content_l TO <p> CASTING.
        CONCATENATE ev_binfile <p> INTO ev_binfile IN BYTE MODE.
      ENDLOOP.
      IF ev_binfile IS NOT INITIAL AND iv_workitemid IS NOT INITIAL.
        gs_att_header-file_type       = 'B'.
        gs_att_header-file_extension  = 'PDF'.
        gs_att_header-language        = 'EN'.
        gs_att_header-file_name       = 'Scanned Atta.PDF'.
        CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
          EXPORTING
            workitem_id = iv_workitemid
            att_header  = gs_att_header
            att_bin     = ev_binfile
            do_commit   = 'X'
          IMPORTING
            att_id      = es_att_id.
        IF es_att_id IS INITIAL.
          RAISE attach_failed.
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    Can somebody please tell me if I went somewhere wrong. What I feel is, it's because of the PDF file being 255 chars. As I have got the PDF file but not OTF, how can I convert that ot be of 132 chars. Whatever, is the problem due to this reason only?
    Can somebody please tell me where I have gone wrong. Your help is highly appreciable.
    Thanks

    Solved. Instead of converting object_content, I got contents_hex also and converted that as below:
    CALL FUNCTION 'SO_DOCUMENT_READ_API1'
          EXPORTING
            document_id                = lv_document_id
          IMPORTING
            document_data              = lwa_document_data
          TABLES
            object_content             = lt_object_content_l
            contents_hex               = lt_hex_cont
          EXCEPTIONS
            document_id_not_exist      = 1
            operation_no_authorization = 2
            x_error                    = 3
            OTHERS                     = 4.
      LOOP AT lt_hex_cont INTO ls_hex_cont.
        ASSIGN ls_hex_cont TO <p> CASTING.
        CONCATENATE ev_binfile <p> INTO ev_binfile IN BYTE MODE.
      ENDLOOP.

  • Has the problem with Google attaching spyware to Safari been solved?

    Does anyone know if Apple has come up with an update to stop Google from attaching spyware to Safari as we browse?  I was pretty alarmed by the news which is going viral on this and i have quit using Google as a search engine and dumped all their cookies.  Will they still be able to follow me?  I hate to switch to firefox to browse because I can't get the spellchecker to work in it.  Any news on this? http://rt.com/usa/news/google-apple-safari-iphone-627/

    I don't believe Apple has released an update - I believe this was just reported yesterday.
    Unless you consider cookies spyware, this is not spyware.
    http://news.cnet.com/8301-31921_3-57379931-281/wsj-google-tricked-apples-safari- in-order-to-track-users/

  • Problem with Mail attachement

    Hi ,
    Currently landscape is updated to Unicode,
    i'm getting blankspace after each character in the attachemnt.
    i have tested the same program on diffrent servers which is working properly.
    is this the unicode issue or help me out how to resolve the problem.

    Hi Avinash,
    Check entry of File type in table  TSOTD.
    Blank spaces after each character may be because of  file type missing in table.
    Refer a sample code to update  file type table TSOTD .
    After updating the file type try agaiin. Hope it solves ur issue.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.
    PARAMETERS : p_file   TYPE so_obj_tp OBLIGATORY,
                 p_desc   TYPE so_tp_des.
    SELECTION-SCREEN END OF BLOCK b.
    START-OF-SELECTION.
      DATA: wa_tsotd TYPE tsotd,
            wa_tsott TYPE tsott.
    *-- File Type
      wa_tsotd-objtp = p_file.
      wa_tsotd-deflt = 'X'.
    *-- File Type Description
      wa_tsott-langu = 'E'.
      wa_tsott-objtp = p_file.
      wa_tsott-tpdes = p_desc.
    *-- Update File type and Description
      MODIFY tsott FROM wa_tsott.
      COMMIT WORK.
      MODIFY tsotd FROM wa_tsotd.
      COMMIT WORK.
      CLEAR: wa_tsotd,wa_tsott.
    Reward points if this helps.
    Manish

  • Problem with an attachment in iCal

    Hello,
    So, I set my iCal to wake me up every morning and I attached a text file to it. I double click the text file from inside iCal every morning to add stuff to it, instead of going to the actual folder the file is in and opening it from there.
    I've done this for a couple of days now, and I just went to open the file from its folder and none of the text I added for the last couple of days is there. Now, when I open the file from inside iCal, the newest revisions are there.
    What's going on? I only show one file with this name on my computer, yet two different versions exist.
    D

    The iCal actions won't use variables for their dates, but you can use a Run AppleScript action to change the event dates to your liking. The following AppleScript action will change the start and end dates to 2 weeks from the current date (other event properties are left as-is) - just add it to your Automator workflow after getting or creating the event(s) you need moved to the future:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    set an event to a future date
    input: a list of iCal events to change start/end dates
    output: a list of iCal events that were changed
    set output to {}
    set FutureDate to (current date) + (2 * weeks)
    repeat with AnItem in the input
    set AnItem to contents of AnItem
    tell application "iCal"
    if class of AnItem is event then -- just handle events
    set start date of AnItem to FutureDate
    set end date of AnItem to FutureDate
    set the end of the output to AnItem -- success
    end if
    end tell
    end repeat
    return the output -- pass the result(s) to the next action
    end run
    </pre>

  • Problem with .TIF attach in email

    When I receive an email with a tif attachment my iphone shows a box within "?" and don't display the image.
    But sometime iphone shows the tif attachment.
    Why this? What type of difference?

    Likely something specific about the files themselves, then (e.g. type of compression, byte order, etc.) - things that can be set when saving a tif in Photoshop, for example.
    You can submit feedback to Apple: http://www.apple.com/feedback/iphone.html

Maybe you are looking for

  • How do I reset MacBook pro with lion back to factory settings without disk?

    Good evening everyone, I recently purchased a MacBook pro with lion installed and I need to reset it to factory settings without a disk. anyone know how to do this?

  • Dashboard prompt filter navigating to different tabular reports

    Hi, I was able to implement this halfway. My Dashboard prompt has 4 filters, the fourth filter has three drop down values. "Report with Sales Amount" "Report with Purchase Amount" "Report with both Purchase and Sales" when the user selects the first

  • Freight Cost issue at Order Management

    Dear All, I have Booked a sales order and done pick release process. Now, I would like to attach freight cost before shipping process. Gone to Shipping transaction form, queried my order number then gone to Actions>Assign Freight Cost>Go and assigned

  • Why are my facebook friends in my contacts?

    When I try to load my phone contacts, my facebook friends are listed in my contacts as well (if they've posted their phone number or email address on facebook).  I do not want all of those random contacts in my phone, only the ones I have put in ther

  • Current Android 2.1 OS Not Compatible with Bluetooth Voice Activation

    After spending two frustrating days trying to make Bluetooth Voice Activation work with the HTC Incredible Android, I found out from HTC technical support that the Android 2.1 OS is not compatible with Bluetooth Voice Activation.  Supposedly changes