cancel
Showing results for 
Search instead for 
Did you mean: 

Datatypes transformation between XI to R3 with a proxy.

Former Member
0 Kudos

I have the following problem. I have a proxy that receives data from xi whitch receives data from different sources which causes the data in some datatype fields to be longer than the datatypes described in the proxy for example:

proxy input structure patient-name is 30 characters but i am being passed 52 characters.

We do not want to do this on the XI side due to the large size of structures and i do not want to change the generated XSL manualy.

Can you generate the Proxy so that it shortens the datatypes Automaticly in the transformation XSL.?

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Rikardt,

Once yo uhave fixed your structure and generated the proxy, for any change in the field attributes of your structure you need to change it in Int. Rep and then regerate the proxy. One option will be to take the maximum length that can be send from the sender system and then based on that generate your structure in Int. Rep. using the type normalized string(this type can give up to 1000 char length in your proxy).

More over in your case, you have the patient name field which is 30 char long as per your current structure and is sent from the sender system with a length of 52 characters. Pls do check whether once you receive your data the field in SAP (your receiving system) which is being updated from the proxy is capable of handling more than 30 characters.

cheers

JK

Former Member
0 Kudos

Thanks Shankar for your reply.

But my problem is not the structure names. My problem is when a value is passed to the proxy it could be longer than the specified characters example passing the value 'Piet nel' to a character string that only accepts 4 characters , i would like only 'Piet' to be stored in this character string. I would like to be able to do this in the XSL transform of the proxy.

Message was edited by:

Rikardt Louw

Former Member
0 Kudos

Ok I got that. There are two aspects -

1) If you are always passing the longer values to proxy, then it will give data loss error. In such case, I feel it is more logical to change the lengths of elements in the XI message types and create the proxy again. I understand this may be tedious if message structure is large. But this is only a one-time activity.

2) On the other hand, if you want to strictly avoid re-creation of proxy, then you will have to ensure that you pass the data of appropriate length to XI.

e.g. you should pass 'Piet' to XI instead of 'Piel nel'.

I am not sure whether XSLT code of proxy can be modified.

Regards,

Former Member
0 Kudos

Hi Rikardt,

Yes, you can solve this problem in proxies.

If any of your generated proxy class or structures has name longer than 30 characters, then you will see a tab called 'Naming Problems' besides the usual tabs. Here you will see the objects, for which length is exceeded.

In such case, <b>you can manually assign shorter names and activate the proxy again.</b>

I have tested this. It works

Regards,

STALANKI
Active Contributor
0 Kudos

1.Why cannot use the change the message structure for the patient name in the integration repository and re-generate the proxy?

Former Member
0 Kudos

It does not truncate it gives me the following error if you look in the xml log.

ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXS00000000000000000018 XML Bytepos.: 879 XML Path: ns1:CLAIM_PRIMARY(1)MAINMEMBER(3)NPAT(1)AGNAM(4) Error Text: Data loss occurred when converting MELDE KOKER VERSEKERING MAKELAARS Kernel ErrorId: CONVT_DATA_LOSS)) Error during XML => ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXS00000000000000000018 XML Bytepos.: 879 XML Path: ns1:CLAIM_PRIMARY(1)MAINMEMBER(3)NPAT(1)AGNAM(4) Error Text: Data loss occurred when converting MELDE KOKER VERSEKERING MAKELAARS Kernel ErrorId: CONVT_DATA_LOSS)) An error occurred when deserializing in the simple transformation program /1SAI/TXS00000000000000000018 Data loss occurred when converting MELDE KOKER VERSEKERING MAKELAARS

Former Member
0 Kudos

Hi,

I think if you get more data then the destination data structure type the data must be getting automatically truncated.

I have not tested this though.

Regards

Vijaya