‎2006 Jun 13 4:53 AM
Hi all,
I used RS_FUNCTION_COPY to create a new copy of an
existing FM and then I used RS_FUNCTION_ACTIVATE on a
function Module to activate it. It returns an error code
indicating exception MESSAGE_SEND.
But when i use SE37 to go to that transaction, it is
activated. What is the reason behind the exception??
Sample Code:
CALL FUNCTION 'RS_FUNCTION_COPY'
EXPORTING
DARK_FLAG = 'X'
NEW_GROUP = L_NEW_FG
NEW_NAME = L_FM_NAME
OLD_NAME = L_SAMPLE_FM_NAME
SUPPRESS_DEACTIVATE = 'X'
ASK_ACTIVE_OR_INACTIVE = ' '
SUPPRESS_COPY_DOCU = ' '
"IMPORTING
"NEW_GROUP =
"NEW_NAME =
EXCEPTIONS
ERROR_MESSAGE = 1
CANCELLED = 2
OTHERS = 3
.
CALL FUNCTION 'RS_FUNCTION_ACTIVATE'
EXPORTING
ACTION = 'X'
CORR_INSERT = 'X'
FUNCNAME = L_FM_NAME
"WITH_POPUP = ' '
SUPPRESS_WORKING_AREA = 'X'
OBJECT_SAVED = 'X'
EXCEPTIONS
CANCELLED = 1
CANCELED_IN_CORR = 2
EDITOR_NAVIGATION_FLAG = 3
-
> MESSAGE_SEND = 4
NOT_FOUND = 5
NO_ACTION = 6
PERMISSION_FAILURE = 7
OTHERS = 8
.
Thanks in advance.
‎2006 Jun 13 5:21 AM
The exception MESSAGE_SEND is coming from the FM RS_FUNCTION_ACTIVATE.See the include MS38LFFU and put a breakpoint in the form fu_function_ex_activate.The return parameter ACTION if set to 0 raises this exception.Put a breakpoint inside this form and check for the value of ACTION.See why it's getting set to 0 and you will get to know the reason behind the exception.
‎2006 Jun 13 6:10 AM
Hi,
What is the value of FM ariable "L_FM_NAME" in your code.
See if the FM "L_FM_NAME" is already active then it will raise the exception MESSAGE_SEND". So pls. check this.
Regs,
venkat Ramanan