cancel
Showing results for 
Search instead for 
Did you mean: 

RFC call error instead of sending reply

Former Member
0 Kudos

Hello,

I have an integration where SAP PI synchronously through RFC calls a function module in SAP I-SU (ERP). The input structure contains a field type country land1 - land2. When I will pass incorrect data in that field for example "Poland". I got an error:

CX_SY_CONVERSION_DATA_LOSS

During conversion Poland lost of data occured.

THis is log from srt_util transaction:

210.12.201510:19:04WSREMOTESRT_CORE1434@0S\QWyświetlanie zalec. czynności           @ProviderSYNCHRONPodczas konwersji Grecja nastąpiła utrata danych.XML-ConversionBC-DWB-PRXSXML_PARTS/RWS/ES_PH_CREATE10.106.30.10410.12.201510:19:04005056AB69D71ED5A7E3E1D2EF1BA0C85667AF74E1EA608EE10000000A6A1E6824.12.2015
110.12.201508:40:20WSREMOTESRT_CORE1434@0S\QWyświetlanie zalec. czynności           @ProviderSYNCHRONPodczas konwersji Polska nastąpiła utrata danych.XML-ConversionBC-DWB-PRXSXML_PARTS/RWS/ES_PH_CREATE10.106.30.10410.12.201508:40:20005056AB69D71EE5A7E228811D8E3B4556682C8C9AC7B6B3E10000000A6A1E6824.12.2015

Is Function Module called If you got error in input structure  ?

Judging from message not, because value would be cut to "Po" ?

Is this a matter of configuration on ERP side or development ?

I would like this error message to be sent to SAP PI.

Best

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Thx for all helpful answers. So there was a Web service created using SOAMANAGER and wsdl generated have different restrictions then wsdl on PI System I downloaded wsdl from ERP system through SOAMANAGER and added all char length restrictions to my wsdl on sap PI, now if our provider sends wrong data (too long for example), he got an error already in his side (because of wsdl validation).

Best

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Marcin,

I haven't so clear why are you using srt_util transaction, are the sender system calling via SOAMANAGER (web service runtime) to PI?, if i am right, why don't use an ABAP poxy?


Is Function Module called If you got error in input structure  ?

If the structure doesn't fit (incorrect type or larger field) the RFC will not be called.


Judging from message not, because value would be cut to "Po" ?

You can do it in message mapping with the string function, take only the two first characters for the land field. Also you can use a schema validation and to reject the message on the outbound side.


Is this a matter of configuration on ERP side or development ?

It is a problem, in my opinion, to be dealt in PI

Regards.

vadimklimov
Active Contributor
0 Kudos

Hello Marcin,

What adapter type do you use on sender side? And in which system do you check transaction SRT_UTIL?

If you are calling a function module via RFC from PI (e.g. using RFC receiver adapter), then exceptions raised by called function module will not be captured by Web Service framework and will not be observed in SRT_UTIL. Having this in mind, I would assume that you are either calling function module in your SAP IS-U system from PI indirectly (e.g. using SOAP web service wrapper, which implementation calls this function module), or you are using ABAP based web service adapter (WS adapter?) and are checking SRT_UTIL in a PI system.

If you are using WS adapter on sender side, then the error is in PI and function module in IS-U system hasn't yet been called.

If you are calling a SOAP web service on IS-U side that implements a call of that function module, then still function module itself hasn't yet been called, since the error is coming from Web Service framework (note prefix "SRT_" in message class) and not from function module or application (normally they would have dedicated packages and message classes).

If you would like to handle and processed exceptions raised by a receiver system, in PI, please get use of fault message types. In this case, if an exception has been raised by a receiver application, that exception structure can be mapped into a fault message type and handled in PI and returned back to the original calling system.

Regards,

Vadim

Former Member
0 Kudos

Hello, this is my cc:

It is soap adapter: I will look into your seggestion with fault message. I am using single stack Java PI.

Thanks for your pointers I will sit down on this interface again and perhaps come back with some questions.

Best

vadimklimov
Active Contributor
0 Kudos

Marcin,

Fault messages is a way to handle exceptions occurring in receiver application system, within PI system. But maybe you may also think about an option of handling inappropriate values in request message mapping - so that issues with country code field values may already be eliminated in PI and corresponding messages will not be sent to IS-U system at all? For example, you may check value length for corresponding field. In SAP systems, this will normally be following two-letter country code notation (which is compliant to ISO 3166 Alpha-2 codes).

Regards,

Vadim