Useful Function Modules

 

This is an article listed few of the SAP function Modules, which are available in the system and can be used for various purposes, Some of them are left undocumented, which are left for further exploration. User may explore them and find out how useful they can be for their purposes. 

1 .WS_DOWNLOAD: File transfer from internal table into presentation server file.

2. WS_UPLOAD: File transfer from presentation server file to internal table. This function Module transfers file from workstation to SAP System. Pass on the name of ASCII file user wants to upload and that gets uploaded in memory.

3. WS_EXECUTE: This function can be used to execute any executable program from your presentation server to SAP Server.

4. WS_FILE_COPY: This function takes destination file name and source file name as parameters and then copies existing file to the new file.

5. TH_CREATE_MODE: This function creates another session in your system with the transaction passed as parameter to the function module.

6. SYSTEM_DEBUG_BREAKPOINTS / RS_DELETE_BREAKPOINT: The First function module returns the number of breakpoint there in the Program with the line number on which the break point is set. Another Function uses the earlier Function Module.

7. EDITOR_SYNTAX_CHECK: This can be used to check if they’re in any syntax error in the program code.

8. SAPWL_REPORT_TCODE_TEXT_COPY: the Function module returns the Description / text for transaction or report name passed as an input parameter.

9. RS_DYNPRO_UPLOAD/DOWNLOAD: We can upload and download screens also the way we upload and download reports With the help of these functions.

10. RS_HELP_SELSCREEN: This function calls the specified help screen.

11. RS_ALL_SELECTIONSCREENS: This function returns the selection screen for the report program.

12. RS_WARNING_BOX: This function displays pop-up warning window for the situation gives and with the text. If situation = ‘ ‘ it displays the text passed by user otherwise it takes the text specified in the function module. It displays the message after the user selects either of the condition YES/NO/CANCEL.

13. RSPO_PROCESS_FRONTEND_JOBS: The function Module processes the entire spool request for the foreground jobs for any terminal.

14. SOUND_CREATE

15. SOUND_PLAY

16.SOUND_STOP

17. SO_DYNP_SHORT_MESSAGE: This function initiates the E-mail sender window and sends the mail to user passed as a parameter.

18. SO_DYNP_OBJECT_SEND/SO_GOTO_SEDN_DYNP: the function calls the screen where user selects the user name from the drop down menu and sends the message.

19. SO_INBOX_ENTRIES_COUNT: SAPuser whose inbox is to be viewed has to passed as a parameter and this function counts read/unread/Total messages in the inbox.

20. SO_FAX_DATA_DYNPRO: This function module is used to send fax via SAP System.

21. SO_OFFICE_USER_INSERT:

22. SO_RECEIVER_CHECK: The function checks if the user exists or not.

23. SO_USER_INSERT_ASYNCHRON:

24. SO_USER_DELETED_CHANGE:

25. SO_USER_AUTOMATIC_INSERT:

26. SO_USER_SO_KEY_GENERATE:

27. SO_USER_ADDR_REFERENCE_CHANGE:

28. SO_USER_USRADR_UPDATE:

29.  POPUP_WITH_WARNING: The Function can be used to display a warning and continue the job with 2 lines of display text and an option button to continue.

30.POPUP_FOR_INTERACTION: The popup gives user 3 option buttons and 6 lines of text for display on the screen and the advantage is user can change the display Icon according to Requirement (W: Warning, I: Information, E: Error) etc.

31. POPUP_TO_DECIDE: User gets 3 lines of text and 3 options to choose from (YES/NO/CANCEL).

32. POPUP_TO_DECIDE_WITH_MESSAGE: user gets 6 lines of message to be displayed on the screen with 3 option button same as above.

33.POPUP_TO_GET_ONE_VALUE/POPUP_TO_FETCH_ONE_VALUE: using this function module user can pass on any string value to the program with 3 lines of text and 2 options.

34.  POPUP_TO_GET_VALUE: This function can be used in a program to return some value to user through a popup on the screen.

35. POPUP_TO_CONFIRM_STEP/POPUP_TO_DECIDE_INFO: This function gives 2 lines of text and 2 option buttons for confirmation.

36. POPUP_TO_CONFIRM_DATA_LOSS: the function can be used as information window with a system defined message text.

37.  CHANGEDOCUMENT_READ_POSITIONS: The function module is used to return the old/new values of the amended purchase order by passing the change no. / Table name (that’s Modified) and the Table Key (Concatenated Field that had client id + Purchase Order no + Purchase Item etc).
It will return all the changes made if we pass on the change no only.
Look at table CDPOS / CDHDR for the values to be passed.

38.  Z_BATCH_CHAR: The function module returns most of the batch characteristics passing the material and batches no. The function is used in many reports to improve their performances.

39.  SAPGUI_PROGRESS_INDICATOR / Z_PROGRESS: These function modules can be used to display a Progress bar while the Program is in execution.

40. SAPGUI_SET_FUNCTIONCODE: Set a function code and continue processing (To be explored)

41.  SAPGUI_EXPLORER_INPUT / OUTPUT: Has to be explored (not activated in our system) May be of vital importance for Programming.

41: CUSL_BATCH_HAS_VALUES: (To be explored further)

Import parameter Ref. field/struc
MATERIAL MARA-MATNR *
PLANT MARC-WERKS
BATCH MCHA-CHARG
BATCH_CUOBJ INOB-CUOBJ
CLASSTYPE KLAH-KLART *
BATCH_TABLE TCLA-OBTAB *
LANGUAGE SY-LANGU (EN)

(*) Is mandatory entry.

42. CLSE_SELECT_AUSP: Database access for table AUSP

Import parameter Ref. field/struc
KLART AUSP-KLART
OBJEK AUSP-OBJEK
ATINN AUSP-ATINN
MAFID AUSP-MAFID
KEY_DATE RMCLS-KEY_DATE
ATCOD AUSP-ATCOD

43. CLSE_SELECT_CABN:

44. CLSE_SELECT_CABNT: Read and buffer CABNT entries for classification system

45. CLSE_SELECT_KLAH:

46. CLSE_SELECT_KSSK:

47. CLSE_SELECT_CAWN:

48. CLSE_SELECT_CAWNT:

49. REQUIREMENTS_DISPLAY_CHAR: Display of characteristic values in plnd indep. Reqmts /purchasing

50.  WS_FILENAME_GET: This function makes the windows browsing utility opened through SAP Program and user can browse through the presentation server to locate any file, providing the extension mask.

51. WS_FILE_DELETE: The function can be used to delete files from the presentation layer with windows operating system, providing the file name to be deleted.

4 thoughts on “Useful Function Modules”

Leave a Comment