What table stores incoming XML message

Hi Gurus,
Can anyone tell me which is the table where the XML of incoming messages are stored in integration broker. I am aware of the tables like PSAPMSGSUBCON,etc mainly give only the status and other information about the message; but I am interested in knowing where exactly is the actual XML stored in the database.
-Sudripta

OK. I did some testing with the data in PSAPMSGPUBDATA. Base64 is not involved anywhere. I did this against PT 8.50. I think PT 8.48 to PT 8.50 (the current version) would be the same. I looked at some code I wrote for PT 8.45 and it was very similar. The table and fields were different, but the compression, etc was the same.
It appears that the data in the MIMEDATALONG field is compressed only (no base64, etc). I don't know the compression algorithm used. I used the java.util.zip.Inflater class to "inflate" the contents.
About concatenating the "pieces"... I didn't have any large enough messages to see data chunking. From my testing, I saw that SUBSEGMENTNO of 0 contained the JMS header and IBInfo. SUBSEGMENTN0 of 1 had the XML message. It seems that the DATASEQNO field would contain an index for chunked data, but I didn't have any messages large enough to verify. For each SUBSEGMENTNO, I inflated them separately, not concatenated. I don't know if chunked data is zipped and then chunked, or chunked and then zipped. This will determine whether you concatenate data and then inflate or inflate and then concatenate.
Here is my test code:
import java.io.UnsupportedEncodingException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;
public class MessageDownloader {
  public MessageDownloader() {
    super();
  public static void main(String[] args) throws SQLException,
                                                DataFormatException,
                                                UnsupportedEncodingException {
    Connection conn =
      DriverManager.getConnection("jdbc:oracle:thin:@your.db.server:1521:YOURSID",
                                  "username", "password");
    Statement stmt = conn.createStatement();
    ResultSet rs =
      stmt.executeQuery("SELECT IBTRANSACTIONID, IB_SEGMENTINDEX, SEGMENTNO, SUBSEGMENTNO, UNCOMPMIMEDATALEN, MIMEDATALONG\n" +
        "  FROM PSAPMSGPUBDATA\n" +
        //" WHERE IBTRANSACTIONID = 'GUID-GOES-HERE'\n" +
        " ORDER BY IBTRANSACTIONID, IB_SEGMENTINDEX, SEGMENTNO, SUBSEGMENTNO, DATASEQNO\n");
    String id = "";
    while (rs.next()) {
      if(!id.equals(rs.getString("IBTRANSACTIONID"))) {
        id = rs.getString("IBTRANSACTIONID");
        System.out.println("----------------------------------------------------");
        System.out.println("******  " + id + "  ******");
      String segment = rs.getInt("IB_SEGMENTINDEX") + "-" +
                     rs.getInt("SEGMENTNO") + "-" +
                     rs.getInt("SUBSEGMENTNO");
      Inflater inflater = new Inflater();
      byte[] result = new byte[rs.getInt("UNCOMPMIMEDATALEN")];
      inflater.setInput(rs.getBytes("MIMEDATALONG"));
      int length = inflater.inflate(result);
      System.out.println("Segment: " + segment);
      System.out.println(new String(result, 0, length, "UTF-8"));
      System.out.println();
      System.out.println("--");
      System.out.println();
      inflater.end();
}

Similar Messages

  • Sort incoming XML message

    Hi
    Is there a standard way in PI to sort the incoming XML message within the message mapping before doing the mapping itself?
    The scenario would be an incoming Flat file with header and item data records, and we will be mapping it in PI to create IDOC messages based on the same Header segment. So for the same Header Data I would like to create a single IDOC. But the incoming file would be unsorted, so I would need to sort it first based on the header segment some way.
    Ideally, we would like to do all of the mapping in the graphical mapping tool and not use a UDF.
    Thanks
    Edited by: MxG on Nov 20, 2008 5:04 PM

    I already tried Sort, but it doesnt work the way I want.
    Say I have inbound XML as
    <hdr1>
    <hdr2>
    <itm1>
    <itm2>
    <itm3>
    it needs to be mapped to an IDOC as
    <hdrsegment>
    <itmsegment>
    I mapped XML header data to IDOC after sorting, and that works fine. The issue comes on assigning the inbound XML Item data to IDOC Item segment. It is creating the correct Number of segments, but when assiging the fields to IDOC fields, it is using unsorted data ie the data as received, not the sorted one which I did for IDOC Node, and for Header fields.
    What I really want is to sort the data once, and then use that in the mapping.

  • Ignore DTD declaration in incoming XML message

    Hi,
    I have an issue where I am receiving an incoming XML message which starts with a DTD declaration.
    This causes an issue with the XML parser step in the mapping because the parser attempts to resolve the DTD location. However this location is external and the PI server cannot access it.
    The location for reference is http://dtd.bibit.com/paymentService_v1.dtd
    Therefore I am investigating options to ignore the DTD declaration or removing it altogether prior to the XML parser step.
    I would hope I could use either XSLT or Java mapping but do not really know where to start.
    Can anyone please provide a method of doing this ? I would prefer to use XSLT but am open to other options.
    I have no control over the DTD declaration as it is supplied by a 3rd party application. 
    Thanks
    Colin.

    Hi Russell,
    The XSLT sample you have provided does not work.
    I still get the message below in the trace file:
    <Trace level="2" type="T">Call XSLT processor with stylsheet BIBIT_PaymentResponse.xsl.</Trace>
      <Trace level="2" type="T">resolveEntity systemId = 'http://dtd.bibit.com/paymentService_v1.dtd' (publicId = '-//Bibit//DTD Bibit PaymentService v1//EN').</Trace>
      <Trace level="3" type="T">Search http://dtd.bibit.com/paymentService_v1.dtd (urn:com-dg-ng:crm:paycardauth, -1) in swcv 703fadc0-858c-11dd-971b-f2400a20801e.</Trace>
      <Trace level="3" type="T">Search http://dtd.bibit.com/paymentService_v1.dtd (-1) in swcv 703fadc0-858c-11dd-971b-f2400a20801e without namespace.</Trace>
      <Trace level="1" type="T">Resource not found: http://dtd.bibit.com/paymentService_v1.dtd Thrown: com.sap.aii.ib.server.mapping.execution.MappingClassNotFoundException: http://dtd.bibit.com/paymentService_v1.dtd at com.sap.aii.ib.server.mapping.execution.InternalMappingFinder.getInputStream(InternalMappingFinder.java:119) at com.sap.aii.ib.server.mapping.execution.InternalMappingFinder.readFile(InternalMappingFinder.java:62) at com.sap.aii.ib.server.mapping.execution.MappingLoader.getResourceAsStream(MappingLoader.java:131) at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer$MappingEntityResolver.resolveEntity(AbstractMappingTransformer.java:328) at com.sap.engine.lib.xml.parser.XMLParser.scanDTD(XMLParser.java:1272) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2804) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2839) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:229) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parse_DTDValidation(Parser.java:282) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:293) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:126) at com.sap.aii.ib.server.mapping.execution.jaxpfactories.MappingXMLReader.parse(MappingXMLReader.java:102) at com.sap.engine.lib.jaxp.TransformerImpl.transformWithStylesheet(TransformerImpl.java:387) at com.sap.engine.lib.jaxp.TransformerImpl.transform(TransformerImpl.java:240) at com.sap.aii.ib.server.mapping.execution.AbstractMappingTransformer.transform(AbstractMappingTransformer.java:174) at com.sap.aii.ib.server.mapping.execution.XSLTMapping.executeStep(XSLTMapping.java:79) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.SequenceMapping.executeStep(SequenceMapping.java:40) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:71) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:119) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:72) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at sun.reflect.GeneratedMethodAccessor310.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy544.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:183) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:269) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)</Trace>
    I will try your Java mapping next and get back to you if I get success with this.
    Cheers for your help.
    Colin.

  • What table stores delivery header and item texts?

    Hi Gurus,
    Which table stores header and item text of delivery? We use VBBP text object and provide test id, language to read the texts using function module 'READ_TEXT'.
    Can you please tell me which table store the texts?
    Best regards,
    Pavan

    >
    Pavan1 wrote:
    > Hi Gurus,
    >
    > Which table stores header and item text of delivery? We use VBBP text object and provide test id, language to read the texts using function module 'READ_TEXT'.
    >
    > Can you please tell me which table store the texts?
    >
    > Best regards,
    > Pavan
    This stores in text objects so you need to pass
    Here is simple thing to find what to pass to the read_text function module.
    Go to delivery - If you want to find header text - GOTO (on application menu) - Header -texts - Double click on the text where you enter text - GOTO (on application menu) - Header - This will give you a popup kind of screen where you can find the
    text name (if it is header - only delivery number and if it is item - deliverynumber + item number ) , lang, Text id, Text object
    This will give you the required parameters... .

  • Which table stores MII log messages

    Hi ,
             Can anyone let me know the name of the table where MII stores all the log messages? As far as I know Netweaver is using one SQL Server database internally to store all the MII log messages. I would like to know the name of the table where these logs are residing
    Thanks in advance
    Shaji

    Hi ,
    It is stored in a file.
    The below two links should clear your doubts :
    http://wiki.sdn.sap.com/wiki/display/xMII/NetweaverCEBasicsforMII
    Writing log messages into DB
    Regards,
    Arun

  • What table stores the SAPscript paragraph formats for a form.

    Does anyone know where the paragraph formats are stored for a SAPscript form.  I can view them using SE71, but what I am looking for is the table where all this information is stored.
    Thanks.
    Bill Lomeli

    Hi Bill,
    Check table "DOKHL" .
    ID = 'DE' (Paragraph ID)
    LANGU = SY-LANGU
    OBJECT = 'TDPARAGRAPH'.
    TYP = 'E'.
    *------Sample code -
          SELECT SINGLE *                       
            FROM  DOKHL                         
            WHERE LANGU      = LANGU            
            AND   ID         = ID    "Paragraph ID"             
            AND   OBJECT     = OBJECT      "value :TDPARAGRAPH"     
            AND   TYP        = TYP        'value :E'.       
    Lanka
    Message was edited by: Lanka Murthy

  • What tables store the email addresses for a distribution list?

    Can someone please tell me the table or tables used to store the email addresses for a distribution list
    I have a requirement in BW to send an email to a person who starts a process chain.   One to many people will be able to do this and the requirement is to have the email only go to the person who executes the Process chain.    I would like to dynamically maintain the distribution list in my job.

    Here is piece of code i used one of my program to fetch email address from distribution list
      if not soid-objnam is initial.
        call function 'SO_DLI_READ_API1'
          exporting
            dli_name                   = soid-objnam
            shared_dli                 = 'X'
          tables
            dli_entries                = i_distlist
          exceptions
            dli_not_exist              = 1
            operation_no_authorization = 2
            parameter_error            = 3
            x_error                    = 4
            others                     = 5.
        if sy-subrc ne 0.
        else.
          loop at i_distlist.
            if i_distlist-member_adr is initial.
              move i_distlist-member_nam to i_user-bapibname.
              call function 'BAPI_USER_GET_DETAIL'
                exporting
                  username = i_user-bapibname
                importing
                  address  = wa_address
                tables
                  return   = i_return.
              move wa_address-e_mail to wa_receiver-receiver.
              append wa_receiver to i_receiver.
            else.
              move i_distlist-member_adr to wa_receiver-receiver.
              append wa_receiver to i_receiver.
            endif.
          endloop.
        endif.

  • URGENT: What table stores data for logged changes in PA and PD??

    Thanks!!!

    Hi Scott,
    Thanks for the reply.  This transaction leads to the report that allows you to display logged changes in PA, but I need the table name where these changes are actually stored for PA and the other table where change documents are stored in PD.
    Regards,
    -Joe

  • What table stores Interface Filters in Work Repository

    Hi there
    I have a number of simple 1 to 1 interfaces (i.e. 1 source, 1 target). And each interface has its own filter between source and target.
    I would like to know how these filters are stored in the work repository database.
    I can see the filter text in the TXT field in SNP_TXT. But I would like to be able to somehow extract the name of the source table, the name of the target table and the filter text in a query.
    There seems to be a myriad of cross referenced ID numbers accross many tables to achieve this. Its all very confusing trying to follow the ID numbers to a source and target table.
    Is there any documentation that would tell me how the work repository database tables are inter-referenced?
    Thanks in advance,
    N

    I have answered this in one of previous threads:
    Re: trying to find join condition
    Hope that helps

  • CS order operation: CATSD-VORNR what table stores this info?

    Hi all,
    we are trying to use CS operation level information entered in CATS to create printouts and other reporting.
    there are two factors:
    - we use in CATS for CS also other units (e.g. KM and CUR) than time dimension --> not shown in CS (AFRU)
    - KOB1 shows all information but is lacking which entry is related to which operation (VORN)
    - we have no attendances/absences and cannot use PTEX200 for this.
    we cannot be sure that every operation has information entered in CATS --> how to link person 6 CATS entries (hours and expenses) and CS order & opreation?
    We have ECC6.0
    Any help would be highly appreciated.
    BR,
    Pipsa

    So then AFVC does have the data that you want right?
    Just do a fetch into an internal table.
    report zrich_0003.
    data: xafko type afko.
    data: iafvc type table of afvc with header line.
    parameters: p_aufnr type afko-aufnr.
    select single * into xafko
           from afko
                 where aufnr = p_aufnr.
    clear iafvc. refresh iafvc.
    select * into corresponding fields of table iafvc
                   from afvc
                            where aufpl = xafko-aufpl.
    loop at iafvc.
      write:/ iafvc-vornr.
    endloop.
    Regards,
    Rich Heilman

  • Table Names of Processed  XML Messages

    Hi ALL,
    We are facing space problem  in PRD box with one of our client, due to increase in large number of Messages  .
    Our basis tryed to do archiving, but endup with no luck.
    Could any one tell us in which tables processed idoc xml messages will get stored.
    .Any help is highly appreciated.
    Kind Regards,
    Vijay

    Hi,
    you should not delete XI Message directely from database table. Please schedule archive or delete jobs. If you never define which interface should be archived, it could NOT be done afterwards. This is also documented clearly on the help.sap.com. What you could do is delete the old messages to free table space. You could configure now interface which should be archived, in this case the message processed in XI in future could be archvied.
    XI message is actually stored in different tables,
    SXMSPMAST, SXMSPMAST2      XML Message master Table,  contains runtime information on XML messages processed by XI; in this table you can find all the information that is visible in SXMB_MONI.
    SXMSCLUP     XI Message Payload Tabelle
    SXMSCLUR     XI Message Payload Tabelle
    SMPPREL3     this table contains information about interfaces; here you can find information on sender (party, service, interface and namespace) and receiver (party, service, interface and namespace) as well as information on maps (their GUID and name as well as namespace).
    SXMSPFRAWH     Performance Head Data, Audit Log,
    SXMSPFRAWD     Performance Data, Audit Log
    There are could be more tables used to store information about XI messages, as I mentioned don't modify database table by your own risk. You will not get support by SAP, it could cause fatal error.
    regards,
    Hai

  • Multiple lines in a Output XML message

    Hi all,
         I am currently implimenting a simple scenario of creating a file in a particular format using XI.The working scenario is that we get an XML message from BO which will be mapped to the required format of the file.But for testing we are using an hardcoded XML file as the incoming message to XI.
         But there is a problem I am facing. The incoming XML message will contain multiple information and this has to be mapped to a header information followed by items.Like for example I have a payment document which has paid some 5 invoices.The incoming XML message will have this information and what I need in the output is to have the invoice information in 5 different lines.
    For eg - Assume I have the following structure for incoming message
    REGUH
    REGUP
    ....and so on
    Here for every REGUH entry we can have mulitple REGUP and also we can have multiple REGUH.
    Say my target structure is -
    Header Info
    Record Info
    so for every REGUH and corresponding REGUP combination I will have a Header Info and Record Info.For the next REGUH and corresponding REGUP I will have another Header and Record Info.
         I tried testing this in message mapping by duplicating the node REGUH and REGUP but it does not work.I also tried by having the occurances as 1 to n on both sides.It did not seem to work.
    Can you guys give some feedback on this.
    Thanks..
    Sandeep

    Manish,
        Thanks for the information.But this was a simple case which works.But in my case I have something like -
    one field in REGUH will appear once in the file while some other fields will appear multiple times.Also I have a lot other structures which are something like this.
    I assume that occurence for both sides should be 1 to n.
    But it does not seem to work for me.Its a bit complicated target structure.

  • Osb: Proxy Messaging Service retrieve only xml message that have the proper

    Hi All.
    I have a Proxy Service with Messaging Service type which read xml messages from a queue.
    The Request Message Type in the proxy is xml and I have provided the type information by declaring (in the element and type field) the XML schema type of the XML document exchanged.
    I need the proxy service to retrieve from the queue only the xml messages that have the proper schema.
    But when the proxy retrieves any xml msg in the queue regardless of their schema definition .
    Appreciate your input.
    Thx,
    Ross
    Edited by: user6677631 on Feb 25, 2013 9:52 AM
    Edited by: user6677631 on Feb 25, 2013 10:02 AM

    Selecting the XML schema for request type in a messaging proxy does not ensure the validation of incoming XML message against schema. Similarly if you create a WSDL based proxy the validation against WSDL definition will not happen automatically. Choosing XML as the type of message will only ensure that any malformed XMLs will be rejected before entering the message flow. For validating against schema you will need to explicitly add a validate action within the proxy message flow, if validation fails raise an error and roll back the message to the Queue or log the errored message and commit the message/publish to an error queue.

  • Free Item UMSON- what table?

    Purchase Order Item can be set as free item in Transaction ME21N or ME22N. The screen field is UMSON. Does anybody know what table stores this information?
    I tried ST05, where used search for data element UMSON without success.
    Any help would be welcome.

    Check this table,
    TB2BJ                            Trading Contract: Item Categories     
    UMSON                            Free item                             
    Regards,
    SaiRam

  • Which table stores messages used for monitoring in XI?

    Hi Experts,
              What tables are used by XI to store message monitoring data? I mean, when we go to SXMB_MONI and go to processed messages, we get a table of messages. In which table these messages are stored?
    Please help!
    Thanks
    Gopal

    Hi ,
    This thread will help you.....
    In Which Database Table the Messages are Stored in XI
    Sekhar

Maybe you are looking for