cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Data Type in Proxy

Former Member
0 Kudos

Hi,

I am sending data from R/3 to XI using Proxy.In Integration repository I have defined datatype Response of type string length 100 and occurence as 1-unbounded.

In my proxy program I am Concatenating 3 variables in to one var and then assigning the value of Var to response.

But the proxy program is compressing the space and we are not getting desired output.For e.g

Var = 'Test of P'.

Then data response in Payload is showing as

response = 'Test of P'.

Please help me if somebody has any idea about this.

Thanks.

Rekha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

What is the data type of Var in R/3.

are you concatenating space while passing values to Var?

Did you check the value in variable var before passing it to Response field.

hope it helps.

Regards,

satish

Former Member
0 Kudos

Hi Satish,

Thanks for the response.

My data type in R/3 is char.

I have checked it in debug mode beforePassing it

to Proxy the datatype response contains value as below

response = 'Test of Proxy'.

But when the message is processed ,In SXMB_MONI

response = 'Test of Proxy'.

Is this problem is due to conversion into XML format?

Thanks.

Rekha.

Former Member
0 Kudos

Rekha,

There can be several reasons. Please check the following:

1) Instead of concatenating, pass the offsets. Like Var(4) = 'Test'. Var+5(2) = 'of' etc.

If this does not work,

2) Go to the "response" field in the Data Type you have defined in the Integration Builder. In the "Details" column for the field, change the "whiteSpace" attribute to Preserve.

Hope this helps,

Bhanu

Former Member
0 Kudos

Hi Bhanumurthy,

I dont want to use 1st option because we wont be using concatenation.This is example I have used to explain.

I have tried second option also but still it is not preserving space instead it collapsing the space .

Thanks.

Rekha.

Former Member
0 Kudos

Hi Rekha,

Are you checking your payload in SXMB_MONI ?

If so SXMB_MONI message window will not dispaly white spaces in the message window(though spaces will be present in the message). You can just save your paylod and open with wordpad to view the exact contents of the message..

Regards

Anand

Former Member
0 Kudos

Anand and Rekha,

The SXMB_MONI message does display the white spaces. I have just checked.

Probably it depends on the SP level of XI. Which level are you on?

Thanks,

Bhanu

Former Member
0 Kudos

Hi Bhanumurthy,Anand,

Our XI is on SP12 and our R/3 is on SAPwebas 6.2.

I am checking it on SXMB_MONI of R/3.

I will check whether file wriiten by XI contains white space or not.

I have checked the file does not contain space.

Bhanumurthy

Does your payload showing only one space or even more than one space.Let me repeat the value of var and response as var is not displaying what I am writing here.

Var = 'Test of Proxy'.

Here in var after test 3 space and 5 space after of.

But response = 'Test of Proxy'.

Rekha

Message was edited by: Rekha Lather

Former Member
0 Kudos

Hi,

We faced this problem in SP11.

All the spaces(multiple) were shown as a single space when seen through SXMB_MONI. But actually when we parsed the message and mapped it all spaces were intact as expected.

Regards

Anand

Former Member
0 Kudos

I found the problem. There are two reasons:

1) The www specifications mention the Preserve, Replace and Collapse options to deal with white spaces. You may refer to:

http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/datatypes.html#rf-whiteSpace

This is reflected in the Data Type "Details" in XI Integration Builder that I had suggest in this thread earlier. This will add xml:space attribute to the Element while generating the XML file.

2) The XML 1.0 standards have guidelines for the Parsers to interpret the white spaces based on the XML tag attributes. You may refer to:

http://www.w3.org/TR/2000/WD-xml-2e-20000814#sec-white-space

Now, here is the tricky part. I have tested a Space_Handling_Preserve.xml file with the following code:

<?xml version="1.0" encoding="UTF-8" ?>

<TestSpaces xml:space="preserve">Test of Proxy</TestSpaces>

There are 3 spaces after 'Test' and 4 spaces after 'of'.

When the file is opened, both the Microsoft Internal Explorer and Firefox browsers showed only one space each. But when the line was copied and pasted in notepad, firefox had 3 and 4 spaces, but IE did not.

So, this could be just a browser display issue.

Solution:

I would suggest that:

1) Make sure that the Data Type has the 'Preserve' attribute as above.

2) Create a File Receiver Communcication Channel from XI. The scenario will be: R/3 Proxy - XI - File. Check the spaces in File.

I have to hit the sack now.

Let me know if this does not work.

Hope this helps,

Bhanu

Former Member
0 Kudos

Hi,

Thanks Bhanumurthy, Anand.

You are right when we write in notepad it is preserving space.

Thanks for your response.But I couldn't see the option where I can reward you points for this.Usally there is option but for this thread I don't know why it is not displaying.

Thanks for your reply.

Thanks.

Rekha.

Former Member
0 Kudos

Hi Rekha,

I think the points option is up again. You may want use it, particularly for Anand.

Cheers,

Bhanu