-
Notifications
You must be signed in to change notification settings - Fork 0
/
consumeWS.abap
26 lines (21 loc) Β· 936 Bytes
/
consumeWS.abap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
*-- This code is calling the exposed Function Module in the snippet of 'BT Creation'.
*-- Found here: https://gist.github.com/svict4/d64fa12613415ab94afd1ee98a82c881
DATA: lo_proxy TYPE REF TO zsapco_zsrv_XXXXXX,
ls_service_output TYPE zsapzfm_XXXXXX_servresponse,
ls_service_input TYPE zsapzfm_XXXXXX_serv.
TRY.
*-- Create an instance of the ABAP Proxy class
CREATE OBJECT lo_proxy.
*-- In this case, the WS takes the process type of a transaction to be
* created as well as the description. The WS then creates a transaction
* appropriate and returns the objectid in the response.
ls_service_input-iv_process_type = 'SRVR'.
ls_service_input-iv_description = 'Test'.
CALL METHOD lo_proxy->zfm_tbo475_serv
EXPORTING
input = ls_service_input
IMPORTING
output = ls_service_output.
CATCH cx_ai_system_fault.
" This must be caught when using ABAP Proxies.
ENDTRY.