Regarding Target Node creation in Target message

Hi,
I am trying to dynamically control the appearence of a node(occurence 0..1) in the target structure using the graphical mapping.
Source structure looks like.
Source(occurence 1..1)
    Node1(occurence 0..1)
      Rec1(occurence 0..1)
      Rec2(occurence 0..1)
here source is the root node under which Node1 is a sub node and Rec1 and Rec2 are two elements of type string under Node1.
The target structure is also same as that of source. My requirement is to create Rec1 in the target side if Rec1 has value(A), else Rec1 will not be created at the target side, but Rec2 will be created.
I have used the Createif function to achieve this but it won't worked.
Createif is working fine, if the assigned condition to it is true else it throws a mapping exception.
Please suggest me how to achieve this.

Hi Nitin,
Give Rec1 and Constant(with value A) as input to function equalsS.Give output from equalsS and Rec 1 to if and then inputs of ifWithoutElse function and give to Rec1 in the target.
Rec1->equalsS(ConstantA)->ifWithoutElse->Rec1.
Give Rec1 as input to then and output of equalsS(Constant A) as input to if of ifWithoutElse function.
For Rec2 give a not function after equalsS function in the above mapping for Rec1 and give Rec2 as input to then of ifWithoutElse function.
Rec1->equalsS(ConstantA)->not->ifWithoutElse->Rec2
Give Rec2 as input to then and output of not function as input to if of ifWithoutElse function
This should solve your issue.
Rgds,
Lekshmi.

