‎2010 Feb 03 9:31 AM
Hi Experts,
I am calling a RFC Function Module inside an Update task function module in a delivery user exit.
In case the processing in the RFC FM fails, I need to display an information message to the user.
How do I handle displaying information message to the user inside an RFC FM?
I tried using simple informaton message inside the RFC FM , but this statement does not display a message to the user.
Thanks
‎2010 Feb 03 9:36 AM
Hello,
I tried using simple informaton message inside the RFC FM , but this statement does not display a message to the user.
It is not possible to do raise a message in an RFC FM & notify the user. Instead you can pass the message to a RETURN structure (something similar to BAPIRET).
In case the processing in the RFC FM fails, I need to display an information message to the user.
Based on the messages in the RETURN structure (as mentioned above) you can code for further actions.
BR,
Suahs
‎2010 Feb 03 9:46 AM
Hi,
Information message will not work inside the RFC function module or normal function module. So the code for calling information message has to be written inside the USER-EXIT program.
In your case, process the RFC function module and return the information message using structure called BAPIRET2. Then using these return message, write the MESSAGE statement in the INCLUDE program of your user-exit.
---
Prem
‎2010 Feb 03 9:52 AM
I tried to pass the message by appending into the ineternal table of type BAPIRET2, but my RFC FM is being called in a separate task inside an Update task FM.
How do I handle this one.
‎2010 Feb 03 10:02 AM
‎2010 Feb 03 10:25 AM
Hi
When you are using the update task you can pass the message to the user. Only way is to abort the process by triggering a message of type 'A'.
Regards
Ranganath
‎2010 Feb 03 11:17 AM
My problem is that, the RFC FM is being called from an Update task FM.
Thus I cannot use "raising exception" option.
‎2010 Feb 03 11:33 AM
Hi,
Use the following FM to populate the Information message..
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = 'Title'
text_question = 'Question ???'
text_button_1 = 'YES'
icon_button_1 = 'ICON_OKAY'
text_button_2 = 'NO'
icon_button_2 = 'ICON_CANCEL'
default_button = '1'
display_cancel_button = space
IMPORTING
answer = v_ans
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
‎2010 Feb 03 11:37 AM
Hi
As mentioned in my previous post, you can inform user by raising a "Abort" message, which is the only way you can terminate your update task FM. You can get more information about this from SAP Help as well.
Regards
Ranganath
‎2010 Feb 03 11:57 AM
Using Abort message in the update task FM, terminates it. But the same message is not displayed to the user.
‎2010 Feb 03 12:14 PM
Yes, Abort message will terminate the FM call. You cannot give a message to the user in Update task, as this is similar to a background job. Other option would be to give a log or send a message to Business Workplace of the user by a express message something like those sorts.
Regards
Ranganath