on 09-26-2007 2:28 PM
Hi,
Iam implementing Proxy to Proxy scenario where if any exception occurs on Inbound Proxy iam catching the exception using below statement
RAISE EXCEPTION TYPE ZKIRCX_MT_FAULT_MESSAGE
EXPORTING
standard = e_standard_data
If i want to display this error message on the sender side(inside the report used for triggering proxy) Iam getting dump.
Can anyone help me how to display this error data.
Hi,
have you never try to insert your code a TRY and Catch?
regards
Claudio.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Claudio,
Below u can find my report
REPORT ZCONVERT_TEMP_CEL_TO_FAREN.
*parameters
PARAMETERS Celesius TYPE string.
*Type for outbound proxy
DATA: proxy_output_cel TYPE ZKIRMT_TEMP_CELSIUS,
proxy_input_fer TYPE ZKIRMT_TEMP_FARENHEIT.
*Type for the called class and caught exception
DATA: client_proxy TYPE REF TO ZKIRCO_MI_TEMP_OB,
sys_exception TYPE REF TO cx_ai_system_fault,
error TYPE REF TO ZKIRCX_MT_FAULT_MESSAGE,
app_exception TYPE REF To cx_ai_application_fault.
*Transfer Screen Parameter to Export Parameter
proxy_output_cel-MT_Temp_Celsius-Celesius = Celesius.
WRITE:/ 'Starting Proxy Call'.
*Create Proxy Object and Call the method
CREATE OBJECT client_proxy().
TRY.
CALL METHOD client_proxy->execute_synchronous
EXPORTING
OUTPUT = proxy_output_cel
IMPORTING
INPUT = proxy_input_fer.
WRITE:/ 'Finished call for Proxy Method'.
WRITE:/ 'Temperature in Farenheit is:', proxy_input_fer-MT_Temp_Farenheit-Farenheit.
CATCH CX_AI_SYSTEM_FAULT INTO sys_exception.
WRITE:/ 'System fault encountered: '.
WRITE:/ sys_exception->errortext.
CATCH ZKIRCX_MT_FAULT_MESSAGE INTO app_exception.
WRITE:/ 'Error from Receiver:'.
<b>WRITE:/ error->standard-fault_text</b>.
CATCH CX_AI_APPLICATION_FAULT INTO app_exception.
WRITE:/ 'Application fault encountered: '.
WRITE:/ app_exception->textid.
ENDTRY.
An explicit commit work is required to initiate synchronous call.
COMMIT WORK.
U can find in the above code iam handling my error inside Try and Catch block.
But when i execute iam getting dump for the statement WRITE:/ error->standard-fault_text
Use fault messages.
See this
http://help.sap.com/saphelp_nw04/helpdata/en/5d/a45c3cff8ca92be10000000a114084/frameset.htm
/people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.