‎2008 Sep 04 6:51 AM
Hi experts,
I need to write a program which can pop up after i generate the program.
In my selection screen there is one input field sy-uname.
The pop up should appers according the user name in their system.
example:
selection screen.
username : user1
message : hello
Output:
This message " hello" should appears as pop up at the user1 computer only.
How this issue can be done.
Please guide me.
Thank you in advanced.
‎2008 Sep 04 6:53 AM
Try 'TH_POPUP'.
Pass CLIENT,USER and MESSAGE to this FM. It will give popup only to that particular user.
Regards,
Aparna Gaikwad
‎2008 Sep 04 6:53 AM
Try 'TH_POPUP'.
Pass CLIENT,USER and MESSAGE to this FM. It will give popup only to that particular user.
Regards,
Aparna Gaikwad
‎2008 Sep 04 6:56 AM
HI,
Kindly go through the function module below.
&----
*& Form POPUP_MSG
&----
FORM POPUP_MSG.
DATA: L_MSG LIKE SM04DIC-POPUPMSG VALUE 'Experimental Message',
L_LEN TYPE I,
L_RET TYPE C.
LOOP AT T_USER WHERE SELECTION = 'X'.
PERFORM GET_MESSAGE CHANGING L_MSG L_RET.
EXIT.
ENDLOOP.
IF L_RET = 'A'. "User cancelled the message
EXIT.
ENDIF.
Get the message text
L_LEN = STRLEN( L_MSG ).
LOOP AT T_USER WHERE SELECTION = 'X'.
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = T_USER-MANDT
USER = T_USER-BNAME
MESSAGE = L_MSG
MESSAGE_LEN = L_LENGTH
CUT_BLANKS = ' '
EXCEPTIONS
USER_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE: 'User ', T_USER-BNAME, 'not found.'.
ENDIF.
ENDLOOP.
IF SY-SUBRC <> 0.
Big error! No user has been selected.
MESSAGE ID 'AT' TYPE 'E' NUMBER '315' WITH
'No user selected!'.
EXIT.
ENDIF.
ENDFORM. " POPUP_MSG.
[http://www.sap-img.com/fu013.htm]
Please let me know of you Still have any doubts.
Regards,
Amit.
‎2008 Sep 04 7:00 AM
Hi Saravannan,
Try the function module:
POPUP_TO_INFORM
Regards,
Chandra Sekhar
‎2008 Sep 04 7:12 AM
Hi
*"Selection screen elements............................................
SELECTION-SCREEN BEGIN OF BLOCK blk with frame.
PARAMETERS:
p_uname TYPE sy-uname. " Username
SELECTION-SCREEN END OF BLOCK blk.
*"--------------------------------------------------------------------*
* AT SELECTION-SCREEN ON p_uname *
*"--------------------------------------------------------------------*
AT SELECTION-SCREEN ON p_uname.
PERFORM display_username.
*"--------------------------------------------------------------------*
* START-OF-SELECTION Event *
*"--------------------------------------------------------------------*
START-OF-SELECTION.
PERFORM display_user_details.
*&---------------------------------------------------------------------*
*
*& Form display_username
*&---------------------------------------------------------------------*
* This subroutine validates the user entry on selection screen
*----------------------------------------------------------------------*
* This subroutine does not have interface parameters to pass
*----------------------------------------------------------------------*
FORM display_username.
IF p_uname NE sy-uname.
MESSAGE 'Invalid username' TYPE 'E'.
else.
message 'HELLO' TYPE 'I'.
ENDIF. " IF p_uname...
ENDFORM. " display_username
*&---------------------------------------------------------------------*
*& Form display_user_details
*&---------------------------------------------------------------------*
* This subroutine displays the user details.
*----------------------------------------------------------------------*
* This subroutine does not have interface parameters to pass
*----------------------------------------------------------------------*
FORM display_user_details .
WRITE:
/ 'Username:', p_uname.
ENDFORM. " display_user_detailsRegards,
Sravanthi
‎2008 Sep 04 8:06 AM
HI Experts,
Thanks a lot for your reply.
I managed to solved based to your tips.
Thank you very much.
regards,
mrsara27.....