Skip to Content

Passing text message from external system to an RFC EXCEPTION

In function module CREDIT_CARD_SETTLEMENT the following DYNAMIC function module call exists:

  • ------ Send items for settlement to a RFC function -------------------



EXPORTING i_ccseth = i_ccseth

TABLES t_settab = t_settab

t_setexd_h = t_setexd_h

t_setexd_i = t_setexd_i

EXCEPTIONS system_failure = 01 MESSAGE rfc_msg_text

communication_failure = 02 MESSAGE rfc_msg_text

call_function_not_found = 03.

This is the code which calls an external credit card application server. I'm trying to figure out how, on the server side, I can return a message into the rfc_msg_text variable on the system_failure or communication_failure EXCEPTIONS.

I’ve found several examples of this construct in ABAP code in the SAP side – but I can’t for the life of me find anything that shows how to set this up in our external server.

There are several SAP function modules like RFC_PING that have similar constructs – but I can’t see the compiled C code to tell what command to use to fill in that text. I can raise the exception, just not fill in the text.

Any ideas?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 22, 2005 at 02:49 PM


    have you tried "RfcRaiseErrorMessage"? I never used that function by myself but it looks to me that it will fit to your demands.

    See also ""

    Regards Martin

    SAP RFC API documentation:


    RFC_RC SAP_API RfcRaiseErrorMessage(RFC_HANDLE handle, rfc_char_t * exception, RFC_TABLE * tables, rfc_char_t * szErrorMsg)

    This function is used to raise an exception and send back an error message.

    Defined in: SAPRFC.H

    <b>Return Value</b>




    <i>RFC connection handle</i>


    <i>exception to be raised (zero terminated string).</i>


    <i>tables parameters as received by RfcGetData.</i>


    <i>Error message to be sent to the caller. The maximum length of the message is 200.</i>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.