cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Glenn,

check out this :

Regards,

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.