Element/ Node supression in message mapping

Hi,
Source Structure
ID (Mandatory)
FName (optional)
Target Structure
EmpID (mandatory)
EmpName (optional)
In my mapping, i mapped FName to EmpName. Since FName is optional,when i have an XML file that does not contain Name element my message mapping fails. So i used "if-then-else" and "exists" to make the mapping work.
Name --> <b>"exists"</b> --><b>"if-then-else",</b>
     FName--> EmpName (then)
     Constant-->EmpName(else)
But now i want that my o/p element (EmpName) should not get generated, if Name element does not exist. I mean the element Empname should be supressed in message mapping.
I know that if a target field is mapped, it is bound to come in the target structure. But i want this target element to be supressed.
Hope somebody can help me out...
Cheers,
Siva Maranani

Hi Siva,
If i understand u correctly you want to supress the target field if the mapped source field does not exist:
Try using IF WITHOUT ELSE
When the source field exists then you will have the value mapped to the target field and when the source field does not exist, the target field will not be created.
Regards,
Sridhar

Similar Messages

  • Accessing Element's name in Message mapping

    Hi,
       I need to Access the Element's name in Message mapping (Using graphical tool or in user defined function).
    For Example:
    Element: <Company_Name>XYZ Co </Company_Name>
    I need to access the Element's name(i.e.)<b>"Company_Name"</b>. So that I can map it as
    <Element>Company_Name</Element>
    <Element_Value>XYZ Co </Element_Value>
    in the target message.
    Kindly provide your inputs.

    Hi Santhosh,
    I am not sure if this can be done using your Graphical Mapping, but this is possible using JAVA mapping. Your SAX and DOM parsers for JAVA mapping provides methods like getChildNodes, getElementName using which you can get the name of the element.
    Check this link for the methods available for Java Mapping,
    http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html
    I think the same can also be done using XSL mapping. Though, I am not sure what method should be used for the same.
    Hope this helps,
    Regards,
    Bhavesh

  • How to use node functions in Message mapping !!

    Hi  Gurus,
    I have got one issue in message mapping, please can any one put some ideas on this !!
    Source Structure
    <Group_ZA>  0..unbound
         <D02_ZA>           0.. unbound
             ZA_01             0..1   - QA
             ZA_02             0..1      20
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1     QD
             ZA_02             0..1     40
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
          iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
         <D02_ZA>          
             ZA_01             0..1     QA
             ZA_02             0..1      20
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1     QD
             ZA_02             0..1     40
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
    iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
    <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
    iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
    <D02_ZA>          
             ZA_01             0..1     QA
             ZA_02             0..1      20
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1     QD
             ZA_02             0..1     40
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QN
             ZA_02             0..1     12
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
         <D02_ZA>          
             ZA_01             0..1    QP
             ZA_02             0..1    60
             ZA_03             0..1
             ZA_04             0..1
         </D02_ZA>
    </Group_ZA>
    Target Structure
    ProductActivityNotification                                                       0..unbound
                          ProductActivity                                                             1..1
                                        Item                                                                 1..unbound
                                              Inventory                                                   0..1
                                                     UnrestrictedUseQuantity                    0..1
    The Group_ZA comes 'n' number of times and D02_ZA comes sometimes 5 times and sometimes 6 times etc.,
    ZA_01 field can come with 5 to 6 different values like 'QA','QD','QN' etc., sometimes ZA_01 comes only 3 times QA,QD,QN.
    if ZA_01 = 'QA' then only  we need to pass   ZA_02 value on to ''UnrestictedUseQuantity'' (target side),
    I mapped the fields, the vlaue ZA_02  passing properly on to 'UnrestictedUseQuantity' when D02_ZA comes 5 or 6 times, all the times 'QA'  value comes into ZA_01 field. In case if QA value missed or doesn't come from source, the Target side ' 'UnrestictedUseQuantity' field last value comes into last but one.
    Ex: QA value is in 3 times, but I have 4 source message on top. values comes into target side like
    20
    20
    20
    suppose to come like
    20
    20
    -- (Space)
    20
    Please required your valuable inputs in bit urget !!
    how to map field level please?
    Many Thanks in Advance
    Kind Regards
    San

    Petre:
    If you want to use standard functions then you try this:
    If-->currentdate -OR- Constant(01.02)
    currentdate -OR- Constant(02.02)   --> OR -->
    currentdate -OR- Constant(03.02)
    Then give some output
    Else give some output
    So give the output for the first two conditions to another OR and the result of the third to the same OR. So whenever the condition is true in any of the condition you will get the THEN value else you will get the ELSE value.
    ---Satish

  • Creating new nodes dynamically in message mapping

    Gurus,
    Source Structure is
    <Phone></Phone>
    <Phone></Phone>
    And I want to create target structure as for this Node1
    <Phones>
    <Phone1>Has value from first Phone Node in source</Phone1>
    <Phone2>Has value from second Phone Node in source</Phone2>
    </Phones>
    The requirement is that I want to create <Phone1><Phone2> .........<PhoneN> nodes dynamically based on the number of <Phone> nodes in Source Structure. The cardinality of  <Phone> node in Source is 0 to Unbound.
    Any suggestion ...?
    Thanking you all in advance.

    Hi Ivan,
    Since you have enter the xslt mapping in Message Interface mapping and both Message Interfaces (target and source) are tied with the message type. And in message type you have fixed schema, do you think it still possible to use xslt mapping to generate some of the target nodes dynamically (the nodes which are not part of MessageType/DataType)....thx?

  • Generating target nodes dynamically in message mapping

    Hi XI GURUS
    I am trying to generate target node using using more then source node. Is it possible to do this.
    I need this as in source I have 2 different nodes (0 to unbounded) and in target I want to create corresponding number of target nodes. For e.g if I have 2 + 1 nodes in source then I want to create 3 nodes in target
    Source as below
    <FIRSTNAME>
         <Raj>
         <Kum>
    </FIRSTNAME>
    <FIRSTNAME>
         <Naveen>
         <Kumar>
    </FIRSTNAME>
    <CITY>
    <bANGALORE>
    </CITY>
    Desired output in target as below
    <ADDRESS>
    <qwerty1>
    <ADDRESS>
    <ADDRESS>
    <qwerty2>
    <ADDRESS>
    <ADDRESS>
    <qwerty2>
    <ADDRESS>
    Can i follow an alternative approach (using java function) of counting the total number of occurences of  source nodes and generating as many number of the target node
    Thanx

    If you have a condition check for each of the source node to be mapped to the target node,
    use "create if" standard function and pass the boolean result of your Condition check as an input to this standard function. For each "true" a value would be added to the output queue. If you have a simple condition check on some source field value for each correspoding node, use "if without else" or depending on the complexity of the condition you may use a udf to get the boolean outcome.
    And for mapping from more than on type of source node, you may duplicate subtree for target node.
    Regards,
    Suddha

  • Reg SUPRESS in message mapping

    Hi Guys,
    i have a requirement to map the items from source based on a condition(if flag = X).if the condition is true then need to create item segment in target else donot create segment.
    here iam facing a problem with SUPRESS.
    if the first item is false and the second item is true and third is false and fourth is true....then, iam getting the SUPRESS for false values and not able to create the segment even for true values.
    how to remove the supress... suggest me.....this is an tough requirement for me.
    Thanks,
    M.S

    Assume if Queue have
    123
    234
    SUPPRESS
    233
    SUPPRESS
    100
    345
    SUPPRESS
    Your target should have
    123
    234
    233
    100
    345
    If so
    Please follow
    Function myudf(String a[], ResultList result, Container container)
    for(int k =0 ; k< a.length; k++)
    if (!a[k].equalsIgnoreCase(ResultList.SUPPRESS))
    result.addValues(a[k]);

  • Node functions in Message Mapping

    Hi,
    Could someone help me with some good exercises for node functions such as splitbyvalue, collapsecontents, removecontexts.
    I am a newbie to these functions and have absolutely no idea on how to use them. Would appreciate if someone could give very detailed examples to these functions in a step by step manner, so that I can create them just by following your instructions.
    Any links to video presentations are welcome too.
    Cheers,
    S

    Hi ,
    For a fresher, the informationa and examples given in the help.com would be more helpful and it will help you in building string fundamentals. Once your basics and funcdamentals concepts becomes strong then you can go for more complex exmples. Here is help.sap link where you can leran Node functions of MM of PI.
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    Thanks,
    RK

  • Accessing container variables from ccBPM in Message Mapping?

    Hello Friends,
    I have created a ccBPM and require to send response messages to the sending system at different points as the message proceeds from one state to another. I do not want to create multiple message mapping stating different status in every message mapping. The message mapping remains the same only the status is changing. So I am thinking if I can access container elements in ccBPM at message mapping then I should be able to use only one message mapping.  Is it possible at all?
    Let me know if you have other solutions. Let me know if I am not clear?
    Thanks & Regards,
    Anand Patil

    Hi Abhishek,
    Your suggestion to use Parameterized Mapping did solve my issue. I was looking something like this. Thanks.
    Now I have only one Message Mapping and it is used in multiple places. Thanks a lot
    Best regards,
    Anand Patil

  • Error in message mapping - Cannot produce target element

    As one step in my integration process, I am builing a very simple file to BPM integration (inbound MI async, outbound MI abstract).
    The source type and the target type are completely equal - I am only doing some modifications to some of the content.
    The type for both messages - source & target message - is an imported external definition (DTD), and hence no DT or MT are created.
    As a first step I am trying to fill the target message with the content from the source message (without any modifications to the content). However, when testing this in the message mapping area, I get an error message already when filling the first element, the 'root node'.
    The error message is as follows:
    Start of test
    Compilation of <MM name> successful
    Cannot produce target element <elementname>. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element <elementname>. . Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
    End of test
    Any suggestions?
    Thanks,
    C

    Thanks,
    when creating the source message manually in the MM it worked - so nothing wrong with the mapping.
    I saved this file and compared with the "original file" - containing the content which I wanted to upload, and on which the xsd (external definition) was based - and there where some inconsistancies.
    I changed some values in the source XML which made it work, also when uploading the file from a drive.
    So, I will go back to the source system and try to get a better XML.
    Thanks for now!

  • Message mapping: Passing data at the node level

    Hi,
    I have a question/requirement, XI Message Mapping program need to read the incoming xml and map to a diffrerent target structure. Incoming xml has a parent node called Description and it has a value "Frauen Hemd Shoes", we need to map this value to target LongText Field but message mapping is ignoring this data while mapping.
    A parent node can't hold the value/data while a child node is present. So is there any workaround to read this data to target str?
    <Description>
    <ShortName>Shoes</ShortName>
    Frauen Hemd Shoes
    </Description>
    Expected result:
    <Comments>
    <ShortText>Shoes</ShortText>
    <LongText>Frauen Hemd Shoes</LongText>
    </Comments>
    Please let me any clues to resolve the issue.
    thanks,
    Laxman

    I agree , the soruce structure is not a valid one..
    The source structure should look like the below:
    <Description ShortName='Shoes'>
    Frauen Hemd Shoes
    </Description>
    where ShortName is attribute for the Element "Description".
    You add attribute to the element the same way you add subElement, Just choose attribute instead of subelement.
    In this case the Mapping would be
    Descriprion -
    > LongText (target)
    ShortName -
    > ShortText (target)
    This Should work.
    Regards.
    Jeet.

  • Use Message Mapping to repeat top node and split Message

    I am currently using XSLT Messaging to do majority of the mapping. I have two issues that remain, I need to repeat the top node for each or its child elements and split the message.
    <Sensor xmlns="namespace">
      <Observation>
        <XML>Some Data</XML>
    </Observation
    </Sensor>
    1. Can it be done in XSLT? I posted a thread asking for help on this. Where I would need to repeat the Sensor tag for each observation. If this is possible then I will able to split the messages at the HTTP adapter used for the target system.
    2. Can Message Mapping be used. Using the same xsd on both source and target systems, Will sensor repeat if set to 1:n and observation set to 1:1. In source it is Sensor 1:1, Observation 1:n.  If this works then I can use a BPM to shoot out individual messages using a for each.
    Any help is greatly appreciated. I am fairly new to XI as this is my first major project. Thanks

    Source File                                             Target File
    > XI (XSLT) -
    > Each observation as one file  ---> Out via HTTP
    Batch of all orders    
    Source File
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <receipt>
      <manufacturer>Manufacture Name</manufacturer>
      <manufacturer_gln>999999</manufacturer_gln>
      <transfer_recipt>0123456</transfer_recipt>
      <prod>
        <product_GTIN>99999999999999</product_GTIN >
        <product_LOT>123456A</product_LOT >
        <production_date>20090131</production_date>
        <expire_date>20120131</expire_date>
        <carrier>
          <carrier_type>P</carrier_type>
          <carrier_barcode>001</carrier_barcode>
          <carrier_detail>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>01</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089211</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089212</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089213</carrier_barcode></carrier>
                </carrier_detail>
            </carrier>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>02</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089214</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089215</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089216</carrier_barcode></carrier>
                </carrier_detail>
            </carrier>
          </carrier_detail>
        </carrier>
        <carrier>
          <carrier_type>P</carrier_type>
          <carrier_barcode>002</carrier_barcode>
          <carrier_detail>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>03</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089217</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089218</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089219</carrier_barcode></carrier>
              </carrier_detail>
            </carrier>
            <carrier>
              <carrier_type>C</carrier_type>
              <carrier_barcode>04</carrier_barcode>
              <carrier_detail>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089220</carrier_barcode></carrier>
                <carrier><carrier_type>ITEM</carrier_type><carrier_barcode>0108699547010089221</carrier_barcode></carrier>
               </carrier_detail>
            </carrier>
          </carrier_detail>
        </carrier>
      </prod>
    </receipt>
    Target File
    <?xml version="1.0" encoding="UTF-8"?>
    <pmlcore:Sensor xmlns:pmlcore="urn:autoid:specification:interchange:PMLCore:xml:schema:1" xmlns:pmluid="urn:autoid:specification:universal:Identifier:xml:schema:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:autoid:specification:interchange:PMLCore:xml:schema:1 cases.xsd">
      <pmluid:ID>GPO_AI_LU_DC</pmluid:ID>
      <pmlcore:Observation>
        <pmlcore:DateTime>2008-10-13T17:53:00.265+02:00</pmlcore:DateTime>
        <pmlcore:Command>PACK</pmlcore:Command>
        <pmlcore:Tag>
          <pmluid:ID>01</pmluid:ID>
          <pmlcore:Data>
            <pmlcore:XML>
              <Memory>
                <DataField fieldName="EXPIRATION_DATE">20120131</DataField>
                <DataField fieldName="BATCH_ID">123456A</DataField>
                <DataField fieldName="ZMFG_DATE">20090131</DataField>
                <DataField fieldName="ZMFG_GLN">999999</DataField>
                <DataField fieldName="ZMANUFACTURER">Manufacture Name</DataField>
                <DataField fieldName="ZITEM_COUNT">16</DataField>
                <DataField fieldName="ZWORK_ORDER_NUMBER">0123456</DataField>
              </Memory>
            </pmlcore:XML>
          </pmlcore:Data>
        </pmlcore:Tag>
        <pmlcore:Tag>
          <pmluid:ID>0108699547010089211</pmluid:ID>
          <pmlcore:Data>
            <pmlcore:XML>
              <Memory>
                <DataField fieldName="EXPIRATION_DATE">20120131</DataField>
                <DataField fieldName="BATCH_ID">123456A</DataField>
                <DataField fieldName="ZMFG_DATE">20090131</DataField>
                <DataField fieldName="ZMFG_GLN">999999</DataField>
                <DataField fieldName="ZMANUFACTURER">Manufacture Name</DataField>
                <DataField fieldName="ZWORK_ORDER_NUMBER">0123456</DataField>
              </Memory>
            </pmlcore:XML>
          </pmlcore:Data>
        </pmlcore:Tag>
         </pmlcore:Observation>
         </pmlcore:Sensor>
    I have the XSLT Mapping working to transform data from Source file to target File. But my target file has multiple Observations that need to be split into the Sensor, Observation structure.

  • Message Mapping: Douplicate Nodes of source XML

    Hi,
    I do some message mapping in the design. I've loaded a test XML into the test tab to actually see what's going on in my mapping. A piece of it looks like the following snippet (the REFERENCE element is also embedded in a whole bunch of other elements and yes, its correct, that AUTHOR and YEAR elements appear nested in themselves):
    <REFERENCE>
      <set>
        <AUTHOR>
          <AUTHOR>Test Author 1</AUTHOR>
        </AUTHOR>
        <YEAR>
          <YEAR>2000</YEAR>
        </YEAR>
      </set>
      <set>
        <AUTHOR>
          <AUTHOR>Test Author 2</AUTHOR>
        </AUTHOR>
        <YEAR>
          <YEAR>2001</YEAR>
        </YEAR>
      </set>
    </REFERENCE>
    I've placed the lowest AUTHOR element in the design pane, I right click it, set the context to "AUTHOR" (the surrounding AUTHOR element obviously), an then click on "Show queue" I get all AUTHOR elements double. I.e. I get "Test Author 1" twice and "Test Author 2" twice.
    Ok, I thought probably something I don't understand concerning contexts, so I added "removeContexts" after the AUTHOR node. Surprise: I get "Test Author 1" once and "Test Author 2" twice when I click on "Show queue" on "removeContexts".
    As this behaviour is getting worse, the more mapping steps I arrange in a chain, the mapping becomes quite useless, until I can resolve this issue...
    Anybody an idea, why my "Test Authors" get listed twice and why "removeContexts" doesn't work as expected?
    Tnx,
    Martin.

    You will see the value in queue twice for AUTHOR because the first one in white is the actual value and the second one in gray is the context change. Similarly when you do remove context and see the queue, you will see TestAuthor1 Test Author2 and again TestAuthor2 which is the context.
    Regards,
    Ravi

  • Problem with Message-Mapping: Loop over Elements possible?

    Hi all,
    I want do create a Message-Mapping for an IDoc-to-File Scenario. In the Source Structure there are some Elements which can appear more than once (1..unbounded). I need a mechanism which loops over these elements and search for specified values. From the Element which contains an element with this specified value the mapping should write a value in the target structure.
    Here a simple example (source structure) for better understanding:
    <root>
       <invoice>
          <number> 10 </number>
          <sum> 200.00 </sum>
       </invoice>
       <invoice>
          <number> 20 </number>
          <sum> 150.00 </sum>
       </invoice>
       <invoice>
          <number> 30 </number>
          <sum> 120.00 </sum>
       </invoice>
    </root>
    Now the duty of the Mapping should be to search in the elements <invoice> for the number 30. And then the sum of the invoice with the number 30 should be written in a field of the target structure.
    I tried it out with a constant togehter with an equalsS-function and an ifWithoutElse-function, but it is working only then, if the invoice with the number 30 has the first position in the root context.
    Can anybody help me? Thanks
    With kind regards
    Christopher

    Hi,
    Write a UDF to sum the required values and map to target node.
    See while writing the UDF select the type as queue.
    number -- removecontext-UDF targetnode
    sum----removecontext--/
    number abd sum or the two inputs
    in UDF
    int nsum = 0;
    for(int i;i < number.length;i++){
      if number(i).equals("30") then
         nsum = nsum + valueOf(sum(i));
    result.addValue(nsum); // convert the nsum into string
    Regsrds
    Chilla

  • BPM Message Mapping: "Cannot produce target element /ns1:BAPI...."

    Hi,
    A scenario File - BPM - BAPI call was developed, as described in blog 'RFC scenario using BPM' cfr. link
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    The Mapping is as follows:
    MT_EDB_MATERIAL_REQ (1:1) --> BAPI_MATERIAL_EXISTENCE_CHECK (1:1)
    MATNR (1:1) -
    > MATERIAL (1:1)
    When executing the scenario, an error appears in the trace of SXMB_MONI, step 'Request Message Mapping'
    Cannot produce target element /ns1:BAPI_MATERIAL_EXISTENCECHECK. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd....
    I tried the following:
    1) import the XML-file into the testmapping: executed successfully
    File:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_EDB_MATERIAL_REQ xmlns:ns0="http://agfa.com/SD_EDB">
    <MATNR>15P6X</MATNR>
    </ns0:MT_EDB_MATERIAL_REQ>
    2) Removed the mapping on node level and left mapping only on element level (material): same error
    3) Activated the message mapping, interface mapping, determinations, etc again...:same error
    4) Removed the Interface Mapping and created it again: same error
    5) Compared the version ID of the Interface Mapping/message mapping in the Monitor trace with the version ID of the IR and saw that there was a difference.
    After the CPA full cache, SXI_CACHE full refresh and object refresh in the IB Administration, the differences remain, and also the error....
    Anybody an idea ?

    Hi
    >>>Cannot produce target element /ns1:BAPI_MATERIAL_EXISTENCECHECK. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd....
    The error clearly says that one of the occurrence value  for the target node mentioned is not coming from the source during mapping. The easiest way to solve the problem is as follows
    <b>
    First Execute the mapping as pointed out by "Raj" and the following steps.
    </b>
    1. Goto the Mapping Editor
    2. Double click on the target node that is causing the problem here BAPI_MATERIAL_EXISTENCECHECK.
    3.  Right click on the same node and select "DisplayQueue".
    4. View the Queue.
    5. YOu will find "Suppress" entries, which means a value is expected but no value is coming in.
    6.Go from right to left and check each node in the mapping and you will be able to trace where the suppress node comes from and take appropriate action
    regards
    krishna

  • How to find length of integer elements using message mapping

    Hi all,
             How can I find the number of digits in an element using message mapping
    XIer

    Satish,
               Cause I have to write the code for 100 elements, I have decided to have a AUDF with two inputs;
    1) for the element
    2) for the length of the data type (I am passing length using Constant message mapping func).
    Now when I change my UDF and try running it I get the following error:
    <b><i>Start of test
    Source code has syntax error:  /usr/sap/B06/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map0999e66045cf11dcc83b4ebcfc11da82/source/com/sap/xi/tf/_MM_Recordcount1_.java:160: operator >= cannot be applied to int,java.lang.String if(Element_Name.length()>=Element_Length) ^ /usr/sap/B06/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map0999e66045cf11dcc83b4ebcfc11da82/source/com/sap/xi/tf/_MM_Recordcount1_.java:166: operator <= cannot be applied to int,java.lang.String for(int i=Element_Name.length();i<=Element_Length;i++) ^ 2 errors</i></b>
    The code I have used is:
    public String Include_Space(String Element_Name,String Element_Length,Container container)
    {StringBuffer sb= new StringBuffer();
    if(Element_Name.length()>=Element_Length)
    return""Element_Name"";
    else
    for(int i=Element_Name.length();i<=Element_Length;i++)
    if(i==Element_Name.length())
    sb.append(Element_Name);
    else
    sb.append(" ");
    return ""sb.toString()"";
    Pls advice, where I am going wrong...
    XIer
    Message was edited by:
            XIer

Maybe you are looking for