cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in executing ABAP Proxy

Former Member
0 Kudos

Hi all,

I have created an ABAP proxy for a HTTP-XI-RFC scenario

(synchronous). The proxy is for outbound interface. The case is that 2 no.s are passed from proxy to XI which calls RFC, which in turn returns the sum of 2 no.s

The problem is that When I run the proxy report, no output is returned by RFC and '0' is displayed as answer.

In SXMB_MONI, both - the request and response - messages are shown as successfully processed.

Here is the report, for your reference:

*----


REPORT ZSSB_REPPROXYTEST.

DATA prxy TYPE REF TO ZPWACO_OBIF_CALC.

CREATE OBJECT prxy.

DATA it TYPE ZPWAMT_CALC_SEND.

DATA res TYPE ZPWAMT_CALC_REC.

TRY.

it-MT_CALC_SEND-NUM1 = 2.

it-MT_CALC_SEND-NUM2 = 7.

CALL METHOD prxy->EXECUTE_SYNCHRONOUS

EXPORTING

output = it

importing

input = res.

commit work.

CATCH cx_ai_system_fault .

DATA fault TYPE REF TO cx_ai_system_fault .

CREATE OBJECT fault.

WRITE 😕 fault->errortext.

ENDTRY.

write:/ 'Num1 = ', it-MT_CALC_SEND-NUM1, / 'Num2 = ', it-MT_CALC_SEND-NUM2.

write:/ 'Sum = ', res-MT_CALC_REC-SUM.

*----


Is the 'CALL METHOD' part of above code correct ?

Regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Shankar ,

 try prxy=>EXECUTE_SYNCHRONOUS

instead of

 prxy->EXECUTE_SYNCHRONOUS 

A commit work is not neccesary in case of synchr call.

Catch system errrors:


DATA fault TYPE REF TO cx_ai_system_fault .
catch cx_ai_system_fault into fault.
WRITE 😕 fault->errortext.

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

1) prxy=>EXECUTE_SYNCHRONOUS gave syntax error.

2) After modifying the Catch clause as per your suggestion, I got following error in report output.

<b>Error during XML => ABAP Conversion (Response Message; Error ID:CX_ST_GROUP_MISSING_CASE; (1SAI/TX000000000000000020 XML bytepos. : 126 </b>

What is this 'Missing Case' ? Is it related to uppercase/lowercase stuff ?

Regards,

udo_martens
Active Contributor
0 Kudos

Hi Shankar,

sorry for the "=>". That was for XI 2.0

The error is now visible, that's a little step

May be, you changed your interface / the datatype after generating the proxy? Then regenerate and activate the proxy.

Regards,

udo

Former Member
0 Kudos

Hi Udo

It's ok about '=' error. I had guessed what you told.

Well, I haven't changed the IR objects after creating proxy.

Also, I have tested the scenario from http client also, where I get the result back correctly.

Regards,

Former Member
0 Kudos

Hi Shankar,

Please can you put a break point and see if the data is getting updated in outptu 'it' (ur sum)?

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya,

I guess by <b>output 'it' (ur sum)</b> you mean sum field in structure 'res' declared in my report i.e. result sum which is INCOMING to proxy from RFC, right ?

Well, it is not getting updated. I cheked this using a breakpoint, and that's why I am stuck up.

Regards,

Message was edited by: Shankar Bhate

Former Member
0 Kudos

Hi all,

Well, my problem is solved. I had done a silly mistake, but that proved to be a good learning for me...

In HTTP - XI - RFC scenario, where both the interfaces are synchronous, I had done only request message mapping but NOT response message mapping.

However, this didn't create the problem when I tested through HTTP client. Whatever was the result returned by RFC, it was simply passed through XI - <b>without any mapping</b> and directly displayed backed in HTTP client in XML form only. Hence I didn't come to know about my mistake.

But when I used ABAP proxy, it gave error because response message from RFC was not mapped into proxy's message format.

I searched for meaning of the error that I got viz.

<b>Error during XML => ABAP Conversion (Response Message; Error ID:CX_ST_GROUP_MISSING_CASE</b>

This error comes when there is problem in "deserializing" i.e. during conversion of message from XML to ABAP.

Anyways, thanks to all for your prompt help..

Regards,

Former Member
0 Kudos

Hi Shankar

I am facing same error (but in BW) that you faced few months back. Could you please elaborate more on deserializing and what should be done to resolve it?

Thanks

Rajesh

Former Member
0 Kudos

Hi Shankar,

Please can you check that the sum data is coming from the RFC in your Response message correctly.

YOu can actually put a breakpoint to check the data coming in output 'it'.

IF yes then your write statement is incorrect.

Regards

Vijaya

Former Member
0 Kudos

Hi Vijaya Kumari

Yes, I have checked the payload of response message and it does contain the answer value.

In SXMB_MONI, when I saw details of response message, the sender service was the one that is actually the receiver service which I had created for RFC.

However, for this message (i.e. response of RFC), no information about receiver determination, interface determination is displayed, but only the following is shown in the left-side pane

XML Messgage

> Call Adapter (header, body, payloads)

> Request Message Mapping (header, body, payloads)

I think we should be able to see our actual sender service as the receiver service when viewed from RFC side.

Regards,