cancel
Showing results for 
Search instead for 
Did you mean: 

a question about XI Message Record

Former Member
0 Kudos

Hi,

Now i have a question about XI. How to realise the following function:

I receive an XI message, and i want to check some fields of the XML Message in the inboudn agent.

If one of these fields is empty,it should be a record with "system error" icon in the SXMB_MONI; otherwise it should be a record with "processed successfully" icon.

now i do like this:

1. in IF_SPAF_INB_PROCESS_AGENT~CHECK_MESSAGE:

....

ls_t100-attr1 = ' ***can't be empty'. " My error description

ls_t100-msgid = ***. "My Message Class

ls_t100-msgno = '000'.

....

CREATE OBJECT lr_msg

EXPORTING

textid = ls_t100

severity = 'E'.

in_message_handler->add_agent_message( lr_msg ).

out_error_occurred = abap_true.

2. in IF_SPAF_INB_PROCESS_AGENT~PERFORM_ERROR_HANDLING:

....

CALL METHOD cl_ap_process_agent_tools=>create_fault_message

EXPORTING

in_wf_triggered = in_wf_triggered

in_automatic_retry = in_automatic_retry

in_agent_class_name = lc_agent_class_name " agent class name

IMPORTING

out_exception = out_exception

CHANGING

in_message_list = in_message_list.

After receiving inbound message with empty field, i got a record in the SXMB_MONI with 'Recorded' icon. Furthermore, in the record, i can't find the error message i raised.

How to get an 'system error' record with my error messge in the soap header.

Who can help me on the issue.

Thanks in advance.

Johnney.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Get Solution from internal colleague

Former Member
0 Kudos

Hi Johney,

How about raising exception in Graphical mapping itself? if raise an exception base on your condition status would of the message would be red.

You can check and raise an exception using UDF. Write small UDF which wull check the value and raise exception if value is empty. You can capture this error message and send to alert inbox if require.

Let me know if you need more details.

Former Member
0 Kudos

Hi Nilesh,

Could you please give me more detail about how to use UDF in the inbound agent.

Or could you give me an example about how to use it.

Thanks

Johnney

Former Member
0 Kudos

Hi Johnney !

Try to return an exception in the ABAP code in the inbound. It should raise a system error message in the sxmb_moni.

Regards,

Matias.

Former Member
0 Kudos

Hi Matias,

which method should i return exception in,

IF_SPAF_INB_PROCESS_AGENT~CHECK_MESSAGE

or

IF_SPAF_INB_PROCESS_AGENT~PERFORM_ERROR_HANDLING ?

Another question,

whant kind of exception should i raise, SAP Standard exception or exception defined be me?

Thanks,

Johnney