Access MIME from ABAP Mapping for Attachment

Hi,
I am adding an attachment in ABAP Mapping and sending that message to Ariba System through HTTP Adapter channel.
I am able to send the message successfully and also I can see the attachment in the PI RWB But I am not able to see any
attachment in the Receiver's end along with the message.Ariba is able to receive the message successfully though.
It looks like I need to change MIME Header a bit before sending the message.
I check this link.
XI Attachment and main document MIME sequence
But Its about SOAP Adapter with PayloadSwap Bean. Since HTTP adapter is on ABAP we can not use the Module
Tab of the channel.
I need to know how can I use ABAP Mapping to access the MIME HEADER to change/ check Content Disposition and
other properties.
Thanks,
Vijay
Edited by: tech.info012 on Oct 12, 2010 6:33 PM

When I tried the 2nd option It is giving me this error in response message. Do you have any idea what problem can cause this.
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"
SOAP:mustUnderstand="1">
  <SAP:Category>XIAdapterFramework</SAP:Category>
  <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
  <SAP:P1 />
  <SAP:P2 />
  <SAP:P3 />
  <SAP:P4 />
  <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not queue receive
for message 4cb474bf-00c1-02af-e100-80000aa00d4b(INBOUND). Reason: java.lang.NullPointerException:
</SAP:AdditionalText>
  <SAP:Stack />
  <SAP:Retry>M</SAP:Retry>
  </SAP:Error>
Thanks,
Vijay

