Message Mapping - Initialize counter every context change

Hi all,
is there any way to develop a counter customer function in a graphical message mapping so every context change of a field the counter initializes?
Imagine i have the following structure:
1 DATA
1.1 DETAIL
1.2 DETAIL
2 DATA
2.1 DETAIL
2.2 DETAIL
and i wanna count DETAIL fields but initialize the counter every DATA field. Is there any way to do it?
Thanks a lot.

Hi,
If your Source structure is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_DATA xmlns:ns0="http://yash.com.YH1309">
   <DATA>
      <DETAIL/>
      <DETAIL/>
   </DATA>
   <DATA>
      <DETAIL/>
      <DETAIL/>
      <DETAIL/>
   </DATA>
</ns0:MT_DATA>
and You want the Target as
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_DATA xmlns:ns0="http://yash.com.YH1309">
   <DATA>
      <DETAIL>COUNTER=1</DETAIL>
      <DETAIL>COUNTER=2</DETAIL>
   </DATA>
   <DATA>
      <DETAIL>COUNTER=1</DETAIL>
      <DETAIL>COUNTER=2</DETAIL>
      <DETAIL>COUNTER=3</DETAIL>
   </DATA>
</ns0:MT_DATA>
Create the below UDF with one argument (DETAIL)  and select Execution type all values of a Context
for (int i =1;i<=DETAIL.length;i++)
result.addValue("COUNTER=" + i);
but if you want Your Target as
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_DATA xmlns:ns0="http://yash.com.YH1309">
   <DATA>
      <DETAIL>1</DETAIL>
      <DETAIL>2</DETAIL>
   </DATA>
   <DATA>
      <DETAIL>1</DETAIL>
      <DETAIL>2</DETAIL>
      <DETAIL>3</DETAIL>
   </DATA>
</ns0:MT_DATA>
So please Follow abhishek salvi's reply

