Error while sending SOAP message to PI

Hi Guyz,
I have a sync-asyn scneario SOAP to File via PI. When I test the scenario using test tool i.e SOAP UI , scenario runs fine. But when user is trying to send a message they are getting Error message as response . "No SOAP Envelope but 1 {}.
Any idea what is this error. I tried to test the scenario with the same XML message that they are using.
Regards,
Loveena.

Hi Loveena,
What kind of application tries to connect with PI?
Have you tried to mark Use No SOAP Envelope (Point 4. https://help.sap.com/saphelp_nw73/helpdata/en/48/3555240bea31c3e10000000a42189d/frameset.htm)?, in this way you can check that the message at least comes to PI.
Regards.

Similar Messages

  • I cant use imessages, it tells me that it had an error while sending a message

    i cant use imessages, it tells me that it had an error while sending a message, but it can do all the other things.

    I have a third generation iPod touch, newest software version, wifi is on, address in contacts, phone number in contacts. I can start to send a message, it gets close to the end and then fails to deliver. I have read the trouble shooting guide and followed all directions. I can send from my iPad just fine, but not the iPod.  Any ideals?

  • Error while posting SOAP message

    I am trying to post a SOAP message but I keep getting this error. Can anybody help me on this. I tried using ALTOVA spy and SOAP Ui but the result is the same error.
         <SOAP:Body>
              <SOAP:Fault>
                   <faultcode>SOAP:Server</faultcode>
                   <faultstring>Server Error</faultstring>
                   <detail>
                        <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                             <context>XIAdapter</context>
                             <code>ADAPTER.JAVA_EXCEPTION</code>
                             <text><![CDATA[
    com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve binding for the given channelId: Binding:CID=null;
    *     at com.sap.aii.af.service.cpa.impl.lookup.AbstractLookupManager.getBindingByChannelId*(AbstractLookupManager.java:173)
         at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:431)
    Scenario is SOAP Sender and IDOC reciever.

    I tried reconfiguring also.
    When I test from Integration Engine in RWB using the test message it is sucsseful. Infact I can see the IDOC too.
    But when the basis guy tested with Adapter engine in RWB using the test tool, it gives the following error:
    Error While Sending Message: Additional error text from response: com.sap.engine.interfaces.messaging.api.exception.ConfigException: ConfigException in XI protocol handler. Failed to determine a receiver agreement for the given message. Root cause: com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=BusComp_Siebel1;TS=;AN=SI_Sales_Order_OB_Async;ANS=http://trm.com:o2b:SalesOrderCreate; in the current context [Unknown].
    Any idea where is the problem.
    When we tried the WSN step we are facing this error in the very first step.
    WSDL1.1, WSDL 2.0 definition element expected. Found [html: null] .
    Edited by: Chandra Gunapati on Oct 7, 2009 10:00 PM

  • Error while sending a message  501 not implemented

    Hi all,
    running some tests checking some Xi interfaces we have the following problem :
    going to Runtime Workbench --> Component Monitoring --> Adapter Engine e clicking on the Tab "Test Message" we insert Service, Interface, Namespace, Quality of Service, user and password
    On "send message to" we insert the string:
    http://apl06gjbx:8031/XISOAPAdapter/MessageServlet?channel=:BSY_CDFS_CRISP_DX8:CC_SOAP_IF_KE_02_In
    Executing "Send Message", we get the following error :
    "error while sending message : 501 not implemented"
    Any suggestion ?
    thanks in advance

    Hi all,
    using a 53100 port and xml code in payload it seems better but we get the following error:
    com.sap.engine.services.servlets_jsp.server.exceptions.WebServletException: Error in dispatching request to servlet [/sub/componentmonitoringpageprocessor].
    Display Stack Trace
    com.sap.engine.services.servlets_jsp.server.exceptions.WebServletException: Error in dispatching request to servlet [/sub/componentmonitoringpageprocessor].
         at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:328)
         at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)
         at jsp_FC_Secure1185456171353._jspService(jsp_FC_Secure1185456171353.java:24)
         at com.sap.engine.services.servlets_jsp.server.jsp.JspBase.service(JspBase.java:112)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:544)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:186)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:215)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.NullPointerException
         at com.sap.aii.rwb.web.componentmonitoring.viewcontroller.CmDynPage.doProcessAfterInput(CmDynPage.java:60)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:101)
         at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:62)
         at com.sapportals.htmlb.page.PageProcessorServlet.doPost(PageProcessorServlet.java:22)
         at com.sap.aii.rwb.web.componentmonitoring.viewcontroller.CmPageProcessor.doPost(CmPageProcessor.java:35)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)
         ... 20 more

  • HTTP error while sending SOAP request using wsdl file

    We created SOAP request using the wsdl file ; while sending SOAP request from Altova XMLSpy, we are getting the below error.
    HTTP error: could not post file
    Can you please explain how to resolve this issue
    Regards,
    Sanghamitra

    there is very little information to help you here.
    Can you confirm if this is a SOAP sender scenario or SOAP receiver scenario?
    Also do go to thru these links to help you out;
    Troubleshooting
    Troubleshooting - RFC and SOAP scenarios *** Updated on 20/04/2009 ***
    RFC -> SOAP
    RFC -> XI -> WebService - A Complete Walkthrough (Part 1)
    RFC -> XI -> WebService - A Complete Walkthrough (Part 2)
    SOAP <-> XI <-> RFC/BAPI
    Walkthrough - SOAP  XI  RFC/BAPI

  • Error while sending the messages to JMS Queue

    Hi ,
    I am trying to pick the file from JMS Queue and send the response xml as outbound message to JMS Queue again using XAI Sender
    I Created XAI Sender, Outbound Message Type(DM-RCVRESP) and configured these two with External System.
    I am able to pick the file from JMS Queue but unable to send the message through XAI Sender (Real-time)
    Plz find below the error trace getting.
    [Wed Jun 15 16:12:09 IST 2011] Error while processing sender "UPLOADSTG" : Unable to update response in staging table: Row id not given.
    com.splwg.mpl.sending.SameThreadSendingManager$ProcessException
         at com.splwg.mpl.sending.SameThreadSendingManager.processDestination(SameThreadSendingManager.java:341)
         at com.splwg.mpl.sending.SameThreadSendingManager.sendResponse(SameThreadSendingManager.java:293)
         at com.splwg.mpl.sending.SameThreadSendingManager.doSend(SameThreadSendingManager.java:249)
         at com.splwg.mpl.server.async.ExecSendRequestProcessor.ProcessRequest(ExecSendRequestProcessor.java:61)
         at com.splwg.mpl.server.async.RequestProcessingThreadAdapter.run(RequestProcessingThreadAdapter.java:46)
         at com.splwg.mpl.server.PooledThread.run(PooledThread.java:91)
         at java.lang.Thread.run(Thread.java:662)
    Please guide me in this regard..
    Thanks,
    sukumar

    What have you configured for the response tab for the sender? Are you using the MPL or the MDB?
    Take a look at:
    MPL Best Practices (Doc Id 1308165.1)
    Oracle WebLogic JMS Integration (Doc Id: 1308181.1)

  • Error while sending SOAP Request to server through XML Spy

    i have created a webservice to jdbc scenario application and when i tried to check my webservice with XML Spy by giving inputs to wsdl file as SOAP Request to server, its showing the error like this:
    <b><u>Http error : could not POST File</u></b>
    It would be good if u explain step by step procedure how to solve the issue.
    Thanks & Regards.,
    Pushparaju.B

    This is the error showing after clicking OK button after it showed the error
    Http error : could not POST File
    <b><?xml version="1.0"?>
    <!-- see the documentation -->
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
         <SOAP:Body>
              <SOAP:Fault>
                   <faultcode>SOAP:Server</faultcode>
                   <faultstring>Server Error</faultstring>
                   <detail>
                        <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                             <context>XIAdapter</context>
                             <code>DeliveryException</code>
                             <text><![CDATA[
    com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:PL_TIMEOUT:
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:451)
         at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:125)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:831)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:79)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)
              ]]></text>
                        </s:SystemError>
                   </detail>
              </SOAP:Fault>
         </SOAP:Body>
    </SOAP:Envelope></b>
    yes i have the role of XIAPPLUSER
    scenario has created by me and i have the authorization to enter into XI

  • SOAP Receiver- Error While Sending Message: 500 Internal Server Error

    Hello,
    Our scenario: IDoc to SOAP
    I have added a third party system in the SLD and have used the same in my ID configuration.
    An idoc will be triggered from R/3, which will received in PI, PI will transform the IDoc into SOAP message for the third party system.
    I have tested the scenario in ID from Interface Determination and its successful.
    But when i try to try to test it from RWB, using Test Message in Adapter Engine, I get an error,
    "Error while sending message:500 Internal server error"
    If we test it using a testing software like SOAP UI, it works fine but from PI we get the error mentioned above.
    Regards,
    Abhishek

    Hello,
    Since the IDOC adapter resides on the ABAP stack, you can use this URL instead (it will be sent to the integration engine as Venkata suggested)
    http://host:port/sap/xi/engine?type=entry
    Also check your firewall settings from PI to the third-party system.
    Hope this helps,
    Mark
    Edited by: Mark Dihiansan on Feb 7, 2012 11:48 AM

  • Error while sending message.

    Hi,Could anyone explain the below error message and tell me how can we solve this?
    Error while sending message: com.sap.aii.af.ra.ms.api.ConfigException: ConfigException in XI protocol handler. Failed to determine a receiver agreement for the given message. Root cause: com.sap.aii.af.service.cpa.impl.exception.CPALookupException: Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=NDE_CLNT200;TS=;AN=Z_FI_OUTBOUND_SAP_TO_SIP;ANS=urn:sap-com:document:sap:rfc:functions;
    Regards,
    sai.

    Hello,
    I have the same problem here. I already did many times redefine the wohle szenario and also tried out many different adapters. But any time I get the same error message. I checked the agreements and determinations very carefully. The Test in IDR said this:
    Senderagreement
    <not found>
    <Trace level="1" type="B">SENDER AGREEMENT SIMULATION</Trace> <Trace level="1" type="T">Simulating Adapter Engine...</Trace> <Trace level="1" type="T">Simply trying to loolup for the most specific Sender Agreement object</Trace> <Trace level="1" type="T">no objects found</Trace> <Trace level="1" type="T">Note that real results may differ</Trace>
    Receiverdetermination
    | BusSys_A | MI_HTTPtoJDBC_HTTP
    <Trace level="1" type="B">CL_RD_PLSRV-ENTER_PLSRV</Trace>... (4 Zeilen)
    Interface-determination
    | BusSys_A | MI_HTTPtoJDBC_HTTP | | BusSys_B
    <Trace level="1" type="B">CL_ID_PLSRV-ENTER_PLSRV</Trace>... (4 Zeilen)
    Interface-Mapping
    <not found>
    Runtimeerror
    com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_HTTPtoJDBC_Input_: RuntimeException in Message-Mapping transformatio~
    <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>... (152 Zeilen)
    I hope you can help me getting it working. thank you

  • Error 401 while sending SOAP Request to XI

    hi friend ..
    i am getting Error 401 while sending SOAP Request to XI..
    can u suggest me where may be the error?
    thanks..

    Hi,
    Refer these threads:
    Testing XI SOAP scenario via XMLSpy
    Re: SOAP Sender ADAPTER 401 No Authorisation
    Re: XI Web Service - Code: (401) Unauthorized.
    Try soap client https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9b16d790-0201-0010-4e9b-baa5f42830d8
    Regards
    Suraj

  • " Error while sending message: 500 Internal Server Error" RNIF Adapter

    Hi,
    I have configured B2B integration as   Sender : RNIF adapter &  Receiver: XI Adapter.
    I am  able to test the configuration successfully in ESR and ID. But, whille testing with RWB using same test data, i am getting the following error:
    Error while sending message: 500 Internal Server Errot.
         Could you anybody help me, what could be the reason? Even i am not getting any error messages in SXMB_MONI.
    Thanks
    Laxman

    Hope this helps..
    -Is the 500 internal SErver Error in RWB is only for this issue and the message is successfully processed in SXMB_MONI?
       Could be the PI Service User :PIAFUSER(Adapter framework user) login crendential issue or run out time error.
    Try taking the payload from sxmb_moni and enter  it in RWB > Adater engine> Test Message Tab > give proper sender interface information , enter payload and try sending message.   check what is behaviour

  • Imp: Error while sending message: 500 Internal Server Error

    Hi all
    while testing my scenarios- by sending the message through component monitoring in RWB I get the following error in Integration Server
    <b>"Error while sending message: 500 Internal Server Error "</b>
    It seems that integration server is not picking up the messages.
    Can anyone help me on this?
    thanks
    Abhishek

    Hi Abhishek,
      Check whether the integration url is pointing to correct one something like http://host url:http port/sap/xi/engine?type=entry.
    Please do refer the below blog:
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    Regards,
    Prasanthi.

  • An error occurred while sending the message

    I compose a email.When I click the send link ,an error occurs. The error page said "An error occurred while sending the message". Could anybody tell me what's wrong. Thanks.

    Hi,
    lsnrctl is not not able to start listener running on ports < 1024. Try starting the listener with the tnslsnr tool directly. My recommendation is to start it as root directly, so you don't have to set the s-bit.
    <midtier_home>/bin/tnslsnr listener_es -u <uid> -g <grpid> &
    Regards
    Christian

  • Error while sending data from XI to BI System

    Hello Friends,
    I m facing an error while sending data from XI to BI. XI is successfully recived data from FTP.
    Given error i faced out in communication channel monitoring:-
    Receiver channel 'POSDMLog_Receiver' for party '', service 'Busys_POSDM'
    Error can not instantiate RfcPool caused by:
    com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed
    Connect_PM TYPE=A ASHOST=10.1.45.35 SYSNR=01 GWHOST=10.1.45.35 GWSERV=sapgw01 PCS=1
    LOCATION CPIC (TCP/IP) on local host with Unicode
    ERROR partner '10.1.45.35:sapgw01' not reached
    TIME Fri Apr 16 08:15:18 2010
    RELEASE 700
    COMPONENT NI (network interface)
    VERSION 38
    RC -10
    MODULE nixxi.cpp
    LINE 2823
    DETAIL NiPConnect2
    SYSTEM CALL connect
    ERRNO 10061
    ERRNO TEXT WSAECONNREFUSED: Connection refused
    COUNTER 2
    Error displaying in message monitoring:-
    Exception caught by adapter framework: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM  TYPE=A ASHOST=10.1.45.35 SYSNR=01 GWHOST=10.1.45.35 GWSERV=sapgw01 PCS=1 LOCATION    CPIC (TCP/IP) on local host with Unicode ERROR       partner '10.1.45.35:sapgw01' not reached TIME        Fri Apr 16 08:15:18 2010 RELEASE     70
    Delivery of the message to the application using connection RFC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: RfcAdapter: receiver channel has static errors: can not instantiate RfcPool caused by: com.sap.aii.af.rfc.RfcAdapterException: error initializing RfcClientPool:com.sap.aii.af.rfc.core.repository.RfcRepositoryException: can not connect to destination system due to: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM  TYPE=A ASHOST=10.1.45.35 SYSNR=01 GWHOST=10.1.45.35 GWSERV=sapgw01 PCS=1 LOCATION    CPIC (TCP/IP) on local host with Unicode ERROR       partner '10.1.45.35:sapgw01' not reached TIME.
    Kindly suggest me & provide details of error.
    Regards,
    Narendra

    Hi Narendra,
    Message is clearly showing that your system is not reachable
    102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM TYPE=A ASHOST=10.1.45.35 SYSNR=01 GWHOST=10.1.45.35 GWSERV=sapgw01 PCS=1 LOCATION CPIC (TCP/IP) on local host with Unicode ERROR partner '10.1.45.35:sapgw01' not reached
    Please check to ping the BI server  IP 10.1.45.35 from your XI server , in case its working you can check telnet to SAP standard port like 3201/3601/3301/3901 etc.
    It seems to be connectivity issue only.
    Make sure your both the systems are up and running.
    Revert back after checking above stuff.
    Regards,
    Gagan Deep Kaushal

  • Error while sending email to external mail - Urgent

    Hi All,
    I am getting error while sending email with attachement. The Error code is 02.
    I am not able to identify the error. bold Please help me in solving this problem.
    Is it anything wrong with the code or Any Configuration with SCOT/SOST.bold
    the code i am using is :
    REPORT YVR_F MESSAGE-ID XX .
    TABLES : EDIDC, EDIDS, EDPAR.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    PARAMETERS : P_STATUS LIKE EDIDC-STATUS DEFAULT '51'.
    SELECT-OPTIONS : S_DIRECT FOR EDIDC-DIRECT,
                     S_MESTYP FOR EDIDC-MESTYP,
                     S_CREDAT FOR EDIDC-CREDAT.
    SELECTION-SCREEN END OF BLOCK B1 .
    PARAMETER: P_EMAIL LIKE SOMLRECI1-RECEIVER,
               P_SENDER LIKE SOMLRECI1-RECEIVER no-display,
               P_DELSPL  AS CHECKBOX,
               P_ONLINE NO-DISPLAY.
    DATA : TB_EDIDC LIKE STANDARD TABLE OF EDIDC INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_EDPAR LIKE STANDARD TABLE OF EDPAR INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_KNA1 LIKE STANDARD TABLE OF KNA1 INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA : TB_ADRC LIKE STANDARD TABLE OF ADRC INITIAL SIZE 0 WITH HEADER
    LINE.
    DATA: INT_PDF TYPE TABLE OF TLINE WITH HEADER LINE.
    DATA : BEGIN OF TB_ED OCCURS 0,
             SNDPRN LIKE EDIDC-SNDPRN,
             LOC    LIKE ADRC-BUILDING,
             DOCNUM LIKE EDIDC-DOCNUM,
             IDOCTP LIKE EDIDC-IDOCTP,
             MESTYP LIKE EDIDC-MESTYP,
             DIRECT LIKE EDIDC-DIRECT,
             CREDAT LIKE EDIDC-CREDAT,
             STATUS LIKE EDIDC-STATUS,
           END OF TB_ED.
    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.
    Job Runtime Parameters
    DATA: GD_EVENTID LIKE TBTCM-EVENTID,
          GD_EVENTPARM LIKE TBTCM-EVENTPARM,
          GD_EXTERNAL_PROGRAM_ACTIVE LIKE TBTCM-XPGACTIVE,
          GD_JOBCOUNT LIKE TBTCM-JOBCOUNT,
          GD_JOBNAME LIKE TBTCM-JOBNAME,
          GD_STEPCOUNT LIKE TBTCM-STEPCOUNT,
          GD_ERROR    TYPE SY-SUBRC,
          GD_RECIEVER TYPE SY-SUBRC.
    DATA:  W_RECSIZE TYPE I,
           W_SPOOL_NR LIKE SY-SPONO.
          %_print LIKE pri_params.
    DATA: GD_SUBJECT   LIKE SODOCCHGI1-OBJ_DESCR,
          IT_MESS_BOD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          IT_MESS_ATT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
          GD_SENDER_TYPE     LIKE SOEXTRECI1-ADR_TYP,
          GD_ATTACHMENT_DESC TYPE SO_OBJ_NAM,
          GD_ATTACHMENT_NAME TYPE SO_OBJ_DES.
    Spool to PDF conversions
    DATA: GD_SPOOL_NR LIKE TSP01-RQIDENT,
          GD_DESTINATION LIKE RLGRAP-FILENAME,
          GD_BYTECOUNT LIKE TST01-DSIZE,
          GD_BUFFER TYPE STRING.
    Binary store for PDF
    DATA: BEGIN OF IT_PDF_OUTPUT OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF IT_PDF_OUTPUT.
    DATA: GD_RECSIZE TYPE I.
    CONSTANTS: C_DEV LIKE  SY-SYSID VALUE 'DEV',
               C_NO(1)     TYPE C   VALUE ' ',
               C_DEVICE(4) TYPE C   VALUE 'LOCL'.
    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.
    DATA : MSTR_PRINT_PARMS LIKE PRI_PARAMS,
           MC_VALID,
           P_REPID LIKE SY-REPID,
           WF_ID  LIKE TSP01-RQIDENT,
           LOC_BYTECOUNT TYPE I.
    *start-of-selection.
    MSTR_PRINT_PARMS-PDEST = 'LOCL'.
    P_REPID = SY-REPID.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
        authority= ' '
       COPIES                       = '1'
       COVER_PAGE                   = SPACE
       DATA_SET                     = SPACE
       DEPARTMENT                   = SPACE
       DESTINATION                  = 'LP01'
       EXPIRATION                   = '1'
       IMMEDIATELY                  = 'X'
       LAYOUT                       = 'X_65_132'
       MODE                         = SPACE
       NEW_LIST_ID                  = 'X'
       NO_DIALOG                    = 'X'
       USER                         = SY-UNAME
    IMPORTING
       OUT_PARAMETERS               = MSTR_PRINT_PARMS
       VALID                        = MC_VALID
    EXCEPTIONS
       ARCHIVE_INFO_NOT_FOUND       = 1
       INVALID_PRINT_PARAMS         = 2
       INVALID_ARCHIVE_PARAMS       = 3
       OTHERS                       = 4.
         SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                          SPOOL PARAMETERS MSTR_PRINT_PARMS.
                          AND RETURN.
    NEW-PAGE PRINT ON NO DIALOG PARAMETERS
    MSTR_PRINT_PARMS.
    perform data.
    NEW-PAGE PRINT OFF. "This marks the end of the screen for which the
    *SPOOL NO WAS GENERATED.
    WF_ID = SY-SPONO.
    *converting spool to pdf
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
         EXPORTING
              SRC_SPOOLID              = WF_ID  "SPOOL NUMBER
              NO_DIALOG                = SPACE
              PDF_DESTINATION          = 'X'
         IMPORTING
              PDF_BYTECOUNT =
                 LOC_BYTECOUNT "NUMBER OF BYTES TRANSFERRED
         TABLES
              PDF                      = INT_PDF  "TABLE FOR PDF REPORT
         EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB     = 1
              ERR_NO_SPOOLJOB          = 2
              ERR_NO_PERMISSION        = 3
              ERR_CONV_NOT_POSSIBLE    = 4
              ERR_BAD_DESTDEVICE       = 5
              USER_CANCELLED           = 6
              ERR_SPOOLERROR           = 7
              ERR_TEMSEERROR           = 8
              ERR_BTCJOB_OPEN_FAILED   = 9
              ERR_BTCJOB_SUBMIT_FAILED = 10
              ERR_BTCJOB_CLOSE_FAILED  = 11
              OTHERS                   = 12.
    *CALL FUNCTION 'DOWNLOAD'
    *EXPORTING
    *bin_filesize = loc_bytecount "NO. OF BYTES
    *filename = 'C:/EMAILPDF.PDF'
    *filetype = 'BIN'
    **IMPORTING
    **act_filename = loc_filename
    *TABLES
    *data_tab = int_pdf.
    IF P_DELSPL EQ 'X'.
      PERFORM DELETE_SPOOL.
    ENDIF.
    Transfer the 132-long strings to 255-long strings
    LOOP AT INT_PDF.
      TRANSLATE INT_PDF USING ' ~'.
      CONCATENATE GD_BUFFER INT_PDF INTO GD_BUFFER.
    ENDLOOP.
    TRANSLATE GD_BUFFER USING '~ '.
    DO.
      IT_MESS_ATT = GD_BUFFER.
      APPEND IT_MESS_ATT.
      SHIFT GD_BUFFER LEFT BY 255 PLACES.
      IF GD_BUFFER IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    DESCRIBE TABLE IT_MESS_ATT LINES GD_RECSIZE.
    CHECK GD_RECSIZE > 0.
    PERFORM SENDMAIL USING P_EMAIL..
    *&      Form  sendmail
          text
    -->  p1        text
    <--  p2        text
    FORM SENDMAIL USING P_EMAIL.
      CHECK NOT ( P_EMAIL IS INITIAL ).
      REFRESH IT_MESS_BOD.
    Default subject matter
      GD_SUBJECT         = 'Subject'.
      GD_ATTACHMENT_DESC = 'IDOC LIST'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      IT_MESS_BOD        = 'List Of Failed Idocs'.
      APPEND IT_MESS_BOD.
      IT_MESS_BOD        = 'List Of Failed Idocs'.
      APPEND IT_MESS_BOD.
    If no sender specified - default blank
      IF P_SENDER EQ SPACE.
        GD_SENDER_TYPE  = SPACE.
      ELSE.
        GD_SENDER_TYPE  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                   TABLES IT_MESS_BOD
                                          IT_MESS_ATT
                                    USING P_EMAIL
                                          'Document attachment'
                                          'PDF'
                                          GD_ATTACHMENT_NAME
                                          GD_ATTACHMENT_DESC
                                          P_SENDER
                                          GD_SENDER_TYPE
                                 CHANGING GD_ERROR
                                          GD_RECIEVER.
    ENDFORM.                    " sendmail
    *&      Form  DELETE_SPOOL
          text
    -->  p1        text
    <--  p2        text
    FORM DELETE_SPOOL.
      DATA: LD_SPOOL_NR TYPE TSP01_SP0R-RQID_CHAR.
      LD_SPOOL_NR = WF_ID.   "GD_SPOOL_NR.
      CHECK P_DELSPL <> C_NO.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                SPOOLID = LD_SPOOL_NR.
    ENDFORM.                    " DELETE_SPOOL
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          text
         -->P_IT_MESS_BOD  text
         -->P_IT_MESS_ATT  text
         -->P_P_EMAIL  text
         -->P_0846   text
         -->P_0847   text
         -->P_GD_ATTACHMENT_NAME  text
         -->P_GD_ATTACHMENT_DESC  text
         -->P_P_SENDER  text
         -->P_GD_SENDER_TYPE  text
         <--P_GD_ERROR  text
         <--P_GD_RECIEVER  text
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES   IT_MESSAGE
                                              IT_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.
      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.
      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.
      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[] = IT_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 = p_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
      T_RECEIVERS-NOTIF_DEL = 'X'.
      T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    W_SENT_ALL = 'X'.
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_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
                object_header              = objhead
                CONTENTS_BIN               = T_ATTACHMENT
                CONTENTS_TXT               = IT_MESSAGE
                RECEIVERS                  = T_RECEIVERS
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
      IF SY-SUBRC NE 0.
        MESSAGE E000 WITH 'Error occurred while sending'.
      ELSE.
        MESSAGE I000 WITH 'The document was sent'.
      ENDIF.
    ENDFORM.                    " SEND_FILE_AS_EMAIL_ATTACHMENT
    *&      Form  data
          text
    -->  p1        text
    <--  p2        text
    FORM data.
    SELECT SNDPRN
             DOCNUM
             IDOCTP
             MESTYP
             DIRECT
             CREDAT
             STATUS
             FROM EDIDC
             INTO CORRESPONDING FIELDS
             OF TABLE TB_EDIDC
             WHERE STATUS = P_STATUS
             AND MESTYP IN S_MESTYP
             AND DIRECT IN S_DIRECT
             AND CREDAT IN S_CREDAT.
    SELECT KUNNR
           INPNR
           FROM EDPAR
           INTO CORRESPONDING FIELDS
           OF TABLE TB_EDPAR
           FOR ALL ENTRIES IN TB_EDIDC
           WHERE KUNNR = TB_EDIDC-SNDPRN.
    SELECT KUNNR
           ADRNR
           FROM KNA1
           INTO CORRESPONDING FIELDS
           OF TABLE TB_KNA1
           FOR ALL ENTRIES IN TB_EDPAR
           WHERE KUNNR = TB_EDPAR-INPNR.
    SELECT ADDRNUMBER
           BUILDING
           FROM ADRC
           INTO CORRESPONDING FIELDS
           OF TABLE TB_ADRC
           FOR ALL ENTRIES IN TB_KNA1
           WHERE ADDRNUMBER = TB_KNA1-ADRNR.
    LOOP AT TB_EDIDC WHERE STATUS = P_STATUS
                     AND MESTYP IN S_MESTYP
                     AND DIRECT IN S_DIRECT
                     AND CREDAT IN S_CREDAT.
      TB_ED-SNDPRN = TB_EDIDC-SNDPRN.
      TB_ED-DOCNUM = TB_EDIDC-DOCNUM.
      TB_ED-IDOCTP = TB_EDIDC-IDOCTP.
      TB_ED-MESTYP = TB_EDIDC-MESTYP.
      TB_ED-DIRECT = TB_EDIDC-DIRECT.
      TB_ED-CREDAT = TB_EDIDC-CREDAT.
      TB_ED-STATUS = TB_EDIDC-STATUS.
      READ TABLE TB_EDPAR WITH KEY KUNNR = TB_EDIDC-SNDPRN.
      READ TABLE TB_KNA1 WITH KEY KUNNR = TB_EDPAR-INPNR.
      READ TABLE TB_ADRC WITH KEY ADDRNUMBER = TB_KNA1-ADRNR.
      TB_ED-LOC = TB_ADRC-BUILDING.
      APPEND TB_ED.
    ENDLOOP.
    WRITE :/02 'CustomerNo',
            15 'Location Code',
            30 'Idoc Number',
            55 'Basic Type',
            70 'Message Type',
            95 'Direction',
            110 'Received Date',
            130 'Status'.
    ULINE.
    LOOP AT TB_ED.
      WRITE :/02 TB_ED-SNDPRN,
              15 TB_ED-LOC,
              30 TB_ED-DOCNUM,
              55 TB_ED-IDOCTP,
              70 TB_ED-MESTYP,
              95 TB_ED-DIRECT,
              110 TB_ED-CREDAT,
              130 TB_ED-STATUS.
    ENDLOOP.
    ENDFORM.                    " data
    Kindly help me in solving the issue.
    Thanks in advance.
    Suki.

    Hi,
    Check in transaction SCOT. If your mail is in error status in SCOT, you can assure that there is no problem with your code. If your message has not reached till SCOT, then the problem will be with the code.
    If the mail is there in scot with error status tell the BASIS to configure it. I feel this could be the problem.
    Regards,
    Renjith Michael.

