cancel
Showing results for 
Search instead for 
Did you mean: 

Generating empty XML tags

Former Member
0 Kudos

Hi,

I have an IDOC coming into PI.

One of the fields is optional. If data is not present in it, then that tag itself will not exist.

How do I ensure the creation of this tag even if data in the source does not exist?

I am using a File Communication channel (sender).

One solution would be to use a module to search and insert these tags.

I am looking for an easier solution.

Cheers,

Earlence

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

You can check the condition in mapping it self,like if field exists in IDoc then create target filed.Use Exists function,and also try to use CreateIf function.

Regards,

Raj

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
How do I ensure the creation of this tag even if data in the source does not exist?

Mapping logic will be:

Source --> Exists --> IfWithElse (then Source) --> Target
                       (Else BlankConstant)
I have an IDOC coming into PI.
I am using a File Communication channel (sender).

Is the IDOC posted as file on some FTP/ NFS server from where PI picks it up?

Regards,

Abhishek.

Former Member
0 Kudos

Hi,

this solution is fine, but I forgot to mention that I need the empty tags generated BEFORE message mapping and BEFORE receiver determination.

Former Member
0 Kudos

okay, This is not needed anymore

Former Member
0 Kudos

Hi,

I understand you are getting the idoc into PI and during the generation of the mapping which is sending through file receiver adapter channel..then as specified above use function exists and specify the values as required....

And if this is causing the problem at adapter level for file content conversion..then there are parameters like fixedLengthTooShortHandling ..can be used...also if the field is last field then there are other parameter too for the same

Search Help if need more on the file content conversion parameters if needed..and if my understanding is correct..

HTH

Rajesh