cancel
Showing results for 
Search instead for 
Did you mean: 

Last two fields in the output file are missing

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Matias,

Those fields are not being populated from Proxy.But these fields are required in my target side. I am downloading the file from the APP server. In the Moni of XI the tag is being generated with the field length 0.

Kindly Suggest..

Regards,

CK.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Matias,

I already tried by mapping a constant with blank value then it is not coming. But if i give some value to it then it is populating. But I want Blanks to be populated which is not happening in my case.

Can you give me the UDF if you have?

Regards,

CK

Former Member
0 Kudos

Hi CK !

I think there should be another problem. The UDF will work exactly as the constant value mapping function. Are you using file content conversion in the file adapter receiver? or you are just using XML?

Regards,

Matias.

Former Member
0 Kudos

Hi Matias,

I am using the FCC in the Receiver Adapter.

Please give me the UDF if u have...

Regards,

CK.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Try double quotes instead of simple quotes for string literals... " " instead of ' '.

Regards,

Matias.