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

Can XI check input data if it has a blank value

HI all,

In my scenario, the input data for SAP XI consists of many fields which some fields have value and some fields don't which depends on many things. For my output, I need to use only some of them. Therefore, I'll use XI to do some mapping. My question is I want to to check that after mapping if no field has a value ( All fieds have blank value ), I don't want XI to send data to the output because it will be just a rubbish. Can XI do this? Any solution and example would be appreciated and rewarded.

Best regards,

Pavin P.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 20, 2008 at 03:21 AM

    Write a UDF for checking all the values you are intested in checking for null and map it to the root node of the target message. If they are null no target will be generated and no message will be sent to target system.

    VJ

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2008 at 04:24 AM

    Do you have any sample code for this?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      If you have 4 variables(a,b,c,d) for which you have to check whether they exists or not.

      UDF: checkNull

      if(a.equals(null)&&b.equals(null)&&c.equals(null)&&d.equals(null))

      return null;

      Now using graphical mapping add IfWithoutElse and provide output of this UDF to not and not to if condition.

      Make sure that the context is defined at the root level for all the source nodes.

      regards,

      Anirudh.

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.