Similar Messages

  • Context change not working during test

    Hi all,
    I've made a mapping. With several context changes. They all work fine when testing them in the message mapping and the operation mapping. But when I'm testing the actual scenrio all the target fields where a context change is used the target value is missing.
    What is going wrong?

    HI, thanks for the quick post. But the missing parts are already in the sxmb_moni. A download will not help in my situation. I thnk

  • 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

  • Context change by DOM parsing Java Mapping in XI

    Hi Team,
    I would like to know that how can I handle Context Change by DOM Parser Java Mapping in XI.?
    Suppose  the source XML structure I have like below:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Header xmlns:ns0="urn:bp:xi:hr:edm:test:100">
       <FileName>
          <filesub>
             <subname>a</subname>
             <subname>b</subname>
             <subname>c</subname>
          </filesub>
       </FileName>
       <FileName>
          <filesub>
             <subname>d</subname>
             <subname>e</subname>
             <subname>f</subname>
          </filesub>
       </FileName>
    </ns0:Header>
    Where the field FileName can occur maximum thrice(0...3) but the subname field is (0....unbounded) but in the target source I would like to have as given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test4 xmlns="urn:bp:xi:hr:edm:test:100">
    - <Header>
      <FileName>a</FileName>
      <FileName1>d</FileName1>
        </Header>
    - <Header>
      <FileName>b</FileName>
      <FileName1>e</FileName1>
       </Header>
    Header>
      <FileName>c</FileName>
      <FileName1>f</FileName1>
       </Header>
    </MT_Test4>
    That means the first value from every context of the source field is forming my first and second value in my target first context.Thensecond value from every context is forming my 1st and 2nd value of my target 2nd context and finally 3rd value of every context is forming my 1st and 2nd value of my target 3rd context.Is this possible to done through DOM parsing or we have to do it by UDF only?

    Hi Atanu,
        In my last post I gave an alogorithm to solve the mapping problem. Here is the complete program for the mapping.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class DOMParser1  implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              try
                   DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
                   DocumentBuilder builderel=factory.newDocumentBuilder();
                   /input document in form of XML/
                   Document docIn=builderel.parse(in);
                   /document after parsing/
                   Document docOut=builderel.newDocument();
                   TransformerFactory tf=TransformerFactory.newInstance();
                   Transformer transform=tf.newTransformer();
                   Element root,child,child1=null;
                   Node textChild;
                   NodeList l;
                   int i,n1,j,div,k;
                   String s[];
                   root=docOut.createElement("MT_Test4");
                   root.setAttribute("xmlns","urn:bp:xi:hr:edm:test:100");
                   l=docIn.getElementsByTagName("subname");
                   n1=l.getLength();
                   s=new String[n1];
                   for(i=0;i<n1;++i)
                             s<i>=l.item(i).getFirstChild().getNodeValue();
                   l=docIn.getElementsByTagName("filesub");
                   div=l.getLength();
                   j=n1/div;
                   for(i=0,k=0;i<j;++i)
                        child1=docOut.createElement("Header");
                        root.appendChild(child1);
                        child=docOut.createElement("FileName");
                        textChild=docOut.createTextNode(s[k]);
                        child.appendChild(textChild);
                        child1.appendChild(child);
                        child=docOut.createElement("FileName1");
                        textChild=docOut.createTextNode(s [ k + j ]);
                        child.appendChild(textChild);
                        child1.appendChild(child);
                        ++k;
                   docOut.appendChild(root);
                   transform.transform(new DOMSource(docOut), new StreamResult(out));     
              catch(Exception e)
                   e.printStackTrace();
         public void setParameter(Map arg0) {
         public static void main(String[] args) {
              try{
                   DOMParser1 genFormat=new DOMParser1();
                   FileInputStream in=new FileInputStream("C:/Apps/my dw/sdnq/apps.xml");
                   FileOutputStream out=new FileOutputStream("C:/Apps/my dw/sdnq/tgt1.xml");
                   genFormat.execute(in,out);
              catch(Exception e)
                   e.printStackTrace();
    source ->  apps.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Header xmlns:ns0="urn:bp:xi:hr:edm:test:100">
    - <FileName>
    - <filesub>
      <subname>a</subname>
      <subname>b</subname>
      <subname>c</subname>
      </filesub>
      </FileName>
    - <FileName>
    - <filesub>
      <subname>d</subname>
      <subname>e</subname>
      <subname>f</subname>
      </filesub>
      </FileName>
      </ns0:Header>
    target structure ->  tgt1.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test4 xmlns="urn:bp:xi:hr:edm:test:100">
    - <Header>
      <FileName>a</FileName>
      <FileName1>d</FileName1>
      </Header>
    - <Header>
      <FileName>b</FileName>
      <FileName1>e</FileName1>
      </Header>
    - <Header>
      <FileName>c</FileName>
      <FileName1>f</FileName1>
      </Header>
      </MT_Test4>
    Hope this helps
    one more thing  in this line "textChild=docOut.createTextNode(s k + j );"   somehow the the third braces one opening  before k and one closing after j is missing for unknown reasons. Please correct it when you actually run this code.
    regards
    Anupam
    Edited by: anupamsap on Mar 7, 2011 12:47 PM

  • Message Mapping: Map value from the first element in a context in target el

    Hi experts,
    I have a problem with a message mapping in XI. I hope you can help me. At first I will give you a source and a target structure. Then I will explain the problem.
    <u>Source structure:</u>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    The structure can contain more than one E1EDP01-Elements, more than one E1EDPT1-Elements and more than one E1EDPT2-Elements.
    <u>target structure:</u>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    For every E1EDP01-Element my mapping creates one LineItem-Element in the target structure. To fill the element <vendmemo> the mapping should do the following steps:
    The mapping should search in E1EDP01 for a E1EDPT1 with the TDID = Z505. And from this E1EDPT1-Element (with the TDID=Z505) the mapping should take the value <TDLINE> from the first E1EDPT2-Element in the context of the E1EDPT1-Element (the E1EDPT1 with the TDID=Z505) and put this value in <vendmemo>.
    The mapping should do this action for every E1EDP01 -> so for every LineItem.
    I tried it with UDF but I didn't found a solution. Can anybody help me?
    best regards
    Christopher

    Hello experts,
    i was wrong ... my mapping isn't still working. I had created a test instance. and only for this test instance the mapping (see above) works.
    Can anybody help me? I'm trying the whole day but I can't find a solution. Here a second description of my problem:
    <u>Source Structure:</u>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    <E1EDP01>
       <E1EDPT1>
          <TDID> ... </TDID>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
          <E1EDPT2>
             <TDLINE> ... </TDLINE>
          </E1EDPT2>
       </E1EDPT1>
    </E1EDP01>
    <u>Target Structure:</u>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    <LineItem>
       <vendmemo> ... </vendmemo>
    </LineItem>
    <u>Description of my Problem:</u>
    For each E1EDP01 in the source structure the mapping creates one LineItem in the target structure.
    The element "vendmemo" should be created in any case ... also if it will be empty.
    To fill the element "vendmemo" the mapping should search in E1EDP01 for a E1EDPT1 with the TDID=Z505. If there is an element E1EDPT1 with the TDID=Z505, the mapping should write the TDLINE from the first E1EDPT2 (under the element E1EDPT1 with the TDID=Z505) in the target field "vendmemo".
    The Problem is that TDLINE an TDID are not in the same context. I tried it with setting the context of both to E1EDP01. But it was not working ... have you any idea oder suggestion?
    Thank you very much
    best regards
    Christopher

  • Graphical Message Mapping - context issue

    Hi experts,
    This is the source structure I have http://www.flickr.com/photos/45449397@N03/4273866518/
    Now, for the target segment, I need to do the following:
    For every block of EAN, I need to check the CHECK fields.
    So for EAN 1111, I see 4 X's. But I need to check the distinct values.
    So, 1 x for CHECK_1, 1 x for CHECK_2 and 1 X for CHECK_5.
    As soon as there is an X, I need to create a target. Even if there are several X values in the same column, I only need it once.
    --> target will be 3 different segment groups.
    For EAN 2222, I only need 1 target segment group.
    Please advice.
    Thanks a lot!
    Dimitri

    I was about to write this that you will face this blank issue.
    You have to remove those blank vaues. We have to choices to do that either we modify the current UDF or we write one more very samll advanced UDF of type "queue".
    If we go for option 2 then the new UDF2 code will be like this..
    while creating the udf just select the type as queue (you will see 3 options: single value, context & queue)
    I guess the default argument will be "var1", if yes you can leave it as it is and the just copy and paset the code.
    for (int i = 0; i < var1.length; i++ )
    if (! var1<i>.equals(""))
    result.addValue( var1<i> );
    Now the mapping will be something like this..
    Source --> old UDF--->RemoveContext--->new UDF --->Target.
    But if you like to go for option 1 then first change the type of UDF to Queue and then in the code modify the "return" statement e.g.
    if (RegTH.equals('X'))
    result.addValue( ExpTH );
    else if (RegHI.equals('X'))
    result.addValue( ExpHI );
    else if (RegLO.equals('X'))
    result.addValue( ExpLO );
    else if (RegPE.equals('X' ))
    result.addValue( ExpPE );
    else if (RegLOW.equals('X'))
    result.addValue( ExpLOW );
    result.addValue( ResultList.SUPPRESS );
    Note: for option 1 you have to set context of source value to their heighest level, so that there shouldn't be a context change. Or you can use RemoveContext.

  • Count-Function in Message Mapping

    Hey, trying to map following structures:
    message
    -m1
    --m11
    -m2
    --m22
    -m3
    --m33
    to
    message
    -m1
    --m11
    -m2
    --m22
    -m3
    --m33
    -f1
    --countItems
    The nodes m1,m2 and m3 can appear 1..unbounded. In target structure I would
    like to have the numbers of all nodes (m1,m2,m3).
    For example: In this source structure m1,m2,m3 appear only one time. In the
    field countItems I would like to have the number 3.
    I tried the count function, but it could only count the structure where I used it (in
    this case: f1).
    How can I count the above-mentioned nodes?
    thanks
    chris

    Hey,
    thanks for your answers.
    But I still couldn't understand how to do this. I open the message mapping for field f1, but the count function could only be set on an target-element, so where to set the counters for m1,m2,m3? Do I have to insert extra fields under m1..m3?
    If I do the counter would increment with every node, so if I have two times m1, in second tree of m1 a two will be insert. If I use the add function, only for these two tree the result would be three!
    @Gangisetty Vijaya Bhaskarudu
    Is this just one UDF? From where he knows, which nodes he have to count, if I have more than m1..m3, but only want to count this three?
    @ sasitharan
    same problem as mentioned above:
    this doesn't work:
    m1--count---\
    I can't use m1 as input for count! Or do I have a wrong count function?
    <b>....au damm, answered my own question. Of course. I use COUNTER and you use
    COUNT!!!!!!!!!!!! I will try this with COUNT!!</b>
    thanks
    chris

  • Dynamically change Receiver Business system in message mapping

    Dear all,
    I would like to change the receiver business system in the message mapping that is used in the interface determination. I do understand there is an enhanced receiver determination where I can use a mapping but that is not what I am looking for.
    I think this should be possible if we can change the appropriate value in the SOAP(message) header.
    Possible candidates I can think of by looking at the SOAP header in SXMB_MONI are
    1. SOAP:Header- SAP:Main- SAP:Receiver- SAP:Service
    2. SOAP:Header- SAP:OutboundBinding - SAP:OutboundBindingEntry - SAP:ToServiceName
    Q1. Which one of the above is relevant while identifying the receiver agreement ?
    Q2. What is the best way to access them from the mapping(preferably from a UDF) ?
    Thanks in advance.
    Cheers
    danus
    PS: I have tried to set "http://sap.com/xi/XI/System","ReceiverService" in Dynamic config & ReceiverService, BusinessSystemReceiver and ReceiverSystem in the Container’s Transformation Parameters, but didn't get the expected result.

    Chidambaram,
    You use an enhanced receiver determination to have a mapping program determine the receivers of the message dynamically at runtime. Instead of creating the receivers in the receiver determination manually, you assign a mapping to the receiver determination and this returns a list of receivers at runtime.
    A typical usage case is if you do not yet know the names of the receivers at configuration time. In this case, you can define a mapping program, for example, which reads a list of receivers from a table or from the payload of the message at runtime.
    Go through the following link:
    [Receiver Determination enhancement|http://www.****************/Tutorials/XI/RecvDetermination/Enhancement.htm]
    Hope your problem gets resolved.
    Regards,
    Kiran Bobbala
    Edited by: kiran Bobbala on May 7, 2008 5:47 PM

  • Context handling in message mapping  for an IDoc to File Scenario

    Hi,
    Can somebody help me with this issue. I have an Idoc to file scenario. heres my idoc structure. Its a custom Idoc
    Header (1..1)
    Detail (0..Unbounded)
             DependentDetail (0...Unbounded)              Note: This dependentdetail is a subelement of Detail
    Trailer(1...1)
    I  created my target structrure the same way as the Idoc structure.
    My output is a simple text file. I need the output in this format
    Header
    Detail1
       Dependentdetail1
       DependentDetail2
       DependentDetail3
    Detail2
       DependentDetail1
       Dependentdetail2
    Detail3
    Detail4
    Trailer
    Since the Detail and Dependent Detail records are unbounded .
    But right now i m getting my output like this:
    Header
    Detail1
    Detail2
    Detail3
    Detail4
    Trailer
    But the DependentDetail record in not showing up in the output file. I didnot do any context change in my mapping. So do I need to do any context handling??...If so can somebody explain me with this.
    Thanks,
    Adam
    Edited by: hymanroth on Apr 29, 2011 11:11 PM

    Thanks Kenneth foryour quick reply,
    Yes, I see the payload for Dependent detail in SXMB_MONI. So as you said earlier there's a problem with my content conversion.
    my content conversion is as follows:
    Header.fieldNames                             
    Header.fieldFixedLengths                
    Header.endSeparator                        
    Detail.fieldNames                               
    Detail.fieldFixedLengths                    
    Detail.endSeparator
    DependentDetail.fieldNames
    DependentDetail.fieldFixedLengths                   
    DependentDetail.endSeparator
    Trailer.fieldNames                             
    Trailer.fieldFixedLengths                
    Trailer.endSeparator  
    So As I told  earlier. With the above content conversion. I am not able to get the Dependent detail record in my output file. So If there is a change in my content conversion can u check it and tell me where I went wrong.
    Thanks,
    Harsh
    Edited by: hymanroth on May 2, 2011 7:03 PM

  • Message mapping changes

    Hi All.
    I created a message mapping from a custom message type towards MATMAS_BAPI01.
    I disabled the EDI_DC40 field and in the idoc communication channel I disabled "Apply control record values from payload".
    When I check the final idoc message created, I noticed that some EDI_DC40 parameters were wrong.
    <SAP:TABNAM>EDI_DC40</SAP:TABNAM>
      <SAP:MANDT>200</SAP:MANDT>
      <SAP:DOCREL>640</SAP:DOCREL>
      <SAP:DOCNUM>0000000000037246</SAP:DOCNUM>
      <SAP:DIRECT>2</SAP:DIRECT>
      <SAP:IDOCTYP>MATMAS_BAPI01</SAP:IDOCTYP>
      <SAP:CIMTYP />
      <SAP:MESTYP>MATMAS_BAPI</SAP:MESTYP>
      <SAP:MESCOD />
      <SAP:MESFCT />
      <SAP:SNDPOR>SAPCX1</SAP:SNDPOR>
      <SAP:SNDPRN>host01</SAP:SNDPRN>
      <SAP:SNDPRT>LS</SAP:SNDPRT>
      <SAP:SNDPFC />
      <SAP:RCVPOR>CFDCLNT200</SAP:RCVPOR>
      <SAP:RCVPRN>CFDCLNT200</SAP:RCVPRN>
      <SAP:RCVPRT>LS</SAP:RCVPRT>
      <SAP:RCVPFC />
      <SAP:TEST />
      <SAP:SERIAL />
      <SAP:EXPRSS />
      <SAP:STD />
      <SAP:STDVRS />
      <SAP:STATUS>03</SAP:STATUS>
      <SAP:OUTMOD />
      <SAP:SNDSAD />
      <SAP:SNDLAD />
      <SAP:RCVSAD />
      <SAP:RCVLAD />
      <SAP:STDMES />
      <SAP:REFINT />
      <SAP:REFGRP />
      <SAP:REFMES />
      <SAP:CREDAT>2005-09-12</SAP:CREDAT>
      <SAP:CRETIM>23:21:31</SAP:CRETIM>
       <SAP:ARCKEY>2FE85D8023D311DA9BDB000D56B9D8A6</SAP:ARCKEY>   </SAP:IDocOutbound>
    In concrete
    <SAP:SNDPRN>host01</SAP:SNDPRN> had to be changed into <SAP:SNDPRN>hostXX</SAP:SNDPRN>. I thought the value host01 came from the sld (logical system name of the technical system attached to the business system), so I changed that towards hostXX.
    <SAP:RCVPOR>CFDCLNT200</SAP:RCVPOR> had to be changed into <SAP:RCVPOR>SAPCDD</SAP:RCVPOR>. I thought this value came from the rfc destination in the xi sytem, so I created a new one called SAPCDD and configured it into the idoc adapter.
    However, this change in the sld/XI system  did not affect the generated idoc (no, I did not forget to activate ).
    I decided to do some more drastic changes:
      - enable EDI_DC40 field in the message mapping
      - enable "Apply control record values from payload" in the idoc communication channel
    I now hardcode the wanted values.
    After activating the changes, still the same idoc is send towards the R/3 system.
    Can anyone tell me what I am doing wrong.
    Is it a caching problem or am I doing something wrong.
    Kind regards

    hi Geert,
    take a look at my weblog:
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    it may answer some of your questions:)
    Regards,
    michal

  • Changing datatype, afterwards Message-Mapping cannot produce target element

    Hi,
    we use PI/700.
    I changed a working system by changing a datatype of an existing message (adding a new element). My interface mapping contains two mappings: an XSL-Mapping and afterwards a Message-Mapping.
    My interface mapping looks like this:
    Message-Type A ->
          XSL-Mapping ->
    Message-Type B ->
          Message-Mapping ->
    Message-Type B
    When I test each mapping alone everything works fine (with the new element I added).
    But if I test my interface mapping in IBD with both mappings together, I'll get an error:
    "Cannot produce target element /MT_EDM_OUTBOUND_LASTGANG_TO_SAP/LASTGANG/MASSEINHEIT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd".
    Is it possible that XI has problems in refreshing the XSDs?
    I tried this:
    (1) I changed my Message-Mapping and now all elements are mapped 1:1 -> no success!
    (2) Later I changed my Message-Mapping and build in "exists" with "if" to check whether the element "MASSEINHEIT" is generated by the XSL-Mapping -> It doesn't exists (??? - WHY? - when I test it, everything works fine)
    (2) Afterwards I changed my interface mapping and take only the XSL-Mapping (without the following Message-Mapping) -> the element "MASSEINHEIT" exists now!
    I'm totally confused!
    Any ideas?
    Regards
    Wolfgang Hummel

    Hi,
    If you have made structural changes to the data type..such as number of fields have decreased/increased..or some new fld altogether, then you have to activate the datatype..goto message mapping and then re-do the mapping...but if you have made "typo" changes like names have been changed, etc..then i think it should be alrite..i have sometimes made changes to my datatype, but after activating it, i had to redo the mapping..that was it!...the rest would fall into place:) No changes had to be made in the interface mapping..
    Regards,
    Sushumna

  • [RFC to File]Problem about Changing file name in message mapping.

    Hi,
    my problem:
        Type:RFC to File
        I change the file name in message mapping.
    when I call the RFC to send the data twice at the same time, both of the output file names are changed while I only want to change the second output file name.
        thanks
    Sam

    In my MM, the input values to these variables (var1, var2 and var3) are (<ZZCOMBI>array,G499999,END_FIFC0029) ,
    var1 is an array of input <ZZCOMBI> item list;
    var2 is get from a property file by call another UDF;
    var3 is constant value.
    the test input data :
    I send the data for the first time:
    - <rfc:Z_IFCFR821_ZIFCTT82100010 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    - <T_ZIFCTS82100010>
    - <item>
    <ZZCOMBI>G000002G000002</ZZCOMBI>
    <ZZKYKBN>*</ZZKYKBN>
    <ENAME_VE />
    <ENAME_Z5 />
    </item>
    </T_ZIFCTS82100010>
    </rfc:Z_IFCFR821_ZIFCTT82100010>
    so the input values to these variables (var1, var2 and var3) are (G000002G000002,G499999,END_FIFC0029)
    the output file name(File1) :END_FIFC002920090413-171534-053.dat
    output record: G000002G000002
    because the data what I send is the last record, the system send the dummy data for the second time by program.
    - <rfc:Z_IFCFR821_ZIFCTT82100010 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    - <T_ZIFCTS82100010>
    - <item>
    <ZZCOMBI>G499999</ZZCOMBI>
    <ZZKYKBN />
    <ENAME_VE />
    <ENAME_Z5 />
    </item>
    </T_ZIFCTS82100010>
    </rfc:Z_IFCFR821_ZIFCTT82100010>
    so the input values to these variables (var1, var2 and var3) are (G499999,G499999,END_FIFC0029)
    the output file name(File2) :END_FIFC002920090413-171533-928.dat
    output record: G499999
    I find that File2(20090413-171533-928) was ouput before File1(20090413-171534-053 ) from the time stamp.
    I am not sure about that "XI will create a message ID for each message and the messages are independent." as you mentioned above.
    Best regards
    Sam
    Edited by: YONGHE ZHOU on Apr 15, 2009 3:59 AM

  • No effect after changing the message mapping

    Hi everybody,
    i'm using PI 7.1. After changing the attributes in my message mapping i can no see any effect in my result.
    Should it be a cache problem? Where can i delete the caches?
    regards,
    Sid

    Hi,
    I guess there can be two things.
    before going to the tcode sxi_cache...
    Please go to the IR, Click Environment, Cache Notification and then select author as your id.
    Now see if any are in red status. if so click on the change and click Repeat Cache Notification.
    Now press refresh.
    I guess this will resolve your problem

  • Advanced mapping from IDOC to SOAP with reversed 3 level context change

    Hi everyone.
    I am having a though time mapping the HRMD_A01 IDOC into a SOAP message. The reason is that the reciever expects an xml structure where the root node is cost center instead of employee which is the case in the IDOC.
    Mapping from:
    IDOC (1..1)
       E1PLOGI (1..unb)
         SEGMENT (String)
         OBJID (String)
         E1PITYP (1..unb)
           E1P0001 (1..unb)
             SEGMENT (String)
             KOSTL (String)
    To this structure:
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above  
    I expect several occurances of E1PLOGI which states multiple employees sent in the IDOC. I also expect several occurences of E1P0001 containing cost centers.
    My conclusion is that I need an advanced mapping and I have created one which collects all KOSTL for the IDOC context, deletes duplicates, and creates the CostCenters segment. This is now working. But my problem is that I can't create the employees segment in the right place. They are only created once under the first CostCenters node.
    Here's the java-code for mapping between KOSTL and CostCenters/KOSTL:
    public void costCenters(String[] var1, ResultList result, Container container) throws StreamTransformationException{
      Set set = new HashSet(Arrays.asList(var1));
      String[] array2 = (String[])(set.toArray(new String[set.size()]));
      Arrays.sort(array2);
      for (int i = 0; i < array2.length; i++) {
        result.addValue(array2<i>);
    Any ideas on how to proceed?
    Best Regards

    Hi,
      Do the mapping like below.
      UDF should be select as context.
    List (1..1)
      CostCenters (1..unb)
        KOSTL (String)   ----> Mapped against KOSTL above
        Employees (1..unb)
          OBJID (String)   ----> Mapped against OBJID above
    Mapping:
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--Removecontext--CostCenters
    KOSTL(RightSelectChange the context to E1PITYP)--UDF--SplitbyValue(Each Value)--KOSTL
    constant---Employees
    OBJID----------------------------------------------Use One As Many---SplitByValue (EachValue)----------OBJID
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    KOSTL(RightSelectChange the context to E1PITYP)--UDF---
    Regards,
    Prakasu.M
    Edited by: prakasu on May 20, 2009 3:28 PM

  • Changes done in message mapping is not reflecting in output

    Hi all,
    i have created one scenario XML to XML and i before i had done 1 to 1 mapping, i got the output also.
    but when i changed few calculation in the message mapping
    there is one node "name" and "Description" in source and target in both places.
    i am having name in SOURCE XML as "something" but i want to change this name to "Xsomething" and in description i have something in source but i want to pass constant value "ZSUBHODIP".i did mapping in message mapping, and when i did the testing in message mapping then in target in message mapping
    i got "XCOPC_C03" and "ZSUBHODIP" but when it takes the XML file which is in my system then in output XML name value "XCOPC_C03" and description "ZSUBHODIP" is not coming.
    i activated it too.
    even i tried with the same FILE to FILE scenario also but in this scenario also problem is same like one one mapping only then when i changed it in message mapping then previous output is coming.
    is there server problem, if yes then how to fix it??
    please tell me what to do
    thanks

    Hi,
    can you test it like this:
    /people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • Getting 401 error on adding a network in CCP

    Hi, On adding a network request in CCP, the Cloud Portal Service Request handler succeeds, but the Export IP Address Range Handler fails with the below error - The remote server returned an error: (401) Unauthorized. <nsapi-error-response>User does n

  • Ipad 3 micro sim trouble

    I have my Ipad 3 with AT&T, and I moved to Ecuador for vacation. I tried to insert a brand new micro sim from a local cellular provider, on the upper left corner it appears the anthena full connected and the 3G logo, also the brand of the local cellu

  • Migrating Oracle 10gR2 32bit to Oracle 11g 64bit options

    I have an Oracle 10gR2 32 bit that needs to be upgraded to Oracle 11g 64bit: What are some of the options for upgrading Oracle database 10gr2 32bit to Oracle 11g 64bit? Can I export 10gR2 32bit and import it to 64bit Oracle 11g? THanks

  • Moving Composition from one project to another?

    Hi Is there any way to move a Composition from Project A into Project B with all it's layers,Keyframes etc...? I'm using AE CS3 ... never had to do it before ... but never say never hey? Thanks for the help Lee

  • Macros in System 7

    I wanted to setup an AppleScript, or a macro, but when I record, it doesn't record the actions within the Chooser where I am trying to setup an automated activity. MacroMaker (Comes with System 6) AutoMac III I know these two options will work, but I