on 05-04-2007 7:23 AM
Hi XI friends,
in my idoc to file..
i have number of segments..all segments are optional...
i want to remove in resultanat xml file..
please tell me how to remove if the values are not exsisted for that Segment ..
i think its possible in message mapping..
please guide me..
Munna
Hi,
tried with exsists also...i am gettin unused segments in resulatant xml..
please guide me
Munna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Munna,
Try Creating a UDF in your mapping name it like: "Create"
Paste the below mentioned code in it
========================
String str = a;
if(str != null && str.length()>0)
return "true";
else
return "false";
========================
2) Save this function .
3) Now Map like this
(Source Node->UDF Create)->Check if it returns a string "true"--> if yes Map it with source node->add this in the "then" of an "if with out else"---->Target node.
4) Test now in testing tool in Message mapping.
Try it.
it will work
regards
Pl: reward points if it worked
No need for UDF.
Just use IfWithoutElse and as input use a compare (using EqualS) between the field you want to check and an empty string (using constant).
Regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhu,
thanks for your response..
i did the same thing..but i am getting the unused segment in xml..
and also...i used segment->exists>ifwithoutelse---->targetsegment
segment
same..i am getting unuseed segments in xml..
please guide me
regards
Munna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amitanshu ,
thanks for your response..
could you please in detail..how it can be with IF and exsists..
regards
Munna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi munna,
Use exists to determine whether a particular source field exists in the XML instance to be processed in source system. If it exists() returns the value true, if not it returns the value false.
http://help.sap.com/saphelp_nw2004s/helpdata/en/db/83f7b88528424c9113b15d5e0fb516/content.htm
Thanks
Amitanshu
Hi Chandra..
thank you very much for your response..
i dont want to display in the resulatant xml file if that segment does not contains data in the idoc....i want to eleminate the segments which dont have data in Idoc..
so that resultant xml file will have only segments which have data..
is this possible to achive this in Message Mapping
please guide me
regards
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi freinds,
thank you so much for your responses,
idoc contains some 100 segements..
all the time..all idocs are not contains all segments..
my requirement is if that segement doent contain data in idoc ....
that segement should be removed in message mapping..that means no message mapping should perform for that particular segment
please guide me..
regards
Munna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
As explained above in message mapping , just map the required fields/required segments , next need not to disable or remove in messamapping in target structure , if the receiver side segment /element is mandatory i mean red color then you should map with a value / or empty constant or right click and disable
if it is not mandatory i mean if it is optional then do not map thats all it will not in resultant structure ..
But display purpose all the rest of 100 segments will display only ,
if you want to hide , we have one filter symbol in mapping editor click on that symbol , all the unmapped elements or segments will be hidden.
if you want to disply again click on filter symbol again.
Regards
Chilla
Hi Munna,
Map only those fields which u want to put in XML file....from IDOC structure to File structure in Message Mapping.
regards,
Ansar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
right click on the target segment in the message mapping
and <b>remove</b>
this will remove this segment
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Just right click on segment during mapping and click on disable/remove field to remove the node.
Regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do not map the source fields to the target in your mapping which you do not want to be sent.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.