Similar Messages

  • Problem in creation of target with the generated target message

    Hi,
    I’m doing File-to-File content conversion scenario.
    I’m able to see successful message in SXMB_MONI. Target message also created (Request Message Mapping) according the requirement.
    I’m using lastfieldOptional option in source content conversion.
    Adapters are running fine without content conversion failure..
    But the target file is not created.
    Could you pls anyone gives the reason or suggest any other things I need to verify.
    Thanks,
    Venu.

    Hi,
    do you see any errors in adapter <b>message</b> monitor:
    http://hostname:portnumber/MessagingSystem/monitor/monitor.jsp
    Regards,
    michal

  • No namespace tag in target message (Test Interface mapping)

    Hi,
    I'm doing a <b>IDoc to file</b> scenario, and I'm using <b>external definitions</b> and a XSLT mapping. When I try to test the mapping in Interface Mapping he maps it but I <b>can't see the tree view</b>, I only get the source code...
    <?xml version="1.0" encoding="utf-8"?>
    <SenderID/><ReceiverID/><DocumentDate>20051028090653</DocumentDate>
    <DocumentNumber>456184</DocumentNumber><TestIndicator>     P</TestIndicator>
    <Version>1.0/SSCC</Version>
    <Desadv><MessageReferenceNumber>81749973</MessageReferenceNumber></Desadv>
    I presume that there is a <b>namespace</b> tag <b>needed</b> like
    <ns:Desadv xmlns:ns="http://www.certione.com/RFDesadv/Schema">
    but I don't know what to do to have it added to the target message which is external definition Desadv with namespace http://www.certione.com/RFDesadv/Schema in the XSD...
    Any help would be appreciated!
    Kind regards..
    Message was edited by: Bart De Saedeleer

    Hello,
    Could you put your XSD definition ?
    And check your mapping because it seems that you don't have a root node in output.
    <?xml version="1.0" encoding="utf-8"?>
    <b><MYROOTNODE></b>
    <SenderID/><ReceiverID/><DocumentDate>20051028090653</DocumentDate>
    <DocumentNumber>456184</DocumentNumber><TestIndicator>     P</TestIndicator>
    <Version>1.0/SSCC</Version>
    <Desadv><MessageReferenceNumber>81749973</MessageReferenceNumber></Desadv>
    <b></MYROOTNODE></b>
    Regards,
    Chris
    Message was edited by: Christophe DUMONT

  • Getting the Source File name Info into Target Message

    Hi all,
    I want to get the Source file name Info into Target message of one of the fields.
    i followed Michal BLOG /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Requirement :
    1) I am able to get the Target file name as same as the source file name when i check the ASMA in Sender & Receiver Adapter , with out any UDF...............this thing is OK
    2) I took One field extra in the target structure Like "FileName" & I mapped it Like
                              Constant(" " )--UDF-----FileName
    I Checked the Option ASMA in Both Sender & Receiver Adapters
    Here iam getting the Target File name as same as Source file name + Source File name Info in the Target Field " FileName".
    I Dont want to get the Target File name as same as Source file name. I want like Out.xml as Target file name.
    If i de-select the Option ASMA in Adapters means it is showing " null" value in the target field "FileName".
    Please Provide the Solution for this
    Regards
    Bopanna

    Hi All,
    Iam able to do this by checking the Option ASMA in only sender adapter itself
    Regards
    Bopanna

  • Error in Message Mapping "Target message IDOC: ORDRSP.ORDERS02 does not exi

    Hi,
    I have joined newly to the team.
    When I tried to open one message mapping it throwinf follwing error...
    "Target message IDOC: ORDRSP.ORDERS02 does not exist in software component version ID: 44423362454456485465..
    Check whether the software component version ID: 44423362454456485465 is in Enterprise Service Repository. Import this version if necessary"
    Is there any impact because of which in the message flow?
    In my case some of the messages are failing with mapping error "runtime exception occured during application mapping com/sap/xi/tf/_SUS2MMOrderResponse_; java.lang.NullPointerException: while trying to invoke the method java.util.Map.get(java.lang.Object) of an object loaded from field com.sap.aii.map`"
    And some of the messages are processed sucessfully and they also using the same mapping program 'SUS2MMOrderResponse'.
    Could someone tell me is there any relation for the above error in XML messages and to the message mapping?
    Regards
    Baskaran K

    Could someone tell me is there any relation for the above error in XML messages and to the message mapping?
    The error mentions that you have used an IDOC in your mapping program which is not found in the ESR....you need to check if the IDOC is present in the ESR and is present under the correct SWCV.
    Once you have done the check do some dummy change to the mapping and activate it (if in DEV) and then check the CACHE.

  • Searching a Field In Source or Target Message in Message Mapping

    Hey Guys,
                      I  came accross this peculiar behaviour and it keeps bugging me , I could search any field in source or target message in message mapping in PI 7.0 by copying the path( /ns1:MaestroAcreedores/Acreedores/ClaveDeGrupo or any idoc field /FIDCCP02/IDOC/E1FIKPF/BUDAT  ) but in PI 7.1 i cant , its giving me an error String /ns1:MaestroAcreedores/Acreedores/ClaveDeGrupo not found  , i can only search the field independently.Can anyone please help me out in this.

    Hi
    I am not sure whether it worked in 7.0 or not, but having checked myself i can confirm that it is not working in 7.1 in my system also.
    For alternative, you can check by changing into source text view where it will display as xml.  Here when you search the keyword, it would display you the hierarchy better than normal view.
    I dont think there is any other alternative. although I would say in the worst case scenario you would not have more than 10-15 occurrences of same element in an idoc.
    Regards
    Krish

  • Target Message for generation HTML email?? : Michal's Blog (2718)

    hey folks,
    I'm trying out the scenario described in Michal's blog <a href="/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter">XI: HTML e-mails from the receiver mail adapter ?</a>
    What should be the target message type/interface which is generated by XSLT mapping? If it is an message type containing relevant HTML tags (HTML, BODY, P, OL etc), is there any standard XSD/DTD for HTML tags..something similar to XSD for mail package?
    The XSLT mapping seems to generate a HTML code w/o any XML header (<?xml version="1.0" encoding="UTF-8"?>). Is an XML message w/o this header valid?
    I appreciate your help/inputs
    thx in adv
    praveen

    Praveen,
    it can be anything
    Reason is that the output of your XSL mapping will not be validated against the target XSD and so you can create a dummy messagetype or use the source itself as the target message type etc.
    Regards
    Bhavesh

  • Multi-Mapping, only want to create target messages sometimes.

    Hi,
    I have a Multi-Mapping interface which maps a single incoming message to 3 target messages.
    Based on the contents of the incoming message I only want to create a single instance of the outgoing messages.
    The incoming message can have a repeating node of 3 types A, B or C. If there are multiple nodes of Type A then i need to create a single instance of one of the target messages and map the data in node A to this message, likewise for node B and node C.
    I cant figure out how to do this. If I map a constant to the MT level of the target message and there are no type C nodes then the message type for this is created blank. But if I try and use the CreateIf tool then I get a MT created for each type C node.
    Can anyone help with this?
    If this isn't clear I will try to explain more.
    Thanks

    Hi,
    Thanks for your answer, I tried what you suggested and while it is creating the MT for type A nodes correctly it is not creating the MT for type B or C nodes. I have tried messing with the context on the incoming field and not getting anywhere.
    I always seem to get almost there with this mapping but never what I am looking for.
    Gareth

  • Two 1-N relationships in target message

    Hi
    I am new to using the functions in message mapping and I was wandering if an expert could please offer me some help. I have a scenario where I need to produce two messages from the source message based on the number of line items for example, if there are 2 line items, the mapping needs to produce 2 messages from the source message. This part I have managed to get working fine.
    The problem is that the target message has two 1-N relationships (i.e inside the header and payload) and am I am struggling to produce 2 MessageDestination nodes per message. The mapping that I am currently using only produces 2 MessageDestination nodes inside the first message and not the second message aswell (I am using the splitByValue function). Please see example below:
    Source:
    Message1
    Header
    -MessageDestination
    --Destination[Destination1]Destination
    -MessageDestination
    -MessageDestination
    --Destination[Destination2]Destination
    -MessageDestination
    Header
    Payload
    LineItem
    -LineItem
    --Line[Line1]Line
    -LineItem
    -LineItem
    --Line[Line2]Line
    -LineItem
    Payload
    Output:
    MESSAGE1
    Header
    -MessageDestination
    --Destination[Destination1]Destination
    -MessageDestination
    -MessageDestination
    --Destination[Destination2]Destination
    -MessageDestination
    Header
    Payload
    LineItem
    -LineItem
    --Line[Line1]Line
    -LineItem
    -LineItem
    --Line[Line2]Line
    -LineItem
    Payload
    MESSAGE2
    Header
    -MessageDestination
    --Destination[Destination1]Destination
    -MessageDestination
    Header
    Payload
    LineItem
    -LineItem
    --Line[Line1]Line
    -LineItem
    -LineItem
    --Line[Line2]Line
    -LineItem
    Payload
    The following is the required output that I need to produce (i.e. 2 MessageDestination nodes per target message):
    Required Target / Output:
    MESSAGE1
    Header
    -MessageDestination
    --Destination[Destination1]Destination
    -MessageDestination
    -MessageDestination
    --Destination[Destination2]Destination
    -MessageDestination
    Header
    Payload
    LineItem
    -LineItem
    --Line[Line1]Line
    -LineItem
    -LineItem
    --Line[Line2]Line
    -LineItem
    Payload
    MESSAGE2
    -MessageDestination
    --Destination[Destination1]Destination
    -MessageDestination
    -MessageDestination
    --Destination[Destination2]Destination
    -MessageDestination
    Header
    Payload
    LineItem
    -LineItem
    --Line[Line1]Line
    -LineItem
    -LineItem
    --Line[Line2]Line
    -LineItem
    Payload
    Any help will be appreciated very much.
    Thank you.
    Edited by: Brendon Bouwer on Aug 24, 2009 2:28 PM
    Edited by: Brendon Bouwer on Aug 24, 2009 2:31 PM

    Source:
    Message1
    <Header>
    <MessageDestination>
    <Destination>1<Destination>
    <MessageDestination>
    <MessageDestination>
    <Destination>2<Destination>
    <MessageDestination>
    <Header>
    <Payload>
    <LineItem>
    <LineItem>
    <Line>1<Line>
    <LineItem>
    <LineItem>
    <Line>2<Line>
    <LineItem>
    Payload>
    Current Output:
    MESSAGE1
    <Header>
    <MessageDestination>
    <Destination>1<Destination>
    <MessageDestination>
    <MessageDestination>
    <Destination>2<Destination>
    <MessageDestination>
    <Header>
    <Payload>
    <LineItem>
    <LineItem>
    <Line>1<Line>
    <LineItem>
    <LineItem>
    <Line>2<Line>
    <LineItem>
    Payload>
    MESSAGE2 (Only one MessageDestination Node is being created, not 2)
    <Header>
    <MessageDestination>
    <Destination>1<Destination>
    <MessageDestination>
    <Header>
    <Payload>
    <LineItem>
    <LineItem>
    <Line>1<Line>
    <LineItem>
    <LineItem>
    <Line>2<Line>
    <LineItem>
    Payload>
    The following is the required output that I need to produce (i.e. 2 MessageDestination nodes per target message):
    Required Target / Output:
    MESSAGE1
    <Header>
    <MessageDestination>
    <Destination>1<Destination>
    <MessageDestination>
    <MessageDestination>
    <Destination>2<Destination>
    <MessageDestination>
    <Header>
    <Payload>
    <LineItem>
    <LineItem>
    <Line>1<Line>
    <LineItem>
    <LineItem>
    <Line>2<Line>
    <LineItem>
    Payload>
    MESSAGE2
    <Header>
    <MessageDestination>
    <Destination>1<Destination>
    <MessageDestination>
    <MessageDestination>
    <Destination>2<Destination>
    <MessageDestination>
    <Header>
    <Payload>
    <LineItem>
    <LineItem>
    <Line>1<Line>
    <LineItem>
    <LineItem>
    <Line>2<Line>
    <LineItem>
    Payload>

  • Multiple target messages

    Hello,
    for our business process, we need to map a single source message to multiple target messages (of different message types).
    The (ABAP)mapping takes care of this mapping, so I put a transformation step after my receiver step, that invokes this mapping.
    What do I have to define after the transformation step: do I use a fork or a send-for-each-block or ... ? Since we're on SP15, can we use the "extended" option in the interface determination to facilitate our process ?
    Thanks for your answers !
    Kind regards,
    Frederik

    Hi,
    What is the SP that you are using. If it is XI 3.0 and SP less than 14 then it is not possible. You need to use Abstract interface.
    And why do you need Multimapping in the first place. You can do a simple mapping and in the receiver determination you can add more Business Server/System. Each Service/System you will have seprate IB interface and a separate Interface mapping.
    Hope this solves your problem.
    Thanks,
    Prakash

  • How to change the order of target message? kindly help

    Hi Experts,
              I have a source message with fields EmpNo, EmpName, Dept and joining date. The target message has the same structure but fields are in different order. That is, EmpName, Dept, EmpNo and joiningdate.
    How to achive the target message with message mapping and without using a different message type for target?
    Kindly help
    Thanks
    Gopal

    Hi Gopal,
    Try this one.
    1. Create Only one message type of target type.
    2. Go to XSD tab and export the "XSD" of the message type.
    3. Change the <xsd:sequence> element to <xsd:all>
    4. Then import the "xsd" in external definitions.
    5. Use the imported "xsd" and create Message mapping. Give both source and target the same message type from XSD.
    6. just Map one to one.
    Now you can get ur required target structure. Since it is <xsd:all> it will accept ur input file.
    Regards,
    P.Venkat

  • Integration Builder Locks Up when choosing target message

    Hi all,
    I have a xsd file which I have uploaded to XI as an external definition. When I try and select it as a target message in message mappings the program locks up. I get as far as as selecting my root node but as soon as I hit Apply the program locks.
    The schema is valid (I have validated it in XMLSpy) and I have used it successfully on a different XI box.
    Any thoughts?
    Thanks.
    Alistair

    Duncan,
    What do u mean by Integration Builder Locks Up? You are throwing out of Integration builder or what?
    It should not happen. If that particular XSD is only locking then can you check are there any lock objects under your name for the same object. If yes please unlock and try once again. Also check if the same object is under any other change list?
    ---Satish

  • How  to update the R/3 tables with the target message??

    Hi All:
    I have one scenerio, that I am getting the data from Flat File and Mapping
    it to the target structure. Now from that target message I need to update
    few tables in R/3.Could any one give me a hint how I can achive it.
    It is possible with proxy??
    Thanks in advance.
    regards,
    Farooq.

    Also when ever I send the e-mail you peoples are able to read it..but
    I am unable to recieve the others mail in my mail box(Regarding the new blogs, forums etc). Can any one help
    me on this

  • Does the message mapping editor insure that a valid target message is co

    Hi Friends
    Does the message mapping editor insure that a valid target message is constructed?
    Regards
    Sam

    Samuel,
    Message mapping editor ,will generate the output as per your logic. Hence you need to validate and check whether the target message has been created correctly.
    If you say," I'm perfect with the logic, I created the mapping I checked the target strcuture, its perfect, always the data will be populated correctly?" If the above is your question, then the answer is YES.
    raj.

  • Split source message into multiple target messages

    Hi Experts,
    I have a scenario where a source message needs to be split up into multiple messages for the corresponding target systems.
    One source system and three target systems.
    Source system is a .Net application
    Target systems - SAP R/3, Two webservices on different application systems
    Can i implement the scenario above using BPM in the following manner?
    Source->WS Adapter->PI-->RFC Adapter->SAP R/3
    Source->WS Adapter->PI-->WS Adapter->Target 2
    Source->WS Adapter->PI-->WS Adapter->Target 3
    I could have a webservice at the source which would be called by the .Net Application
    Webservice request would be passed to an integration process which would split the message for the three target systems specified.
    Correct me if am wrong.
    Also please get back to me if you need more inputs
    Regards,
    Kalyan

    Hi,
          You can implement the same with out using the BPM itself...
    you can use either of the below options
    1. if target messages are optional like based on certain conditions if you need to route the message to the particular targets
    then you can use multimappings for the same which generates the mappings based on the condition for the particular target.
    2. if each incoming message needs to be routed to the three receivers each time then configure the three receivers at the receiver determinations one for each target...
    3. if you are using the same business system for all the three receivers then create the three interface mappings and configure the same at the interface determination level so that for each message three target messages will be generated and send to target...
    HTH
    Rajesh

  • Add file name to the element in target message

    Hi all!
    I try to configure scenario:
    Get all files from directory (it will not be the same number of file every time) and mapping this file to the ERP system. I use File adapter to do this. But what Is necessary I need to mapp the file name to the element in target message.
    I mean: When I have got the RFC structure imprted from ERP and there I have got the element "filename". I would like to put the file name of file which I mapping to this element. Next put the all file contents with file name to the ERP table.
    It is possible to do that??
    I found in sap help that I can keep file name in the message header to get the same target file name, but I wont to put file contents (with file name) to the ERP table not to another file.
    THX for all your opinions.

    The DynamicConfiguration fin inbound message:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/usr/sap/PXD/put/archive</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">ISO646-US</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20061212T121622Z</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">200610.TXT</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">124</SAP:Record>
      </SAP:DynamicConfiguration>
    and for Response:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Response
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">124</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20061212T121622Z</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">ISO646-US</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">200610.TXT</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/usr/sap/PXD/put/archive</SAP:Record>
      </SAP:DynamicConfiguration>

Maybe you are looking for