‎2013 Oct 08 9:52 AM
Hello All,
We have a situation. We are throwing an express message. it is just for information. We are throwing it cause it is generating in different LUW and we can not throw normal message from different LUW (my previous post).
The problem we are facing is that the message only appear after user does some action. We want to throw it immediately.
Is there any code or function module that performs an event (just enter event is also good).
We have already tried SAPGUI_SET_FUNCTIONCODE. It is not solving the problem.
My question is simple. Is there any way that we can press enter by using code or function module.
Thanking you in advance.
Regards
Apoorv Lohani
‎2013 Oct 08 2:03 PM
Hi Apoorv,
If suppose the function code of your enter key is 'ENTER', use the following code
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'ENTER'.
‎2013 Oct 08 4:14 PM
Tried it. It is not working. Thanks for the input.
Regards
Apoorv Lohani
‎2013 Oct 08 2:51 PM
‎2013 Oct 08 4:08 PM
We have tried this but it is not working.
Thanks for the answer.
Regard
Apoorv Lohani
‎2013 Oct 08 4:16 PM
DATA: ls_sotxtinfo TYPE sotxtinfo, "To show message
ls_soos7 TYPE soos7,
lt_soos7 TYPE STANDARD TABLE OF soos7.
CLEAR ls_sotxtinfo.
ls_sotxtinfo-msgid = 'ZTNC'.
ls_sotxtinfo-msgno = '002'.
CLEAR ls_soos7.
ls_soos7-recnam = sy-uname.
APPEND ls_soos7 TO lt_soos7.
" Func to throw message
CALL FUNCTION 'SO_EXPRESS_FLAG_SET'
EXPORTING
client = sy-mandt
text_info = ls_sotxtinfo
procdirect = 'X'
singlentry = ' '
inbox = ' '
popup_title = 'Account'
call_at_once = 'X'
* IMPORTING
* SENT_TO_ALL =
TABLES
rec_tab = lt_soos7
EXCEPTIONS
no_receiver_exist = 1
office_name_error = 2
OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
After this some thing should be there to stop and pop up the express message.
‎2013 Oct 08 4:21 PM