If you wish to POPUP a screen in SAP ABAP then it can be done as shown below. Do experiment with the X,Y co-ordinates for the POP-UP Screen. The following program pulls out sales orders from the sap database and displays them on the screen. When the user clicks on a particular sales order, it displays the Sales order number and the Customer number in the POP-UP Screen
SAP ABAP Function Module to Read Files and Directories from the Presentation Server
The following function module reads files and directories from the presentation server and stores it in the internal table. This fucntion module can be used to read all the files and directories from the entered directory.
TMP_GUI_DIRECTORY_LIST_FILES
Please find a program that shows the parameters that need to be passed to this function module.
REPORT ZEX_GETDIRFROMPRE .
Parameters: p_dir(100) type c.
Data: d_filecount type i, d_dircount type i, int_filetab like SDOKPATH occurs 0 with header line, int_dirtable like SDOKPATH occurs 0 with header line.
CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES' EXPORTING DIRECTORY = p_dir FILTER = '*.*' IMPORTING FILE_COUNT = d_filecount DIR_COUNT = d_dircount TABLES FILE_TABLE = int_filetab DIR_TABLE = int_dirtable EXCEPTIONS CNTL_ERROR = 1 OTHERS = 2 . IF SY-SUBRC <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.