Messaging across SAP client using function module th_popup and ,how to calling transaction code from a program
11:41 PM
Ever wanted to send message across use this function! huhu
th_popup
with a little bit of programming you can make a program to call the function Example
*&---------------------------------------------------------------------*
*& program to call function and to message sy-uid *
*& Function module th_popup is being called *
*&---------------------------------------------------------------------*
REPORT Y_MARK_CALLFUNCTION.
* include section -----------------------------------------------------
* declaration part ----------------------------------------------------
TABLES: SSCRFIELDS,UINFO.
DATA : CLIENT type sy-MANDT.
SELECTION-SCREEN BEGIN OF BLOCK BLK01 WITH FRAME TITLE TEXT-T01.
SELECTION-SCREEN SKIP.
PARAMETERS: "CLIENT LIKE SY-MANDT OBLIGATORY,
USER LIKE SY-UNAME OBLIGATORY,
MESSAGE LIKE SM04DIC-POPUPMSG OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK BLK01.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (20) EXECUT USER-COMMAND EXECUT MODIF ID A.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
CLIENT = SY-MANDT."SY-SYSID.
AT SELECTION-SCREEN OUTPUT.
MOVE 'Send by' TO EXECUT.
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM EQ 'EXECUT' OR SSCRFIELDS-UCOMM is initial.
SSCRFIELDS-UCOMM = 'ONLI'.
ENDIF.
* main program -------------------------------------------------------
START-OF-SELECTION.
concatenate MESSAGE 'from' SY-UNAME into MESSAGE separated by space.
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = CLIENT
USER = USER
MESSAGE = MESSAGE.
IF SY-SUBRC <> 0.
ENDIF.
RETURN.
END-OF-SELECTION.
th_popup
with a little bit of programming you can make a program to call the function Example
*&---------------------------------------------------------------------*
*& program to call function and to message sy-uid *
*& Function module th_popup is being called *
*&---------------------------------------------------------------------*
REPORT Y_MARK_CALLFUNCTION.
* include section -----------------------------------------------------
* declaration part ----------------------------------------------------
TABLES: SSCRFIELDS,UINFO.
DATA : CLIENT type sy-MANDT.
SELECTION-SCREEN BEGIN OF BLOCK BLK01 WITH FRAME TITLE TEXT-T01.
SELECTION-SCREEN SKIP.
PARAMETERS: "CLIENT LIKE SY-MANDT OBLIGATORY,
USER LIKE SY-UNAME OBLIGATORY,
MESSAGE LIKE SM04DIC-POPUPMSG OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK BLK01.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (20) EXECUT USER-COMMAND EXECUT MODIF ID A.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
CLIENT = SY-MANDT."SY-SYSID.
AT SELECTION-SCREEN OUTPUT.
MOVE 'Send by' TO EXECUT.
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM EQ 'EXECUT' OR SSCRFIELDS-UCOMM is initial.
SSCRFIELDS-UCOMM = 'ONLI'.
ENDIF.
* main program -------------------------------------------------------
START-OF-SELECTION.
concatenate MESSAGE 'from' SY-UNAME into MESSAGE separated by space.
CALL FUNCTION 'TH_POPUP'
EXPORTING
CLIENT = CLIENT
USER = USER
MESSAGE = MESSAGE.
IF SY-SUBRC <> 0.
ENDIF.
RETURN.
END-OF-SELECTION.
How to debug a dialog screen
11:36 PM
Ever came to a screen where you cant manually enter the transactioncode "/h" ?
Now you can use the tips below.
1. Save the below command in a text file and paste the below coding
[FUNCTION]
Command=/H
Title=Debugger
Type=SystemCommand
2. Drag and drop onto the screen and walla! Debug mode on!
------------------------
tips you can play with the Command and put your own customized / standard transaction code! :D
Thanks to my colleague Ghaffar!
Now you can use the tips below.
1. Save the below command in a text file and paste the below coding
[FUNCTION]
Command=/H
Title=Debugger
Type=SystemCommand
2. Drag and drop onto the screen and walla! Debug mode on!
------------------------
tips you can play with the Command and put your own customized / standard transaction code! :D
Thanks to my colleague Ghaffar!