In function module CREDIT_CARD_SETTLEMENT the following DYNAMIC function module call exists:
------ Send items for settlement to a RFC function -------------------
CALL FUNCTION l_fnset
DESTINATION l_rfcset
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.
Ive found several examples of this construct in ABAP code in the SAP side but I cant 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 cant 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?
Eric
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 "http://help.sap.com/saphelp_nw04/helpdata/en/22/04280f488911d189490000e829fbbd/frameset.htm"
Regards Martin
SAP RFC API documentation:
<b>RfcRaiseErrorMessage</b>
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>
RFC_OK or RFC_FAILURE.
<b>Parameters</b>
handle
<i>RFC connection handle</i>
exception
<i>exception to be raised (zero terminated string).</i>
tables
<i>tables parameters as received by RfcGetData.</i>
szErrorMsg
<i>Error message to be sent to the caller. The maximum length of the message is 200.</i>
Add a comment