on 07-05-2013 2:40 AM
Hi All,
I have a scenario Proxy to File. I am getting the empty tags in the inbound paylod for those fileds are not having values. I just want to remove the empty tags while generating the XML file at receiver side.
There is no mapping for this. I have put the occrance of each filed 1 :1. Can we restrict the empty tags to change the the occurance to 0:1?
or is there any possibility to remove the empty tags at ECC or Do we have to use XSLT mapping for this?
Thanks
SAP PI wrote:
...
There is no mapping for this. I have put the occrance of each filed 1 :1. Can we restrict the empty tags to change the the occurance to 0:1?
Hi,
do you mean that you currently don't have a message mapping? You probably would need a message mapping to get rid of any empty tags. You could then use already given solutions (xslt mapping / message mapping with changing fields to optional).
HTH
cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For the fields you don't want empty tags, make them optional both at source and target and map them direct.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
If you go with XSLT you could use this which will get rid of empty tags (nodes, attributes, comments and processing instructions):
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match=
"*[not(@*|*|comment()|processing-instruction())
and normalize-space()=''
]"/>
I hope this helps.
Best regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes you need to create .xls file for the abv code xslt and Import in Imported Archive in .zip format. You need to use this IA in ur Operation Mapping.
My few cents:
You can achieve this using Std Graphical mapping (easy to maintain & performance efficient) as suggested in abv posts (instead of XSLT)Regards,
Azhar
Hi,
1. you can remove the empty tag putting condition and using createif function.
this will make sense only for occurrence 0..1.
2. if tag is coming ,it has empty value and occurrence is 1..1. then removing tag will cause mapping error since it is mandatory field.
you can make occurrence 0..1 and if tag is empty valued you can removing it using createif.
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.