Similar Messages

  • Get Message ID and namespace from ABAP Mapping

    Hi XI Expert,
    Please advise how to get the message ID and namespace from ABAP Mapping.
    Thank You and best Regards
    Fernand

    Hi,
    To access the message ID, use the method GET_MESSAGE_ID of the controller object:
           1.      Fetch a protocol instance for the protocol IF_WSPROTOCOL_MESSAGE_ID.
           2.      To have the system return the message ID after the sender has sent a request message or the receiver has received a request message, use the method GET_MESSAGE_ID of this instance. This returns the ID by using the parameter MESSAGE_ID of type SXMSGUID.
    Also you could do the same by this way also:
    IF_WSPROTOCOL_XI_HEADER
    has attributes messageid and interface namespace.
    using this  you can read the XI message header

  • ABAP Mapping for Error handling in Proxy to JDBC

    Hi All,
    I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)
    I am following the below steps,
    step 1 - In message mapping a UDF is created to catch errors and store them in a variable using  dynamic configuration
    step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception. The exception format expected is
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1>ZPI_THROW_EXCEPTION</SAP:P1>
      <SAP:P2>001</SAP:P2/>
      <SAP:P3>Mandatory field is missing[BUKRS] </SAP:P3>
       <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have written the following ABAP code to achieve this:
    method IF_MAPPING~EXECUTE.
      DATA l_record type mpp_dynamic.
    DATA error type String.
    getting dynamic configuration value
    filled in by any previous mapping
    CALL METHOD DYNAMIC_CONFIGURATION->GET_RECORD
      EXPORTING
        NAMESPACE = 'http://sap.com/xi/XI/System/ERROR'
        NAME      = 'ERROR'
      RECEIVING
        RECORD    = l_record.
    error = l_record-value.
    *raising exception with our message
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '001'
        ERROR_TEXT = error .
    RAISE EXCEPTION TYPE CX_MAPPING_FAULT
      EXPORTING
       TEXTID =
       PREVIOUS =
        ERROR_CODE = '003'
        ERROR_TEXT = error .
    endmethod.
    I am gettign the following message for our code:
    SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Could you please help in finding the solution for getting currect error message from ABAP class?
    Edited by: SwethaC on Jan 21, 2011 8:18 AM

    The error is due to RFC Call fail from PI system to your ECC Application System.
    Check your RFC Destination for ECC System type 3 in PI System.
    When you are receiving data from ECC System using Proxies & again you are going to ECC System for Validation.
    Why you are not doing this validation on ECC System only in your proxy code ?
    In your proxy code, it will be much better for performance to check your data there on same system.

  • ABAP Mapping :: for multi files

    Dear Experts,
    We are doing an Idoc to file interface, using ABAP mapping.
    This is 1:n mapping i.e receiver message interface is 0..unbounded.
    We have achieved the mapping for 1:1. But when I test for multi, i get an error in moni saying
    Parsing error after multi mapping.Expected Message<i> instead of Item
    Item is the name of the node that has to be created multiple times.
    Has anyone done multi mapping in ABAP?? Any idea why this error....may be we are missing something.
    Any idea as to how we can progress???
    Thanks in advance
    Regards
    Shobha

    Hi,
    Surely u can use an ABAP mapping for this.
    Sounds like your problem is your not using correct output structure for multi mapping.
    As with any type of multi mapping your structure should reflect this. Your target payload must thus have the following structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
         <ns0:Message1>
              <unboundedPayload/>
         </ns0:Message1>
    </ns0:Messages>
    The <unboundedPayload> element in above should of course be replaced with your actual payload - I believe 'Item' in your case, if that is in fact the root node of your actual payload.
    Regards,
    Daniel

  • Add Attachment from ABAP Mapping

    Hi Gurus,
    is it possible to add an attachment during a ABAP mapping? Like it is possible for proxy!
    I want to attach a jpg file during the mapping. I found also class interface CL_MAPPING_ATTACHMENTS with a
    few method e.g. SET_ATTACHMENT but it does not wotk.
    Anyone of you knows some solutions or hinds?
    Thanks in advance.

    HI,
    I found an other solution or lets say I found an error in my interface call. IF_MAPPING_ATTACHMENTS -> set_attachment is working, sorry!!!
      TRY.
          CALL METHOD attachments->set_attachment
            EXPORTING
              content_id   = '1.jpg'
              content_type = if_xms_resource=>mimetype_jpeg
              content      = l_data.
        CATCH cx_xms_system_error .
      ENDTRY.
    The Attachment is in the Payload, but now I get an error from the adapter, when I use file or mail receiver adapter! For a little test I used http receiver and there it is working!?
    "com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not queue receive for message df9cc710-62c9-85f1-b25f-005056c00008(INBOUND). Reason: java.lang.NullPointerException: while trying to invoke the method com.sap.aii.af.sdk.xi.lang.Binary.getBytes() of an object returned from com.sap.aii.af.sdk.xi.mo.xmb.XMBPayload.getContent() "
    I get it in FILE and EMAIL Adapter!? Do you know the reason? I'm still looking for it.
    Edited by: Michael Kulak on Jul 30, 2010 8:50 PM
    Edited by: Michael Kulak on Jul 30, 2010 9:04 PM

  • Abap mapping for content conditions routing in a flat-flat scenario

    Dear Experts.
    I have a flat-flat file scenario. Based on the content of the input file, I need to route data to the receiver.The source flat file will have several IDOC details.
    Assume two fields FIELD1 and FIELD2 in different segments of the IDOC. My requirement is if FIELD1 of an IDOC = "XYZ" and FIELD2 of the same IDOC = "PQR", then this  IDOC's details has to be passed to the receiver.
    I have tried to implement the above condition at interface determination in graphical mapping.
    In the graphical mapping,  the problem is:
    Assuming there are 3 idocs in the input file.
    FIELD1 of IDOC[1] = 'XYZ' and FIELD2 of IDOC[1] = 'PQR'
    FIELD1 of IDOC[2] = 'LMN' and FIELD2 of IDOC[2] = 'RST'
    FIELD1 of IDOC[3] = 'ABC' and FIELD2 of IDOC[3] = 'DEF' .
    Now, if none of the IDOCs in the input file satisfy my requirement,the message mapping should not be called at all. But in my case its failing because FIELD1 of IDOC[1] and FIELD2 of IDOC[3] together are satisfying the condition and hence the message mapping is getting called.
    And I need to check this condition IDOC wise. Both the conditions has to be satisfied in the same IDOC.
    The question is very similar to the one posted by SHOBHA HB. (Topic:Receiver determination(or Interface determination) and conditional routing )
    but, due to complexities in the graphical mapping,  we have decided to go for the ABAP mapping instead.
    Kindly help, by mentioning the steps I should follow for this interface, the logic basically. I already have paths to some basic ABAP mapping documents from SDN, so, kindly refrain from posting general URLS for definition or history of ABAP mapping.
    IF you could guide me on this interface, It would be really helpful.
    regards,
    giri raj

    Hi,
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    This document will help you to create ABAP Mapping .
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20abap-mapping%20in%20xi%203.0.pdf
    How to Use ABAP Mapping in Exchange Infrastructure 3.0 (NW2004)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    SAP Network Blog: How to call XI ABAP Mapping via RFC
    /people/ricardoandres.maienza/blog/2007/04/06/how-to-call-xi-abap-mapping-via-rfc
    SAP Network Blog: Testing ABAP Mapping
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    An ad-on
    /people/michal.krawczyk2/blog/2006/09/20/xi-abap-mapping-logs--more-standard-better-visibility
    Regards

  • ABAP Mapping for Large Messages

    Hi Folks,
    We are exploring different options for dealing with the fact that XI will choke on very large messages/files. One of the options that we are considering is a third party tool that bypasses XI. However, we've just learned that it may be possible to solve the large message problem by using ABAP Mapping, because supposedly, by doing so, one would bypass the large message being converted to XML as it comes into XI. The scenario involves messages coming into XI on their way to SAP R/3. Does the ABAP Mapping option appear to be viable to you experienced folks out there?
    Thanks
    Nic

    Hey
    tunneling as per the term is used mainly for IDOC but we use the term bypass to implement the same concept but with other interfaces.
    see if u have simple 1-1 mapping then u can do a bypass scenario in which u are not doing anything in IR,u simple do the configurations in ID.
    you can not drastically increase the performance just by choosing some specific mapping.mappin is not made for this .
    for best performance you can design a bypass JDBC to IDOC scenario(but then you wont be able to do any message mapping.
    have a look at the following for bypass scenario
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    if u want to do message mapping then design a JDBC to Proxy scenario.
    proxy is mainly used to enhance performance and would be the best bet for u i guess
    Thanx
    Aamir suhail
    Message was edited by:
            Aamir Suhail

  • Webdispatcher to access iview from abap backend

    We have ECC6 (abap only) and EP (Java only) into the intranet.
    Throught a webdispatcher installed in DMZ we are able to reach the EP from the internet.
    From the internet when we try to access some iView on the Portal that are referring to the ECC6 , we recive errors as the ECC6 is not reachable from the internet.
    The solution is to setup up a second webdispatcher, in DMZ,  dedicated to the ECC6  and to modify the iViews on the Portal in order to make them pointing to the second Webdispatcher or there is another possibility  ?
    regards

    For HTTPURLLOC related configuration see:
    SAP HELP:
    ABAP: http://help.sap.com/saphelp_nw70/helpdata/EN/59/31ae42e0fac911e10000000a1550b0/content.htm
    BSP: http://help.sap.com/saphelp_nw70/helpdata/EN/59/31ae42e0fac911e10000000a1550b0/content.htm
    Take a look at the scenarios provided. Scenario 2, 3, and 4 are for the uasge of a reverse proxy.
    There is a blog on SDN about Reverse Proxy usage (it's a link collection to other blogs and resources):
    A collection of Reverse Proxy resources
    And for setting the PCD System Objects:
    SAP WIKI: https://wiki.sdn.sap.com/wiki/display/EP/SystemObjectsettingswhenconfiguredwithReverse+Proxy
    For more information, read this article: Internet Connectivity to SAP Applications - Webinar Powerpoint
    SDN: https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/7f4397ba-0501-0010-3ba9-e6b0f70ca7a7
    br,
    Tobias

  • Accessing EJB from Java Mapping

    Hi all,
    I developed an EJB, deployed it to the J2EEServer via Visual Administrator. When I do a lookup from outside (NWDS) with the JNDI Name I gave it, everything works fine.
    Now I have to use this EJB in a Java Mapping. I do the same --> lookup and narrow with PortableRemoteObject and so on.
    But the problem is that I always get an java.lang.NoClassDefFoundError for the home interface.
    Any ideas?
    Thanks a lot
    Olli

    Hello.
    Check my wiki article:
    http://wiki.sdn.sap.com/wiki/display/stage/SapNetweaverProcessIntegration.CallEjb3.0methodfromJavaclassmappingPI7.1
    (SapNetweaver Process Integration. Call Ejb 3.0 method from Java class mapping PI 7.1)

  • Trigger workflow from ABAP webdynpro and attach an Adobe interactive form

    I have a need to create an ABAP Webdynpro that will upload a completed Adobe interactive form and then route the form to multiple approvers thru workflow.  I am having trouble finding any documentation or examples of passing the Adobe form in the workflow.  Do I have to save the content of every field on the form to an internal table and then have every workitem call an ABAP webdynpro to render the form?  Any help or suggestions would be greatly appreciated.

    Hi Joyce,
    This can be done as follows :
    [pdf as an attachment|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60ff6ad3-729b-2b10-6582-fedc82680a29&overridelayout=true]
    Regards,
    Geet

  • How to access the compass in maps for ipad

    How do you turn on the compass in the new Maps app for the iPad?

    For some reason the the compass app is not included in the pre installed apps on the iPad. You might like to try Compass 54 instead.
    http://itunes.apple.com/gb/app/compass-54-pro/id458958949?mt=8

  • HT204053 how do i access music from the cloud for download into my iTunes?

    How do I get to my music once it's in the cloud and how to I download it to my itunes on all devices from the cloud?

    Use one of the following services.
    iTunes Match
    iTunes in the Cloud

  • Creating a PDF-Mail-Attachment via Abap Mapping possible ?

    Hi folks,
    I am trying to build a szenario like: Getting an Idoc -> sending it to abap mapping -> map a pdf from smartforms in abap -> map the from/to for the mail payload -> come back from abap mapping -> send it with the mail adapter .
    But now I am stuck at the point "coming back from abap mapping", because the pdf -data seems to become unreadable because of conversion. I am using Ixml and trying to attach the create pdf (looks hex-right at that point) by method create_simple_element as content-tag of the mail. But after rendering and coming back out of mapping, it seams that that data is not converted from xstring back in the right way. Can someone give a hint ? Is that way by IXML not possible for data including binary-data ? Have I to go another way?
    Thanks in advance
    Detlef

    > as content-tag of the mail.
    Sometimes I have to read the request several times to find the issue:
    No you cannot put a binary as part of an XML element.
    You can only send a plain binary as payload, so the whole mail would be nothing besides the PDF.
    In PI 7.1 you can create also an additional attachment out of mapping, but I do not know if this works for ABAP mapping also.
    The whole "I want to send an email with attachment out of PI" topic is not supported from PI development in any way.
    So you have to write a lot of code (especially Java code) to achieve this.
    > Regarding your opinion. Its based on customer requirements to have central focal point in dezentral landscape.
    The PI expert has to advise the customer for the scenarios. That is part of the job.

  • When we wil go for abap mapping ??

    Hi,
    As we know there are graphical, XSLT, JAVA mappings are there apart from ABAP mapping. I have gone through below weblog.
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    and also help.
    http://help.sap.com/saphelp_nw04/helpdata/en/12/05731a10264057badc32d3d3957015/frameset.htm
    None of them says ABAP mapping is either faster or stable as compared to other mappings. Even though it is the case, still when we will go for abap mapping ??
    Is it like that it is totally depend on the available resources in hand ??
    thanks
    kumar

    > The SAP XI/PI mapping is the most efficient as it
    > only loads the part of the source message that are
    > used to create the target message(s) at runtime.
    >
    > Java and XSLT have to load the whole message into
    > memory to process the message. This can be
    > inefficient and if dealing with large messages can
    > cause issues.
    About your statement.
    If you consider the field mapping (or UDF) runtime, then you are correct. But if you consider the whole mapping runtime, you also have to "load" the full message in message mapping, obviously. What happens is that it is transparent to the developer, since loading and parsing is done by standard. But message mapping also deals with loading and parsing the whole message (and it is done with Java underneath). Then I don't think message mapping will have a significantly better/worse performance, when compared with Java mappings (performing normal xml processing methods).
    As for XSLT, the performance problems happens because you have a XSLT processor running over Java VM. Then, if you have heavy load on it, the mapping runtime will consume the resources necessary to run the xslt processor (which is, by itself, very resource consuming) and also to treat that heavy input.
    Regards,
    Henrique.

  • ABAP mapping split messages and dynamic filename

    Hello,
    i have set up a IDOC to file scenario where the IDOC is split into several files, which works fine. In addition to this it is required to set a dynamic filename out of the ABAP mapping for each file. If only one file is created this works already as well but how do you set the dynamic configuration when the messages are split?
    Regards,
    Andreas
    Edited by: Andreas on Feb 26, 2009 9:09 AM

    you cannot do dynamic configuration for message splits. The below is from SAP help.
    Adapter-Specific Attributes and Multi-Mappings
    In multi-mappings, there are multiple message headers with adapter-specific attributes. The mapping API can only access one message header. This has the following consequences depending on whether there are multiple source or target messages:
    u25CF     1:n Transformation
    If there are multiple target messages, the header for the adapter-specific attributes is copied for each message. This means that you can only create one header for all adapter-specific attributes, and not individual headers.
    u25CF     n:1 Transformation
    This variant is only possible for multi-mappings in integration processes. If there is more than one source message, read-access to the adapter-specific attributes of the various message headers is not possible at runtime.
    u25CF     m:n Transformation
    All afore-mentioned restrictions apply here. Developers can at most write the same adapter-specific attributes for all target messages to the header, without read-access to the attributes of the source messages. m:n transformations are only supported within integration processes.
    What i will suggest is to use BPM to have the message split i.e 1:N mapping and then after that have another mapping 1-1 to have the dynamic configuration

Maybe you are looking for

  • I'm getting ORA-07445 [kksLockDelete()+465] errors on a 10.2.0.3 Database

    Hello I am getting the following Error on our database when I run a procedure that takes many hours to complete: Mon Aug 23 10:39:43 2010 Errors in file /oracle/admin/HLBCP/bdump/hlbcp_j000_27898.trc: ORA-07445: exception encountered: core dump [kksL

  • Can you tile windows from Javascript in CS3?

    I have a javascript that will open 2 images in Photoshop from different directories based on a single filename, so that the users can view them side by side. They need this to be able to compare the colour correction from an automated process against

  • .swf animation in rich pdf : flash logo issue

    Hello When I do simple animations in inDesign, export them in .swf and put them back in just like in this tutorial http://tv.adobe.com/watch/csinsider-design/indesign-creating-interactive-pdfs-with-page-tu rn-and-flash-animations/ i got a swf logo co

  • ARIS - Solution Manager synchronization limitations

    Hello, I made simple demo and I noticed that there are several limitations in ARIS<->Solution Manager synchronization. Could You explain me some issues or tell how to solve them, that would be very helpful. 1. When I make model in SolMan and then imp

  • Integrate Crystal Reports XI Release 2 and VS2005 IDE

    <p>Hi,</p><p>How can i integrate Crystal Reports XI R2 is directly into the Visual Studio 2005 development environments. So i can host my report in either a Web or Windows application with one of the Crystal Reports viewer controls, or use the extens