cancel
Showing results for 
Search instead for 
Did you mean: 

Service Call

Former Member
0 Kudos

HI

I have created a new service by transaction 'SICF' for transaction VF02.

Now i want to call this service when i press a button.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

i guess you are done with all the procedure of creating a webservice then the proxy setting , logical port settings , etc.

tables : spfli.

DATA: proxy TYPE REF TO zco_zgetflightdet19_wsd,

OUTPUT type ZZGETSFLIGHTDETRESPONSE ,

INPUT type ZZGETSFLIGHTDET .Data : sys_fault type ref to cx_ai_system_fault,

app_fault type ref to cx_ai_application_fault.

eg. Data : itab type spfli.

parameters : p_carrid type spfli-carrid,

p_connid type spfli-connid.

start-of-selection.

TRY.

CREATE OBJECT proxy

exporting

LOGICAL_PORT_NAME = '<logical port name given by use eg. ZCO_ZGETFLIGHTDET19_WSD>' .

CATCH cx_ai_system_fault .

create object sys_fault.

write 😕 'error at level 1', sys_fault->errortext.

exit.

ENDTRY.TRY.

input-carrid = p_carrid.

input-connid = p_connid.

CALL METHOD proxy->zgetsflightdet

EXPORTING

input = input

IMPORTING

OUTPUT = output

.

CATCH CX_AI_SYSTEM_FAULT .

create object sys_fault.

write 😕 'error at level 2', sys_fault->errortext.

exit. CATCH ZCX_EXCEPTION00 .

CATCH CX_AI_APPLICATION_FAULT .

write : 'error 3'.

exit.ENDTRY.

write : / 'TEST RESULTS OF CLIENT APPLICATION RUNNING ON YHSAPX05'.

WRITE : / 'THE CLIENT APPLICATION CALLS THE WEBSERVICE LOCATED ON YHSAPI01 SYSTEM'.

Hope this will help you!!!

Thanks & Regards,

Punit Raval.

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Please be specific as to what type of "service" you are refering to. Is this an ITS Server (GUI based interface) or a Web Service (SOAP Runtime)?