Sie sind auf Seite 1von 4

Creating OUTBOUND Proxy

Click on Source-ESR-SWCs and the name space Nketsi gives. It SHOULD ALWAYS be under

IMPALA_I_ERP, 1.0 of impalaplats.co.za

Double click and generate the proxy SI_DUMMYEXAMPLE_OUT


Save and activate

Writing the Proxy program on OUTBOUND Proxy:

Se38 -> ZPROXYEAMPLE


*&---------------------------------------------------------------------*
*& Report ZPROXYEAMPLE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZPROXYEAMPLE.

START-OF-SELECTION.
*------------------
* perfor get_data.
PERFORM process_data.

END-OF-SELECTION.

*&---------------------------------------------------------------------*
*& Form PROCESS_DATA
*&---------------------------------------------------------------------*
FORM process_data .
DATA: output TYPE ZIRSPFSGET_WEIGHTS1,
input TYPE ZIRSEXECUTE_SQLRESULT1,
proxy TYPE REF TO ZEHSCO_SI_DUMMYEXAMPLE_OUT,
lv_exception1 TYPE REF TO cx_ai_system_fault,
lv_exception2 TYPE REF TO cx_ai_system_fault,
lv_appfault TYPE REF TO cx_ai_application_fault.

* Instantiate proxy and create contract output data.


TRY.
CREATE OBJECT proxy.
COMMIT WORK AND WAIT.
CATCH cx_ai_system_fault INTO lv_exception1.
COMMIT WORK AND WAIT.
ENDTRY.

*** BUILD OUTPUT with selected data.


*EXAMPLE:
* CLEAR: output, input,lwa_update.
* output-pfssend_contracts-konnr = lwa_contract-konnr.
* output-pfssend_contracts-matnr = lwa_contract-matnr.
* output-pfssend_contracts-creation_date = lwa_contract-creation_date.
* output-pfssend_contracts-creation_time = lwa_contract-client_desc.
* output-pfssend_contracts-client_desc = lwa_contract-client_desc.
* output-pfssend_contracts-abmass = lwa_contract-abmass.
* output-pfssend_contracts-plsc_01 = lwa_contract-plsc_01.
* output-pfssend_contracts-net_mass_variance = lwa_contract-
net_mass_variance.

* CALL PROXY SYNCHRONOUSLY. IF ASYNC OUT, OMIT THE IMPORTING


TRY.
CALL METHOD proxy->SI_PFSGET_WEIGHTS_OUT
EXPORTING
output = output
IMPORTING
input = input.
COMMIT WORK AND WAIT.
CATCH cx_ai_system_fault INTO lv_exception2.
CATCH cx_ai_application_fault INTO lv_appfault.
COMMIT WORK AND WAIT.

ENDTRY.

ENDLOOP.
ENDFORM.

Das könnte Ihnen auch gefallen