Message mapping logic help

Hi All
I have a source structure like this below. It's a big structure actually. I'm just pasting the relevant structure where I need your help.
</root>
     <storage> 
         <id>AB</id>
         <Type>TY</storType>
         <Temp>100</Temp>
    </storage>
----</root>
My requirement is to check the value coming in <Type> and if it is TY, then the target structure will be the exactly the same
If it is XY, then the target structure will have one more field <celsius> and will look like this below.
</root>
     <storage> 
         <id>AB</id>
         <Type>TY</storType>
         <Temp>100</Temp>
         <celsius>922</celsius>
    </storage>
----</root>
The <storage> complex element with elements can repeat as many times in the source XML. But the values of <Type> will be either TY or XY and I have to create the target structure accordingly. Pls help. I am using graphical message mapping
thx
mike

Hi Michael,
Please try below mapping
Regards,
Krupa

Similar Messages

  • Message mapping/UDF help..

    Hi experts,
    Can someone let me know whether there is a chance to fulfill the below requirement:
    Input file:
    In the Input CSV file, there is a fixed length field with length 9 char and has leading zeroes (ex: 000000650)
    Output file:
    In the O/p XML file, the corresponding value should be displayed as "6.50" (Have to remove the leading zeroes, right justified and the last two digits should be allocated for decimals)
    Can anyone let me know if we can handle in Message mapping or should we write a UDF? If so can you please provide the code..
    Any help would be highly appreciated !!
    Thnx
    - Ravi

    Hi Ravi,
    UDF:
    Create a function zerosuppress and take the cache as value and take one argument input. Then put the code below:
    //Put this code
    String output = input.replaceFirst("^0+","");
    return output;
    With this function your leading zeros will remove.
    Then map like this:
    source field --> zerosuppress (udf) --> divide by 100 --> target field.
    This should solve your issue.
    Regards,
    ---Satish

  • Message Mapping logic ...!!

    Hi Experts ,
    I am working on the below scenario where my Sender System is the Oracle Database system and Receiver System is SAP ECC
    basically JDBC->PI->IDOC  channels i am using . I need to create the below Mapping logic in order to satisfy the Interface Requirement
    Based on the Interface_Transaction_ID  each Idoc has to be Created and each Idoc should have corresponding Segments and line items . based on th value of GLAccount and Vendor Account
    My sender Payload is
    <row>
      <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
      <DOC_HEADER_TEXT>5251/0115/000000/0000</DOC_HEADER_TEXT>
      <COMPANY_CODE>1610</COMPANY_CODE>
      <DOCUMENT_DATE>20110707</DOCUMENT_DATE>
      <POSTING_DATE>20110305</POSTING_DATE>
      <PERIOD>3</PERIOD>
      <DOCUMENT_TYPE>ZF</DOCUMENT_TYPE>
      <REFERENCE>45720-T</REFERENCE>
      <VENDOR_ACCOUNT></VENDOR_ACCOUNT> 
      <CF_MATERIAL_TYPE>MATTE</CF_MATERIAL_TYPE>
      <CF_ENTRY_POINT>610 Tank</CF_ENTRY_POINT>
      <CF_SOURCE>XNN</CF_SOURCE>
      <PAYMENT_TERMS></PAYMENT_TERMS>
      <BASELINE_DATE>20110305</BASELINE_DATE>
      <ASSIGNMENT>5251/0115/000</ASSIGNMENT>
       <TEXT>USD </TEXT>
       <GL_ACCOUNT>111810</GL_ACCOUNT>   
       <SPECIAL_GL_IND></SPECIAL_GL_IND>
        <PREV_DOC_NUMBER></PREV_DOC_NUMBER>
       <PREV_POSTING_DATE></PREV_POSTING_DATE>
    </row> 
    <row>
      <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
      <DOC_HEADER_TEXT>5251/0115/000000/0000</DOC_HEADER_TEXT>
    <ASSIGNMENT>5251/0115/000</ASSIGNMENT>
       <TEXT>USD </TEXT>
       <GL_ACCOUNT>111821</GL_ACCOUNT>   
       <SPECIAL_GL_IND></SPECIAL_GL_IND>
        <PREV_DOC_NUMBER></PREV_DOC_NUMBER>
       <PREV_POSTING_DATE></PREV_POSTING_DATE>
    </row> 
    Row having GL_Account Value      E1BPACHE09,
                                                             E1BPACGL09, (GLvalue 111810)
                                                             E1BPACGL09, (GLvalue 111821)
                                                             E1BPACCR09,
                                                             E1BPACCR09,
                                                             E1PACEXTC  .
                                                             Field value=CFCV00000627
    Similary if Vendor_Account Value exist then only Vendor Segment (E1BPACAP09) must occur at target side
    Row having Vendor_Aaccount  Value     
                                                             E1BPACHE09,
                                                             c (Vendor value 123)
                                                             E1BPACAP09, (Vendor Value 124)
                                                             E1BPACCR09,
                                                             E1BPACCR09,
                                                             E1PACEXTC  .
                                                             Field value=CFCV00000628
    I have mapped GL_ACCOUNT -
    >E1BPACGL09 .
                             Vendor_Account---->E1BPACGL09.
    if any one have gone through simiar mapping logic kindly share and do the needfull ...
    Regards,
    Aziz khan .
    I

    Hi ,
    Here the requirement which i am looking for :
    Sender Side has below value
    <row>
         <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
        <PERIOD>3</PERIOD>
        <DOCUMENT_TYPE>ZF</DOCUMENT_TYPE>
        <REFERENCE>45720-T</REFERENCE>
        <CF_MATERIAL_TYPE>MATTE</CF_MATERIAL_TYPE>
        <VENDOR_ACCOUNT>600046</VENDOR_ACCOUNT>
        <CF_ENTRY_POINT>610 Tank</CF_ENTRY_POINT>
        <CF_SOURCE>XNN</CF_SOURCE>
        <PAYMENT_TERMS></PAYMENT_TERMS>
        <BASELINE_DATE>20110305</BASELINE_DATE>
         <ASSIGNMENT>5251/0115/000</ASSIGNMENT>
         <GL_ACCOUNT>111810</GL_ACCOUNT>
         <USER_STATUS>TOHD</USER_STATUS>
         <PREV_POSTING_DATE></PREV_POSTING_DATE>
    </row>
    as you can see in the above Payload has  values where Row  is the Root element and under that the rest of fields occur (its a jdbc to idoc Scenario ) and here based on the Interface Trasaction ID the Idoc is generated . where each Idoc should have either GL Segment if GL Account Value has values and respectively Vendor idoc Segment has to be generated if Vendor Account details are present . the Sender Data will have either GL Account or Vendor Account value in a row not both. 
    below is the IDOC Strcuture how it looks for GL Account at Target side
    IDOC
      --->E1BPACHE09
            E1BPACGL09 (This is the GL Segment will have GL Account Line item)
            E1BPACAR09
            E1BPACAR09.
            E1BPACEXTC
              Filed1
    below out put should come when Vendor Account have Value
       IDOC     
            E1BPACHE09
            E1BPACAP09 (This is the Vendor Segment will have Vendor Account Line item)
            E1BPACAR09
            E1BPACAR09.
            E1BPACEXT09         
              Filed1
    Now when i duplicate the above Row
    Like
    <row>
          <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
           <VENDOR_ACCOUNT></VENDOR_ACCOUNT>
           <GL_ACCOUNT>111810</GL_ACCOUNT>
    </row>
    <row>
          <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
           <VENDOR_ACCOUNT></VENDOR_ACCOUNT>
           <GL_ACCOUNT>111811</GL_ACCOUNT>
    </row>
    <row>
          <INTERFACE_TRANSACTION_ID>CFCV00000627</INTERFACE_TRANSACTION_ID>
           <VENDOR_ACCOUNT></VENDOR_ACCOUNT>
           <GL_ACCOUNT>111812</GL_ACCOUNT>
    </row>
    I have Mapped the below fileds
    Interface_Transaction_ID-->SplitByValue(EachValue)>CollapseContext>IDOC 
    Interface_Transaction_ID -->Filed1 (IDOC/E1BPACEXTC/Filed1) 
    all the above 3 Row have been duplicated the 3 Rows will have 3 interface Transaction id Value=CFCV00000627 (which is same  as per the above Sender Payload ) and 3 GLAccount fields with values 111810,111811,111812 each
    If i test the data i should get the below output 1
    if GL account exists
      IDOC 1
            E1BPACHE09
            E1BPACGL09 (This is the GL Segment with value 111810)
            E1BPACGL09 (This is the GL Segment with value 111811)
            E1BPACGL09 (This is the GL Segment with value  111812)
            E1BPACAR09
            E1BPACAR0/
            E1BPACEXTC
              Filed1  (CFCV00000627)
    If Vendor account Exists then output 2  as follows
    IDOC     
              E1BPACHE09
             E1BPACAP09 (This is the Vendor Segment will have Vendor Account Line item)
             E1BPACAP09
             E1BPACAP09
             E1BPACAR09
             E1BPACAR09.
             E1BPACEXT09         
               Filed1  (CFCV00000627)
    How can i achive the above logic  .
    Regards,
    Aziz

  • Message Mapping Logical Problem

    Hi there I have an issue with my message mapping. My source structure looks like this.
    IDOC
    -Seg1
    ---Element1
    ---Element2
    ---Seg2
    ElementA
    ElementB
    Ok so I have to map the IDOC to a flat file. Seg 1 is the Header and Seg2 is the Details. For each flat file there will only be 1 Seg1 but there can be X amount of Seg2s' in the flat file. My problem is mapping Element 1 to Element A. Element A has the value of Element 1 and 2 combined. It appears I cannot map a lower hierarchy to an higher hierarchy? I tried changing the context but with no luck.
    Any idea?
    Thanx,
    Jan

    My problem is mapping Element 1 to Element A.
    What do you mean by this? I guess you want the Element1 to appear with each Segment occurrence. If yes, you may use standard function useOneAsMany as shown.
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Regards,
    Prateek

  • Regarding Message Mapping Logic ...!

    Hi Experts ,
    I am working on the the below requirement  JDBC to IDoc scenarion in the mapping i need the below logic
    based on the existence of the Transaciton ID . the idoc followed by the segments should be created . for ex
    If Interface_Trasaction_ID= 456  THEN   Idoc 1 followed by Segments and line items
                                                                    E1BPACHE09,
                                                                    E1BPACCR09
                                                                    E1BPACCR09,
                                                                    E1PACEXTC  .
                                                                        Field value=456
    If Interface_Transaction_ID =457 THEN  Idoc  2 followed by Segments and  line items
                                                                   E1BPACHE09,
                                                                   E1BPACCR09
                                                                   E1BPACCR09,
                                                                   E1PACEXTC  .
                                                                        Field value=457
    To satisfy the above logic i have mapped Transaction id > SplitByValue->CollapseContext--->Idoc
    But the same Mapping Logic is not working when Sender payload is triggred having  Repeated Transcation_Id value ias given below if Transaction ID= 456 ,
                  Transaction ID= 457,
                  Transaction ID= 457,
                  Transaction ID= 456 .
    then  output should have only 2 Idoc  Followed by segments where Field Value will be 456, 457
    I have mapped Transaction id -->Field Value .
    let me know how can achive the above logic ...!!

    Hi Aziz,
    you can use UDF
    Transaction IDRemoveContext-->sortUDF- SplitByValue->CollapseContext--->Idoc
    public void removeDuplicate(String[] Value, ResultList result, Container container) throws StreamTransformationException{
    String temp = Value[0];
    result.addValue(Value[0]);
    for(int i=0;i<Value.length;i++)
       if(!(Value<i>.equals(temp)))
            result.addValue(Value<i>);
       temp=Value<i>;

  • Error : message mapping logic in PI

    Dear Team,
    Please find the source and target structures..
    Source ::
    ->MT
    -->records
    --->matnr
    --->batch
    --->submatnr(s)
    Target::
    ->ZRFC
    -->Import
    --->Item
    >matnr
    >batch
    >submatnr
    1) It is SOAP to RFC scenario. In Source strcuture for one matnr , we have one or more submatnrs.
    2)RFC in R/3 contains Import parameters as..matnr,batch,submatnr(onlyone).
    3)I want to build mapping - for each submatnr in source I want to create one complete record in target .i.e
    if matnr contains 2 submatnrs in source , i want to create 2 records at target side like
    first record - matnr,batch,submatnr 
    second record - matnr,batch,submatnr.
    here in both records the matnr and batch values are same , which we have taken from source but submatnrs changed.
    Can any body help me how to build mapping.
    -Drumi

    Hi,
    I assumed that submatnr occurance 1 to unbounded...
    here is the logic
    map
    Submatnr----->SplibyValue(ValueChange)-->RemoveContect-->Item
    matnr1---->useoneAsmany(1st argument Matnr1,second and third arugument submatnr)--->splitbyValue(EachValue)-->Matnr1.
    batch1---->useoneAsmany(1st argument batch11,second and third arugument submatnr)--->splitbyValue(EachValue)-->batch1
    submatnr-->removecontext-->splitbyevalue(eachvalue)--->submatnr
    Regards,
    Raj

  • Require some complex logic scenario in message mapping

    Hi all,
                 I need some complex logic scenarios for practice in message mapping . Kindly forward some links for message mapping logic scenarios.
    Thank you so much in advance.

    always search sdn first....
    http://wiki.sdn.sap.com/wiki/display/XI/MappingConceptsinSAPXI

  • CSV to XML problem in message mapping

    Hi,
        I am trying for a CSV to XML scenario. But i am confused with the message mapping.
    Can anybody please help me by giving demo example of this???
        Thank you.
    Regards,
    Atul

    Hi
    Kindly have a look at this SDN TVdemo VALUE MAPPING REPLCIATION for all answers,
    https://www.sdn.sap.com/irj/sdn/developerareas/xi?rid=/webcontent/uuid/a680445e-0501-0010-1c94-a8c4a60619f8 [original link is broken]
    http://help.sap.com/saphelp_nw04/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    IR: Message Mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm
    hope this helps!
    best regards,
    Thangesh

  • Need Help with Message Mapping in PI 7.1 - JDBC to IDOC

    I have an outgoing SQL function that sends multiple rows of data for use in creating an IDOC in ECC. I am trying to key the creation of new IDOCs (already did the maxOccurs trick to the IDOC definition) based on a field in the JDBC return data...
    JDBC Message Format...
    SEGNAM - TRANS_ID - MATERIAL - VKORG...ETC
    MARA -  00001 - 1234 - <space> - ...
    MARC -  00001 - 1234 - VK01 - ...
    MARA - 00002 - 9876 - <space> - ...
    MAKT - 00002 - 9876 - <space> - material description - ...
    Each time there is a new TRANS_ID, I need to indicate a new IDOC in the message mapping. I have tried all kinds of combinations of TRANS_ID --> dropContext --> splitValue and TRANS_ID --> collapseContext --> splitValue, but nothing has worked.
    Has anyone done this kind of message map (without any BPM please)?
    Thanks,
    Nathan

    Hello Nathan,
    For this one, you have to play with contexts.
    row 1 SEGNAM = MARA, TRANS_ID = 1, MATNR = 123...
    row 2 SEGNAM = MARC, TRANS_ID = 1, MATNR = 123, WERKS = PL01...
    row 3 SEGNAM = MARA, TRANS_ID = 2, MATNR = 987
    This also depends on the occurrence of the parent node. example, if I want MATNR to be populated, the logic would be like
    ex:
    IDOC1..unbounded) (The logic is the already provided in an earlier response)
    -->MATNR (1..1)
    MATNR --------> removeContext ----------------> FormatByExample --> MATNR
    TRANS_ID --> removeContext --> splitByValue:ValueChange --> /
    If the rows are not in order of trans_id, then you need to incorporate sorting into the logic above.
    Hope this helps,
    Mark

  • A little help needed in message mapping

    a little help needed in message mapping
    I have to map one of the idoc header segments as many times as it occurs to each Idoc when using the split message funcionality
    let us say we have the segment seg1 and there is a QUALF in it
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    then we use the vbeln to split the idoc into 2.
    so if we have
    <vbeln> 1 </vbeln>
    and
    <vbeln>2 </vbeln>
    then 2 Idocs should be created like this
    <Idoc>
    <vbeln> 1 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    <Idoc>
    <vbeln> 2 </vbeln>
    <seg1>
    <qualf>001</qualf>
    </seg1>
    <seg1>
    <qualf>002</qualf>
    </seg1>
    </Idoc>
    it is easy to create the segment by using createif with the QUALF field but my problem how to map the qualf twice for each idoc
    Thanks.

    UseOneAsMany is the function you need to use.
    It takes three parameters:
    1 --- The node you want to duplicated
    2 --- How many times you want to duplicated
    3 --- The context you want to place for it.
    Regards
    Liang

  • Require a Message mapping for this Logic.

    Hi Experts,
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note  is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
               So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B  then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field  in the Target Side.  ike wise the process goes on upto 3.Kindly do the needy..
    Thanq very much in advance..
    Edited by: Prashanth Bharadwaj on Oct 17, 2011 1:29 PM

    Hi Prashanth,
    Concatinate the two fields OrderNo and MaterialNo and follow the below logic which will resolve your problem.
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext-->IDOC
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(0,1)-->Delivery_Order_No
    formatByExample>collapseContext>SplitByEachValue-->Recv_Date
    FormatByExample:
    input1:resulrOfSortByKey
    input2:concatination>removecontext>sort-->SplitByValuChange
    sortByKey:
    input1:concatination-->removecontext
    input2:date-->removecontext
    concatinationOfOrderNo&MaterialNo>removecontext>sort>splitByValueChange>collapseContext>splitByEachValue>subString(1,1)-->Material_Num
    formatByExample>sum>Recv_Quantity
    FormatByExample:
    input1:sortByKey
    input2:concatination>removecontext>sort-->SplitByValueChange
    SortByKey:
    input1:concatination-->removecontext
    input2:Quantity-->removeContext
    Regards,
    Priyanka.

  • Need help on message mapping screen

    Hi folks,
    I am working on file to idoc scenario.   I Imported the IDOC to my scenario. In Messaga Mapping IDOC structure displaying fields as a documention. but i need techincal names of those fields.
    for Example:   In my IDOC 1 field is showing companycode but I want to see that field as a BUKRS.
    How to see the technical names of IDOC fields in Message Mapping.
    Your help is highly apprecia

    Hi,
    I dont think we would be able to see the data element names of the IDOC in XI. Even the imported XSD of Idoc doesnot contain data element name.
    We would be only dealing with the field names/ structure of the IDOC for field message mappings. The field names are internally mapped to the data element names in SAP R3 system.
    To view the internal mapping between field names and data element names of the Idoc fields, you can go to the transaction 'WE30'. Give the basic type of the Idoc and go to the segment editor. You can find the data element names for each field name  there.
    Thank you.
    Regards,
    Subbu

  • MESSAGE MAPPING PROBLEM PLS HELP

    hi forum i have a problem in message mapping...
    i have a file to file scenario...with a BPM..
    the components are:
    1. one outbound async MI:->   MI_OA_fileSender
    2. one abstract async MI:->   MI_AA_fileSender
    the above two has messsage structure as:
    <ns0:MT_sourceFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1...1
          <record>  1..unbound
             <batch_num/> 1..1
             <quantity/>  1..1
          </record>
       </recordset>
    </ns0:MT_sourceFile>
    3. one abstract async MI: -> MI_AA_fileDestination
    4. one inbound async MI:-> MI_IA_fileDestination..
    the above two has messsage structure as:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1..unbound
             <rec_number/> 1...1
             <qty/> 1...1
          </record>
       </recordset>
    </ns0:MT_rana3_destinationFile>
    inside the BPM i m doing a simple one to one interface mapping between MI_AA_fileSender and MI_AA_fileDestination AND then use a send step to send it to receiver service. But inside the graphical editor, for the message maaping in the interface mapping, i change the target structure a bit by duplicating <rec_number> making it:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
       <recordset> 1..1
          <record> 1.. unbound
             <rec_number/> 0..1
             <rec_number/> 0..1 //did right click   and "duplicate sub-tree, so it becomes 0...0"
             <qty/>
          </record>
       </recordset>
    </ns0:MT_destinationFile>
    But i dont change the original structure of MT_destinationFile.
    Now in the resultant file in the receiver side i recive two <rec_number> tags....
    but since i didnt change the original structure of MT_destinationFile.....but i only made a change in the mapping by duplicating the node <rec
    _number>(right click and done "duplicate sub tree").............SHOULD IT NOT THROW AN ERROR
    Message was edited by:
            sudeep dhar
    Message was edited by:
            sudeep dhar

    >.............SHOULD IT NOT THROW AN ERROR
    Not necessarily.
    See, XI won't realize, by default, a schema validation in your messages. If you want a validation, you'll have to implement one, as described in
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm
    However, for some particular steps in BPM, I have observed that an invalid XML will some times result in a error in BPM execution. In particular, if you have switch steps, container operation steps and/or correlations where you use a particular field of that message, it may throw some exception when you have an invalid xml. Also, I have observed some errors with conditional receiver determination for invalid messages.
    As a best practice, if you have any kind of dependency on a particular message inside your system (like switches, container operations, correlations, condition in receiver or interface determination etc), it is a good idea to implement a schema validation.
    Also, if you do want to create a thrustable scenario, you might want to perform schema validation for all your output messages.
    Regards,
    Henrique.

  • How to Alert RFC connection failure via message mapping? Kindly Help!

    Hi Experts,
        I have a JMS - XI - RFC scenario.
    JMS receives the Rosattenet PIP contents and sends it to RFC function module in remote SAP R/3 system.
       I have a requirement where I have to monitor RFC connection failure because of the remote R/3 system being down. I have to send a email alert where the subject contains the PIP number to understand for which PIP the connection failed.
      The PIP number exists in the PIP content at the interface.
      If I use the Alert configuration in the runtime workbench for monitoring then I cannot dynamically pass the PIP number.
      Only way I think of triggering alert is in the message mapping via a Java UDF.
      But I am not sure how can I do this? How do I check in the UDF if RFC connection has failed? Is this the correct approach?
      How to acheive my requirement? Note that my email subject content is dynamic bacause if PIP number.
    Please help!
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi Gopal,
    what version/sps of XI are u running?
    The easiest way to do what u want inside a UDF is to
    1. use JCo to try estabilish a connection to the remote SAP System
    2. if that fails, use JavaMail to send an email message
    Let your UDF work on the PIP number, accepting it as input, and (maybe) returning it as output if everything goes ok. Otherwise break the mapping execution as described by Michal in one of his last weblog (using Dynamic Configuration).
    Note that the above method doesn't guarantee that the message will be actually delivered, as some seconds could last between your check and the real RFC delivery operated by the Adapter Engine...
    I am evaluating a way to do the same with Alert Framework. I will let you know the result!
    Cheers,
    Alex

  • Help with Message Mapping - Context Change

    I need help with the following message mapping.  I am filtering by EMP_STAT in the Message Mapping.  I have this working for the ROW structures, but I can get the HEADER/REC_COUNT field to calculate.  I can do just a record count of ROW and get it to work, but I can't get it to work with the filter EMP_STAT = 'REG' added.  I get a context error.  Could someone send me the mapping code.
    Sender XML----
    <RECORD>
    <ROW>
    <EMPLOYEE>111</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>222</EMPLOYEE>
    <EMP_STAT>PT</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>333</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    </RECORD>
    Receiver XML----
    <RECORD>
    <HEADER>
    <REC_COUNT>2</REC_COUNT>
    </HEADER>
    <ROW>
    <EMPLOYEE>111</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    <ROW>
    <EMPLOYEE>333</EMPLOYEE>
    <EMP_STAT>REG</EMP_STAT>
    </ROW>
    </RECORD>

    Hello,
    You can use this mapping
    For REC_COUNT:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> count -> REC_COUNT
                                     EMPLOYEE -> /
    For ROW:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> ROW
                                     EMPLOYEE -> /
    For EMPLOYEE:
    EMP_STAT -> equalsS: constant:REG -> ifWithoutElse -> removeContext -> SplitByValue -> EMPLOYEE
                                     EMPLOYEE -> /
    For EMP_STAT:
    Constant: REG -> EMP_STAT
    Hope this helps,
    Mark

