Skip to Content
author's profile photo Former Member
Former Member

do not create target structure if particular field is not present in source structure

Is there a way as to not create target structure if a particular field is absent in the source.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2014 at 04:48 PM

    Hi Vicky,

    simply insert an 'if' with an 'exists' (node function).

    Cheers,

    Edu

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2014 at 05:02 PM

    You can also use createIf node function to handle the same. Check below link for further details

    http://scn.sap.com/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-part-ii

    Add a comment
    10|10000 characters needed characters exceeded

    • It's not clear what you are trying to achieve.

      If your channel has to be invoked and there should be no payload then change the occurrence of target MT to 0..1

      It just sends messages/messages 1 tags to target web service but there won't be any payload in it.

      I just gone through your other thread but what is this mapping is for? is it for second interface?

  • Posted on Dec 05, 2014 at 09:02 AM

    Hi Vicky,

    You can achieve that in Message Mapping without failing the message using a few node and text functions , but the occurrence of the target message be either 0..1 or 0..Unbounded.

    I created two sample message types 'DemoSrc' and 'DemoTarget' and tested the same in message mapping.

    In the below map, I didn't want to target message 'DemoTarget' to be created if the field 'Field' is not present in the source message 'DemoSrc'.

    Test when the element 'Field' is present in the source message.

    Test when the element 'Field' is absent in the source message.

    In both the cases, the mapping is executed successfully.

    Hope this helps..

    Regards,

    Samanth Kunapareddi.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.