on 08-27-2007 2:48 PM
Hi Firends,
I have a scenario where in I am posting data from a Proxy to file(Fixed Field Length).
The last two fields of the file are always blank, but I need these fields also to be populated as blank spaces in the output file.
All the fields occurances are 1 and the last two fields are 103 & 2 char's in length.
I am not getting these two fields now. kindly let me know how can I do this?
Thanks in advance.
Regards,
CK.
Hi CK!
Are those fields received by XI from the ABAP Proxy? check if they are entering XI already as 0 length fields (you should download the xml message from sxmb_moni transaction and see the xml code using a text editor, not the internet explorer because it doesn't render well the blank spaces).
Regards,
Matias.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi CK !
Try to verify or to fill those fields in the proxy with the amount of spaces or blank characters you need before sending to XI, I mean, populate them with spaces in proxy.
Other way: map a constant with blank spaces to the output fields or map the output of an UDF (that receives by constant the amount of spaces you need to output) that outputs the blank strings to the target fields.
Regards,
Matias.
Hi CK !
Is your mapping program generating those blanks in the test tab? what FCC are you using?
I don't have the UDF, it should be a simple java function like:
String output='';
for(int i=0;i<Integer.parseInt(a[0]);i++)
{
output+=' ';
}
return output;
where a is the argument of the UDF. But I don't see the point of using a UDF, it will NOT make any difference than using the constant value function..there isn't a "special" way to put blanks in target field to avoid your problem. The problem is in another place.
One more thing, try to disable FCC in file adapter received and see if the XML has the fields populated with blanks. But the first thing we need to be sure, is that blank data is generated in mapping first !!!
Regards,
Matias
Regards,
Matias
Message was edited by:
Matias Denker
Hi Matias,
I donot see anything wrong in the configuration. When i give a blank space in the mapping and test it is working fine. But finally when the file is generated those fields are not being populated and there are no errors in my Communication Channel monitoring also.
and when I use your UDF it is giving an error as
/usr/sap/XID/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapf9ecca4054ae11dc907500145e48d1c2/source/com/sap/xi/tf/_MM_Vendor_Reclamation_.java:155: empty character literal String output=''; ^ /usr/sap/XID/DVEBMGS01/j2ee/cluster/server0/./temp/classpath_resolver/Mapf9ecca4054ae11dc907500145e48d1c2/source/com/sap/xi/tf/_MM_Vendor_Reclamation_.java:155: unclosed character literal String output=''; ^
Regards,
CK
Hi CK !
About the UDF, just check java documentation online. I'm not a java developer. By the way, if your mapping program in the test tab is working fine, the UDF will just help to enter the hundred spaces by hand.
<b>Please check to disable the FCC in file adapter receiver and see if the generated XML has the populated fields with blanks. This will help to see if the problem is in the FCC configuration.</b>
Please post the fcc configuration to allow me to help you.
Regards
Matias.
Message was edited by:
Matias Denker
Hi CK,
You problem is in the FCC.
When you view a message in SXMB_MONI, you do not see any whitespace (it hides values like spaces) .
To see what the actual payload is after the mapping, open the message payload in SXMB_MONI, then either
1) download this to a file using the icon on top OR
2) right click in the window frame with the payload and select "view source"
If your XML tags have spaces in them, you will see it here.
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.