Maybe you are looking for

  • ORA-12535: TNS:operation timed out

    First thing first I need to vpn to Data Center before able to connect to any of the servers in Data Center. The other thing is do not ask me why my company set up is so strange. Let's call this DB server Machine B DB Server Oracle9i Release 9.0.1.1.1

  • Sending email from PL/SQL in oracle

    This is the sample code DECLARE l_mailhost VARCHAR2(64) := 'mail.mycompany.com'; l_from VARCHAR2(64) := '[email protected]'; l_to VARCHAR2(64) := '[email protected]'; l_mail_conn UTL_SMTP.connection; BEGIN l_mail_conn := UTL_SMTP.open_connection(l_ma

  • Attempting to close a tab results in duplicate tabs opening up in browser

    Hi everyone! A couple of months ago I purchased a Logitech M310 wireless mouse. It's been working great so far. The other day I noticed something really weird. I use the middle-click button to open links in new tabs or to close existing tabs. When I

  • Stock as per sales order

    hello, how can we check stock movements day wise. can we check like- at the order entry, line item was  confirmed but afterwards it was rejected saying quantity not available. can we check what happened to the stock on that particular day. thanks

  • All I can see on my Ipod is the itunes app plugged into the usb.  I have reset it and still not working

    I am getting a black screen on my ipod touch.  I plug it into the ihome or the computer and all it shows it the round itunes and the usb plug in.  I have tried to reset it by pushing the home button with the on/off button and it will show the apple f