Retrieving Message Id in to Mapping

Hi,
How to retrive the message id in to message mapping.
Thanks,
Kiran.

Hi Kiran,
How to retrive the message id in to message mapping.
This can be easily achived by using a simple UDF and map it with message ID filed in target side.
Use the same piece of code given above.
Regards,
Pinangshuk.

Similar Messages

  • Read Filename form Adapter-Specific Message Attributes in Java Mapping

    Hi,
    I have scenario File to Mail adapter. How can i read filename from Adapter-Specific Message Attributes
    in java mapping.
    Thank you and Best regards
    Fernand

    Hello Fernand,
    Are u using DOM or SAX parser?
    In any case just put the Dynamic config code in the execute function or the other option is to define it as a private functionand call it in the execute,My personal advice would be the former.
    Just put this code in ur java mapping
    As fellow sdn ers have mentioned there is no need of the container method,just initialise the set param method and use it in the dynamice config code as follows
    public class YourClass implements StreamTransformation
         private Map map;
    public void setParameter(Map param)
         map = param;
    public void execute(InputStream in, OutputStream out) throws StreamTransformationException
                   DynamicConfiguration conf =(DynamicConfiguration) map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey KEY_FILENAME =DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    // read value
    File = conf.get(KEY_FILENAME);
    Now just call File in the mapping program,
    Should help u out 
    Regards,
    Tauseef

  • Accessing SAP:HopList element in message header from JAVA-mapping

    Dear Experts,
    Is it possible to access the SAP:HopList element from message header in JAVA-mapping? 
    I need this to get the list off all receivers of current message (I have a ReceiverDetermination with two receivers, without any conditions, so both receivers are receiving each message and in InterfaceDetermination to one of the receivers I have a JAVA-mapping, in which I need to know the name of another receiver. And the SAP:HopList is containing this information).
    Or maybe where is some other solution?
    Best Regards,
    Artsiom Anichenka

    That's tricky, since the proper way of doing it would be through BPM.
    Anyway, if you expose your XI interface as a WebService (Soap sender cc) you could access it through Mapping Lookup (lookup works for RFC, DB and Soap lookups). Check https://help.sap.com/javadocs/NW04S/current/pi/index.html
    But be aware that Mapping Lookup API is not intended for inserts/updates (since it doesn't contain any transacational handling), just mere lookups (selects in tables), so I'm not sure it is the best approach for your case.
    Regards,
    Henrique.

  • Message Split Comes Before Mapping

    Hi,
    Can anybody explains the following queries....
    1.Why Message Split Comes Before Mapping in Pipeline Steps?
    2.What do you mean by Collaborative Profile and Collaborative Agreement?
    3.What are Context Path, Context Object and Context Handling?
    4.Which adpaters run on j2ee engine and which run on ABAP stack.
    5.What is the need of datatype when we are creating the message type
    6. and similarly what is the use of Business system when we are creating the corresponding Technical system
    Thanks n Advance.,
    Stallin

    >>1.Why Message Split Comes Before Mapping in Pipeline Steps?
    Simple. Imagine you have 2 receivers with different mappings. If this has to work correct, XI needs to copy of the source msg for doing the mapping. rite?
    >> 2.What do you mean by Collaborative Profile and Collaborative Agreement?
    Collaborative profile -->Serivce with out party and service and all the commn channels you create for it.
    Collaborative agreement -->Sender & Receiver agreements, that bind your cc with the interface.
    >> 3.What are Context Path, Context Object and Context Handling?
    Context path- It is Xpath expressions I guess. It is used for specifying conditions in receiver determination and interface determination.
    Context Objects -- Used for the same.It reduces the complex Xpath expressions.
    >>4.Which adpaters run on j2ee engine and which run on ABAP stack.
    All adapters are part of j2ee frame work except IDOC and HTTP adapters. You dont need sender agreements for the 2.
    5.What is the need of datatype when we are creating the message type
    To get the valid XML structure.
    6. and similarly what is the use of Business system when we are creating the corresponding Technical system
    Tech systems -->Physical entiteis
    Buss Systems --> Logical entities.
    Regards,
    Jai Shankar
    Message was edited by:
            Jai Shankar

  • No messages created from split mapping - Multimapping

    Hi,
    Getting the error in MONI saying that : No messages created from split mapping
    Sender is :
       <Purchase>
                <Number>007</Number>
                <Desc>RAJ</Desc>
                <Quantity>half</Quantity>
       </Purchase>
    Target should be 3 files such as:
      <Purchase>
                <Number>007</Number>
                <Desc>RAJ</Desc>
       </Purchase>
    <Purchase>
                <Number>007</Number>
                <Quantity>half</Quantity>
      /Purchase>
    <Purchase>
                 <Desc>RAJ</Desc>
                <Quantity>half</Quantity>
    </Purchase>
    Regards,
    Y.Raj.

    Hi,
    In your mapping select the cardinality of source message as 0..1 while that of target message should be 0..unbounded.
    Also since you are not using all the elements of source into all the target messages (seems using only two source elements in each target msg) do the mapping accordingly...i doubt whether you can achieve your requirement in one mapping itself....may be you will have to follow what Tarang mentioned:
    3. have 3 mappings between source structure and MT1(map only num,dec), source struc and MT2(map num,Qty) ....
    Exception to above statement:)
    If you set the target cardinality as 0..unbounded then duplicate the root target node thrice (as per your requirement)....and then map each target section seperately....
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Apr 7, 2009 9:12 AM

  • No messages created from split mapping

    Hello,
    My Scenario is JDBC to Proxy and there is  1:n Mapping
    I had done the multi mapping and done the all the necessary configuration in the MM, IM and ID
    I tested the payload in the MM and IM and it is working fine.
    But while iam doing the end to end testing in the ID --- Test Configuration,It is showing the error at Interface Determinmation and Mapping step.
    In SXMB moni, iam getting error as
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">GENERIC</SAP:Code>
      <SAP:P1>No messages created from split mapping</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No messages created from split mapping</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    The below is my source payload.
      <?xml version="1.0" encoding="utf-8" ?>
    - <ns:mt_vendor_fusiondb xmlns:ns="http://loreal.com/poc_vendor">
    - <row>
      <ID>1</ID>
      <LIFNR />
      <NAME1>SriTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
    - <row>
      <ID>2</ID>
      <LIFNR />
      <NAME1>GilderTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
    - <row>
      <ID>3</ID>
      <LIFNR />
      <NAME1>KarthikTest</NAME1>
      <PSTLZ>07066</PSTLZ>
      <LAND1>USA</LAND1>
      <TELF1>1234567890</TELF1>
      <Status>READY</Status>
      <LastUpdated>2008-11-20 09:20:00.0</LastUpdated>
      </row>
      </ns:mt_vendor_fusiondb>
    Please help me in resolving this error
    Srinivas

    Hi Carlos,
    Now my message mapping is working, the error is in the messagetype i declared 'row' as capital letters,due to this in the runtime it is erroring out in the request message mapping.
    But still I had one more issue,iam getting error in Technical routing, the error is
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Technical Routing
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="OUTBINDING">CO_TXT_MMF_ENGINETYPE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Messages in multi message format can be sent to one adapter engine only</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    In the ID i checked the radio button extended.
    But still iam getting the above error.Can you guide me in resolving the error

  • No messages created from split mapping   error .....

    HI XI Friends..
    In My XML to RFC scenario,,
    i am doing message splitting withput BPM.
    in message mapping ..i changed target message occurance to unbounded
    and same i did in interface mapping also..
    static test is OK..creating multiple target messages in static test.
    in interface determination,using enhanced option i given interface mapping.
    file is picking but in SXMB_MONI ...i am getting error like this
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">GENERIC</SAP:Code>
      <SAP:P1>No messages created from split mapping</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No messages created from split mapping</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    please guide me..
    regards
    ram

    Hi Ram,
    Check these..
    Split mapping created no messages
    Message Split without BPM - Error
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Access Message ID in graphical mapping

    Hi,
    I could not find a solution: How do I access the Message ID in the graphical mapping?
    During Runtime, I need to get the Message ID in graphical mapping and map it to a field in the target rfc.
    Can I do this either direct in mapping or is there a parameter in UDF?
    thx
    holger

    search in sdn before posting...
    http://wiki.sdn.sap.com/wiki/display/Snippets/UDFtoReadMessageIDofaPIMessage
    Regards,
    Raj

  • Can I retrieve messages from a blackberry email address in Mail for OS X?

    I'm wondering if I can configure Mac OS X Mail to retrieve messages from a blackberry email address.
    Thanks.

    lte me know if my question doesn't make sense.

  • TS3899 In the past I have been able to retreive all messages not deleted in the inbox of my mailbox.  This week I have not been able to acces messages received prior to 9/10/13.  what can I do to retrieve messages eceived prior to 9/10/13.

    Until recently I have been able to retrieve all messages not deleted i m mailbox "inbox".  Today I can only retrieve messages from 9/10/13 to present.  How can i retreive all previously sent messages that were not deleted?

    Settings > Mail, Contacts, Calendars > Tap the account in question > Mail days to sync - increase the time to sync.

  • Preparing to retrieve messages... forever

    Sometimes I check my email connected with my mobilephone or a bad wireless connection. If I get disconnected when Mail is checking for new messages - in the middle of downloading a bigger email... it seems like the Mail app get serious problems. The account that was disconnected cannot check mail anymore, and hangs with the activity "Preparing to retrieve messages" forever. The only way I can get the specific account to work again is to check the pop-account and download the messages with an another email program. When the pop-server is empty it seems like the Mail app resets and it will allow me to check for new mail again.
    It's very frustrating!
    Please Apple! Is it something to do, other than having using my old Eudora program just to reset the account. And why is it possible to download messages with Eudora?
    Someone with the same problem?

    nothing changed on both ends, not just my computer but also the server. Another kicker is a fellow employee has had the same issue for months before I ever had it. And another colleague doesnt have the issue at all. I tried re-installing mail, deleting all preferences, all accounts and installed the app from disc and that did not work either.

  • Can't see msgs in UWC / reconstruct fails with cannot retrieve message uid

    I have restored several email accounts into a test email account. I'm trying to move some of the .msg files around so that they are easier to find. I have created some new folders and when I move the messages into the folder, I cannot see them in the web client. If I run reconstruct, I get
    ERROR: Inconsistent information: 0 idx records 41 messages 0 expunged
    Reconstructing...
    cannot retrieve message uid 590
    cannot retrieve message uid 807
    cannot retrieve message uid 911
    cannot retrieve message uid 915
    cannot retrieve message uid 1198
    cannot retrieve message uid 1286
    etc where the number at the end is the name of the .msg file.
    # imsimta version
    Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 64bit)
    libimta.so 6.3-4.01 (built 17:28:45, Aug 3 2007; 64bit)
    SunOS message1 5.10 Generic_127111-02 sun4u sparc SUNW,Sun-Fire-V245
    Normally, after restoring email, I have to recreate the mail folders (either via mboxutil or manually via the UWC or a client), then run reconstruct. Even then, often the messages will show as 'deleted' until I either move them to a different folder or go into the UWC and mark them as undeleted. At this point, I can't see the recently restored messages at all in the UWC. They are on the server. Any ideas would be greatly appreciated.

    In general, manually moving files around inside the store like this should be discouraged.
    reconstruct is telling you something is wrong:
    ERROR: Inconsistent information: 0 idx records   41 messages   0 expunged
    Reconstructing...
    cannot retrieve message uid 590
    cannot retrieve message uid 807
    cannot retrieve message uid 911
    cannot retrieve message uid 915
    cannot retrieve message uid 1198
    cannot retrieve message uid 1286The first line is to be expected based on what you have done. The store.idx indicates there are no messages in the folder. But it found 41 .msg files. So it is going to rebuild store.idx to fix that.
    But then there is some problem with accessing the .msg files. Possibilities would include:
    - wrong ownership/permissions?
    - the .msg file being in the wrong NN subdir ??
    If those guesses do not lead to anything, try truss on the reconstruct command to see what happens when reconstruct tries to open those files.

  • TS2755 How can I retrieve messages that I accidentally cleared?

    How do I retrieve messages that were accidentally cleared?

    If it's on iMessage go to another iMessage device that's currently set up with your account and it might be there. If it's a normal text, go online or contact your provider to see your incomming and outgoing messages.

  • ** List of RFCs to retrieve messages from SXMB_MONI

    Hi friends,
    I found only one RFC 'SXMB_SELECT_MESSAGES'  to retrieve messages from SXMB_MONI. But, this RFC returns only message id.
    Could you kindly tell RFCs or classes other than this which will be usefull to retrieve XML Payload and other things ?
    Kind Regards,
    Jeg P.

    Hi,
    There is a function module SXMB_GET_MESSAGE_LIST through which you can get the messages in SXMB_MONI.
    Refer the below thread for more detail:
    In Which Database Table the Messages are Stored in XI
    Thnx
    Chirag
    Edited by: Chirag Gohil on Feb 15, 2008 6:13 PM

  • Retrieving messages from MQ Series

    Hi,
    We have the situation where we need to receive messages from our partner, who only can use MQ Series to send them. So we are looking into ways how to solve it on our end, which is on a Unix server. We will only read messages, and the other side will be a black box for us which will provide us with settings to connect to their manager.
    Do we need to install a client software (which IBM seems to provide for free) and on top of that use a Java API? Or do we use JMS on top of the client?
    Or if we use JMS, isn't the client needed?
    Thanks

    Hi
    I am trying to read messages from the MQ using the following code.
    The queue used by this program is shared, msg is pushed other program and this progam fetch the msg and save it physically.
    I m facing a problem, say there are 15 messages, then 15 files should be created, some time it creates 15 files one for each message, while some times it creates less then 15 files.
    String messageType = null;
              String docId = null;
              String idocData = null;
              String fileName = null;
              String msgId = null;
              try {
                   // Create a queue manager object and access the queue
         // that will be used for getting the messages.
                   qMgr = new MQQueueManager(qManager, env);
                   //int openOptions = MQC.MQOO_INPUT_EXCLUSIVE | MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE;
                   int openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_BROWSE | MQC.MQOO_INQUIRE | MQC.MQOO_FAIL_IF_QUIESCING;
                   queue = qMgr.accessQueue(qName, openOptions, null, null, null);
                   MQGetMessageOptions gmo = new MQGetMessageOptions();
                   // Get the count of messages present into Queue.
                   int messageCnt = queue.getCurrentDepth();
                   _logger.info("Current Depth of MQ is : "+ messageCnt);
                   if (messageCnt > cnt && cnt != 0) {
                        messageCnt = cnt;
                   // If count is greater than Zero then get the message from Queue
                   // and creates the file under the target folder.               
                   if (messageCnt > 0) {
                        for (int i = 0; i < messageCnt; i++) {
                             _logger.info("Depth of MQ Before reading : "+ queue.getCurrentDepth());
                             messageType = "";
                             docId = "";
                             idocData = "";
                             fileName = "";
                             msgId = "";
                             MQMessage message = new MQMessage();
                             queue.get(message, gmo);
                             byte[] data = new byte[message.getMessageLength()];
                             String msg = null;
                             message.readFully(data);
                             _logger.info("Getting File  : "+ (i+1));
                             try {
                                  msg = new String(data);
                                  messageType = msg.substring(147, 177).trim();
                                  docId = msg.substring(121, 137).trim();
                                  idocData = msg.substring(108, msg.length());                              
                                  msgId = String.valueOf(System.currentTimeMillis());
                                  // Getting inbox folder path                              
                                  if (messageType.trim().equalsIgnoreCase("INVOIC01")) {
                                       targetFolder = BOCConfig.getProperty("invoice.inbox.folder");
                                  } else if (messageType.trim().equalsIgnoreCase("DELVRY03")) {
                                       targetFolder = BOCConfig.getProperty("asn.inbox.folder");
                                  fileName = createFile(idocData, msgId, messageType, targetFolder);                              
                                  _logger.info("File Created no " + (i+1) +" with msgId " + msgId + " messageType " + messageType + " DocId " +docId);                              
                                  _logger.info("Depth of MQ After reading : "+ queue.getCurrentDepth());
                             } catch (NullPointerException ne) {
                                  String strMsg = "Edgeware got junk or null message from MQ which is not proceed by MQ Adapter.";
                                  fileName = createFile(idocData, msgId, messageType, failedFolder);
                                  raiseAlert(strMsg, messageType, docId, fileName, ne.getMessage());                              
                             } catch (StringIndexOutOfBoundsException siobe) {
                                  String strMsg = "Edgeware got invalid message from MQ which is not handled by MQ Adapter.";
                                  fileName = createFile(idocData, msgId, messageType, failedFolder);
                                  raiseAlert(strMsg, messageType, docId, fileName, siobe.getMessage());                         
                             } catch (Exception e) {
                                  String strMsg = "Edgeware got error while creating idoc file or DB transction";
                                  fileName = createFile(idocData, msgId, messageType, failedFolder);
                                  raiseAlert(strMsg, messageType, docId, fileName, e.getMessage());
                   // closing the queue.
                   queue.close();
              } catch (MQException ex) {
                   String strMsg = "Edgeware got MQ Error while connecting/retrieving message from Queue";
                   String err = "MQ exception: CC = " + ex.completionCode + " RC = " + ex.reasonCode;               
                   raiseAlert(strMsg, messageType, docId, failedFolder, err);
              } catch (IOException e) {
                   String strMsg = "Edgeware got MQ Error while reading message from the Queue";               
                   raiseAlert(strMsg, messageType, docId, failedFolder, e.getMessage());               
              }catch (Throwable th) {
                   String strMsg = "Edgeware got Runtime Exception";               
                   raiseAlert(strMsg, messageType, docId, failedFolder, th.getMessage());               
              }

Maybe you are looking for