cancel
Showing results for 
Search instead for 
Did you mean: 

Inbound Proxy PARSE_APPLICATION_DATA exception CX_ST_DESERIALIZATION_ERROR

arkesh_sharma
Active Participant
0 Kudos

Hi Experts,

I am facing a problem in which my sender side is a file and the receiver is Inbound Proxy. One of the fields in the target is falling short of length while converting from XML to ABAP because of which it is throwing an error. I want to increase the length of the target field in Inbound Proxy. How can i do that? Do i need to modify the Proxy Code ? Please provide a step by step solution to this.

I was searching the PI forum and found one post which stated the same problem but the person modified the data and not the field length to resolve the issue. The details of that forum question can be found at the link below:

?

It would be really nice if you could please provide a step by step procedure to modify my Proxy Code.

Thanks,

Arkesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

To keep things simple you can use the substring function in message mapping to limit the length of the content for target field.

I think no UDF is required for this case.

Another case is to lengthen the field in the proxy. Then you have to lengthen the field in your PI target structure and then re-generate the ABAP proxy.

But be careful if you use a SAP standard scenario with SAP Standard Proxies. Then I would recommend you not to touch the proxy.

Regards,

Volker

arkesh_sharma
Active Participant
0 Kudos

Hi Volker,

Your response was in similar lines to what i was thinking. Thanks a lot. I can truncate the value of field which is coming from the source but as the system is in Production and the value of the field is coming directly from the Vendor, so maybe my peers wont allow me to truncate that value. Can you please elaborate on the point that If I am using a standard Proxy then what are the complications which I am going to face if I make changes in the structure of the message Interface and then re-generate the proxy ?

The proxy-field which is present in the message interface is of type String and the value which is being passed to the proxy through XML is just 62 characters long (including spaces) so i don't think that it should be the cause the problem. Could you please give your views on this point which i made. Also, could you please tell me what is the length of String Type Data Type in SAP-XI? How many characters a data-type of type string can accommodate?

Thanks,

Arkesh

Former Member
0 Kudos

Hi Arkesh!

Changing SAP standard is always an issue. It is a modification and you may face problems (or at least challenges) whenever you update your SAP software. Changing interface and re-generating the proxy means to modify the standard.

I think SAP (maybe) has made some thoughts of the field length. If I would be you I would first try to find out what will happen with that field in the receiving system.

If for example the database field in SAP where the "bad field" is to be stored in has a length of 5 and you change the proxy interface to a length of for example 500, then the best what can happen is that your field is truncated in the SAP system. The worst that can happen is that the application throws an exception.

Like already mentioned truncation can also be achieved in mapping.

So contact your business people and ask them for that "bad field" and what they expect to be happened to that field. Primarily it depends on the business semantics of that field how it has to be handled. It even may be that so far the vendor delivers some "trash content" in that field and thus the content has to be changed/shortened/removed by him.

btw: As far as I know String fields in PI are (theoretically) of arbitrary length...

Regards,

Volker

arkesh_sharma
Active Participant
0 Kudos

Hi Volker,

Thanks a lot for imparting this knowledge to me. One more question/ concern here to you is:

I have just found out by looking into the proxy that the "bad field" in my proxy is 60 characters and the value coming from the XML is 62 characters long. If i do what "Progirl" suggested in her solution then is it possible that i do not face any problems and i get away with this issue easily?

Thanks,

Arkesh

Former Member
0 Kudos

Hi!

My personal recommendation is still: If it is SAP standard leave the proxy and interface untouched. If your business people can live with the two bytes lost in space use e.g. message mapping function substring to truncate the content form 62 to 60.

But please contact your business people before you do that. Maybe the last two bytes are of mission-critical meaning ...

And please consider the things I told you about the storage of that feld in SAP backend. If it is 60 characters long in SAP database table then lengthen the interface makes no sense, because the last two bytes get lost anyway - or backend application throws an exception.

If the two bytes are needed and the database table field only has 60 characters then the job becomes "a bit bigger" to store these two additional bytes ...

Regards,

Volker

Answers (2)

Answers (2)

arkesh_sharma
Active Participant
0 Kudos

Hi Volker and Gaurav,

Thank You for making me aware of the consequences which i was going to face if i had made changes in the proxy. I'll convey the message to my peers and the concerned business people. I hope they don't mind truncating two bytes of data in the end. Thank You again.

Regards,

Arkesh

former_member187339
Active Contributor
0 Kudos

Hi,

>> I am facing a problem in which my sender side is a file and the receiver is Inbound Proxy. One of the fields in the target is falling short of length because of which it is throwing an error.

I guess you are revfering to the value of the field right? If its length is smaller then write a udf in SAP XI to check and (if required) pad zeroes or any other character and make it of desired length.

Regards

Suraj

arkesh_sharma
Active Participant
0 Kudos

Hi Suraj,

I meant to say that the target field is unable to accommodate the value which is being passed by the XML. So, there is a problem of XML to ABAP conversion because of which it is throwing the exception of PARSE_APPLICATION_EXCEPTION with CX_ST_DESERIALIZATION_ERROR. Data is being lost while Inbound Proxy is called.

Thanks,

Arkesh

former_member190389
Active Contributor
0 Kudos

Hi,

Can you change the data type in the import parameters of the execute_asynchronous method? make it string or something like char5000 to accomodate i think char5000 should work

arkesh_sharma
Active Participant
0 Kudos

Hi Progirl,

Your suggestion sounds good to me but kindly let me on which tab of the proxy do i need to make this change? After making the changes and saving it do i need to re-generate the proxy ? As per the suggestion from Volker Will the changes that I am making have a negative impact on my proxy as my proxy is Inbound Standard Proxy ?

Thanks,

Arkesh

Edited by: Arkesh Sharma on Sep 4, 2009 1:51 PM

Former Member
0 Kudos

Hi,

If it is standard proxy then do not touch it. Truncate additional value using UDF.

Changing datatype is not possible as they are generated datatype. If you select "String" in XI data type then ABAP will also select as "STRING" datatype but since it is standard proxy change is difficult and not advisable and still if you want to do it do it first in XI then recreate proxy in backend.

Regards,

Gourav

arkesh_sharma
Active Participant
0 Kudos

Hi Gaurav,

Thank You for the information. Please let me know what will happen if i implement what the Progirl suggested in her solution?

Thanks,

Arkesh

Former Member
0 Kudos

Hi,

Just to repeat what I said before: you CAN'T change generated proxy, datatypes and other objects this statement also includes parameters for "Execute_Synchronous" method as they are directly derived from generated procies.

Only solution is to create new objects altogather and implement using custom code or use UDF approach as suggested in above posts.

Regards,

Gourav