Maybe you are looking for

  • Upgrading MacBook Pro (OS 10.6.8) to Yosemite

    Can I upgrade my 2008 MacBook Pro (Snow Leopard 10.6.8.) with Yosemite? I was advised not to as it would substantially slow down my hard drive.

  • TM - External Disk Drive Not Detected in Recovery Mode

    Hello Apple Lovers, I am using the My Passport for Mac 500GB disk drive with time machine on my MacBook Air to create data backups. I checked the disk for any corruption using Disk Utility. No issues were found. I find the disk works excellantly in t

  • 5th gen itunes problem, please help

    I have an ipod touch 5th generation that I just got today, It was working right out of the box and i synced everything up, I already updated the software to 6.0.1.  Then after I do that, I am prompted to update to software 6.0.1 because my software i

  • Pass ship-to-ctry to BAPI_ACC_DOCUMENT_POST

    Hello, I have a requirement to pass ship-to-country to BAPI_ACC_DOCUMENT_POST.  I do not see ship-to-country in any of the tables, nor in the table provided for update by the user exit.  Does anyone know how to do this? Thanks in advance for your hel

  • ITunes won't run because a required component is not installed

    I think a Quicktime upgrade went wrong and now I can no longer open my iTunes and this message appears: "The itunes application could not be opened. a required iTunes component is not installed. Please repair or reenstall Quicktime (-42404)" I have t