on 06-15-2009 4:12 PM
Hi
I would like to delete segments which don have any values in their child segments in graphocal mapping?
How should i use createif and existsmapping functions for this?
Edited by: Rajesh on Jun 15, 2009 8:42 PM
Hi All,
This has been achieved by using a XSLT mapping.
I have been used two XSLT mapping. One is to remove all empty segments and empty fields.I prefered XSLT rather that grpahical mapping due to nested XML structure.
The XSLT mapping program can be accessible at
https://wiki.sdn.sap.com/wiki/display/XI/RemoveemptytagsfromanXMLvia+XSLT.
The second XSLT is been used to pass the whole XML structure to one node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this https://wiki.sdn.sap.com/wiki/display/XI/RemoveemptytagsfromanXMLvia+XSLT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like to delete segments which don have any values in their child segments in graphocal mapping?
How should i use createif and existsmapping functions for this?
If you want to check if a value if present in a particular node or not then I dont think exists function will help you....exists function will only check if the node is existing or not.....
<SRC>
<Node1>
<Field1>SAP</Field1>
</Node1>
<Node2>
<Field2></<Field2>
</Node2>
</SRC>
If above is your structure on which you want to implement the logic..then as per your req you dont need to have the Node2 as the field(s) within it is not having any value....then you need to implement the below logic:
Field
----------> equalS ----> Not ---> If...then / createIf ----> Target
Constant(keep it blank)
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
You can do this by doing you message mapping in 2 phases.
create First Message mapping and do perform your business logic there(not delete empty segments here),this mapping will be Source to Target
Create Second message mapping and write an advanced UDF which will check for the existence of child node,and delete the parent node if child node is not found,this will be a Target to Target mapping.
then specify both these mappings under one Interface mapping.
Thanks
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
for creteif you have a good example here:
http://help.sap.com/saphelp_nw04/helpdata/EN/d9/3033f96c79674f90e3ab8d101a595b/content.htm
but I'd write a UDF which would check if any child segment exist and if not remove the parent segment
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.