Skip to Content
0

SAP PI - Integration does not work when execute method generated by SPROXY

May 31, 2017 at 01:59 AM

75

avatar image

Hi,

I have a synchronous outbound ABAP proxy.

The scenario is as follow: SAP ECC - XI - Oracle Database

The client proxy is generated in SAP ECC and I call the proxy with following code:

DATA oref TYPE REF TO cx_ai_system_fault.
DATA: ls_server_context TYPE REF TO if_ws_server_context.
DATA: lo_payload_protocol TYPE REF TO if_wsprotocol_payload.
DATA: lo_payload TYPE REF TO if_ws_payload.
DATA text TYPE string.
DATA wa_owner(30) TYPE c.

CREATE OBJECT po.

lo_payload_protocol ?= po->get_protocol( if_wsprotocol=>payload ).
CALL METHOD lo_payload_protocol->announce_payload_consumption( ).

CONCATENATE 'SELECT msg FROM#' wa_owner '.ZVW_INV_FISICO WHERE NUM_INVENTARIO=' '''' p_invwms-low '''' INTO wa_query.
TRANSLATE wa_query USING '# '.
output-inv_by_elements_query-centro = p_werks.
output-inv_by_elements_query-sentencia_sql = wa_query.

TRY.

CALL METHOD po->consultar_toma_inventario_out
EXPORTING
output = output
IMPORTING
input = input.

CATCH cx_ai_system_fault INTO oref.
text = oref->get_text( ).
lo_payload = lo_payload_protocol->get_sent_response_payload( ).
MESSAGE text TYPE 'I'.
ENDTRY.

t_detalle = input-SQLINV_BY_ELEMENTS_QUERY_RESPO-statement_select_inv_response-row.

I've tested the connection in SPROXY and it works fine. The connection between SAP - XI - Oracle database is working fine.

I get NO error when I call the method of class generated by proxy but nothing arrives to XI to SAP ECC - in "input" parameter of method "consultar_toma_inventario_out".

In SXMB_MONI all is correct. The data are recovered from database and avaiable at XML of inbound and outbound interface.

But when I run the method of class generated by SPROXY the data does not are returned to SAP ECC layer.

I really don't know where to look? Havn't I done everything?

What's wrong?

Can somebody help me?

Thanks in advance.

Regards,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Apu Das May 31, 2017 at 04:38 AM
0

Debug your report which is calling PI proxy and check whether you are getting the response in your report or not.

Thanks,

Apu

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Apu,

I debugged the program and identified that in the deserialization process the XML used does not have the data (tags) populated with the SELECT result in the Oracle database.

In other words, when reading the result the XML is not yet filled with the result. And as I mentioned when reporting the error, at the end the result is received in the outbound interface XML.

Do you have any other suggestions?

Thanks a lot for the help.

0

Is your response message mapping working fine? Can you see response back in SXMB_MONI of PI as well as in ECC?

Thanks,

Apu

0