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

Need to create Target substructure if invoice number node has a value.

I only want to create Target substructure if Source node <Invoice Number> has a value and is not blank. Can not use Exists function because <Invoice Number> node is 1..1 so it will always be there but it may be empty. Thank you.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 05:31 PM

    Hi Glenn,

    If you are getting the source from idoc and if you dont have invoice number from idoc then you will not at all have the field. So it will not be empty until unless somebody manually sends from we19. So you should not run into those kind of issues.

    Anyways you can check both blank and length. So check lenght greater than zero and equal to blank which is a space. It should work.

    Regards,

    ---Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 05:38 PM

    Hi Glenn,

    check out this :

    mapping-help---empty-value

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 05:22 PM

    Hi Glenn,

    Having "1...1" in the target does not mean that the value is going to came always because for that you need a xsd validator which is included in PI 7.1. I recommend You use mapwithdefault standard function and then compare if the value is blank or not.

    Regards

    Ivan.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 05:27 PM

    Hi Glenn

    If your source has empty value and you don't create a target, well you can compare the source with a constan "" use

    source ........

    constant ........ EqualsS ..>>

    source >> ifwithoutElse >> target.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2009 at 06:35 PM

    Thank you all for your input. After reviewing them I ended up going with the following solution provided by Ashok Selvaganapathy (SAP Technical Expert):

    Invoice Number not eqS empty string -> removecontext -> createIf -> DT_Row

    Glenn

    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.