SAP BC Functions





Functions Description
ABAP_DOCU_DOWNLOAD Download ABAP documentation in HTML format.
APPL_LOG_DISPLAY With this function module you can analyze logs in the database.
APPL_LOG_INIT This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
APPL_LOG_READ_INTERN With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
APPL_LOG_WRITE_DB With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.
APPL_LOG_WRITE_LOG_PARAMETERS With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.
APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory.
ARFC_GET_TID will return the IP address of the terminal in hex.
BAL_CNTL_FREE Release Control
BAL_DB_DELETE Delete logs from the database
BAL_DB_ENQUEUE Lock log
BAL_DB_LOAD Load log(s)
BAL_DB_SAVE Save log(s)
BAL_DB_SEARCH Find logs in the database
BAL_DSP_LOG_DISPLAY Display Log
BAL_DSP_LOG_TECHNICAL_DATA Output all log header data
BAL_DSP_MSG_PARAMETERS Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS)
BAL_DSP_OUTPUT_FREE End output
BAL_DSP_OUTPUT_SET_DATA Set dataset to be displayed
BAL_DSP_PROFILE_NO_TREE_GET Display without tree (fullscreen)
BAL_DSP_PROFILE_SINGLE_LOG_GET Standard profile (SLG1) for one log
BAL_GLB_AUTHORIZATION_GET Assign authorization
BAL_GLB_CONFIG_GET Read configuration
BAL_GLB_MEMORY_EXPORT Put function group memory in ABAP-MEMORY
BAL_GLB_MEMORY_REFRESH (Partially) reset global memory
BAL_GLB_MSG_CURRENT_HANDLE_GET Get current message handle
BAL_GLB_SEARCH_LOG Find logs in memory
BAL_LOG_CREATE Create log with header data
BAL_LOG_DELETE Delete log (from database also at Save)
BAL_LOG_HDR_CHANGE Change log header
BAL_LOG_HDR_READ Read log header and other data
BAL_LOG_MSG_ADD Put message in log
BAL_LOG_MSG_CHANGE Change message
BAL_LOG_MSG_CUMULATE Add message cumulated
BAL_LOG_MSG_DELETE Delete message
BAL_LOG_MSG_READ Read message and other data
BAL_LOG_REFRESH Delete log from memory
BAL_MSG_DISPLAY_ABAP Output message as ABAP-MESSAGE
BAL_OBJECT_SUBOBJECT Check whether object and subobject exist and the combination is allowed
BP_EVENT_RAISE Trigger an event from ABAP/4 program
CHANGEDOCUMENT_READ_HEADERS Get the change document header for a sales document, and put the results in an internal table.
CHANGEDOCUMENT_READ_POSITIONS Get the details of a change document, and store them in an internal table. This will tell you whether a field was changed, deleted, or updated.
CLAF_CLASSIFICATION_OF_OBJECTS Return all of the characteristics for a material
CLPB_EXPORT Export a text table to the clipboard (on presentation server)
COMMIT_TEXT To load long text into SAP
CONVERSION_EXIT_ALPHA_OUTPUT converts any number with zeroes right into a simple integer
CONVERT_OTF Convert SAP documents (SAPScript) to other types.
CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency
DATE_CHECK_PLAUSIBILITY Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
DATE_GET_WEEK will return the week that a date is in.
DATE_IN_FUTURE Calculate a date N days in the future.
DAY_ATTRIBUTES_GET Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuedsay), whether the day is a holiday, and more.
ENQUE_SLEEP Wait a specified period of time before continuing processing.
EPS_GET_DIRECTORY_LISTING return a list of filenames from a local or network drive
F4_DATE displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only.
F4IF_INT_TABLE_VALUE_REQUEST F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
F4IF_SHLP_EXIT_EXAMPLE documents the different reasons to use a search help exit, and shows how it is done.
F4IP_INT_TABLE_VALUE_REQUEST This function does not exist in 4.6 and above. Use F4IF_INT_TABLE_VALUE_REQUEST instead.
FM_SELECTION_CRITERIA_PRINT Print out selection criteria. Nicley formatted.
FTP_COMMAND Execute a command on the FTP server
FTP_DISCONNECT Close the connection (and log off) the FTP server
Function Group GRAP is now obsolete. SAP recommends using functions in function group SFES instead. Below is an overview of the changes.
GET_CURRENT_YEAR Get the current fiscal year.
GET_GLOBAL_SYMBOLS Returns a list of all tables, select options, texts, etc for a program. Even includes the text definitions for the selection screen
GET_JOB_RUNTIME_INFO Get the current job number from a program. Also returns other useful info about the current job.
GUI_CREATE_DIRECTORY Create a directory on the presentation server
GUI_DOWNLOAD Replaces WS_DOWNLOAD. Download table from the app server to presentation server
GUI_GET_DESKTOP_INFO Replaces WS_QUERY. Delivers Information About the Desktop (client)
GUI_REMOVE_DIRECTORY Delete a directory on the presentation server
GUI_UPLOAD Replaces WS_UPLOAD. Upoad file from presentation server to the app server
HELP_VALUES_GET_WITH_TABLE Show a list of possible values for F4 popup help on selection screens. This function module pops up a screen that is just like all the other F4 helps, so it looks like the rest of the SAP system. Very useful for providing dropdowns on fields that do not have them predefined.
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the date is a holiday by checking the parameter HOLIDAY_FOUND.
HR_DISPLAY_BASIC_LIST is an HR function, but can be used for any data. You pass it data, and column headers, and it provides a table control with the ability to manipulate the data, and send it to Word or Excel. Also see the additional documentation here.
HR_GET_LEAVE_DATA Get all leave information (includes leave entitlement, used holidays/paid out holidays)
HR_IE_NUM_PRSI_WEEKS Return the number of weeks between two dates.
CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.
CLPB_IMPORT Import a Text Table from the Clipboard (on presentation server)
CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right
CONVERT_ABAPSPOOLJOB_2_PDF convert abap spool output to PDF
CONVERT_OTFSPOOLJOB_2_PDF converts a OTF spool to PDF (i.e. Sapscript document)
DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
DATE_TO_DAY Converts a date in internal format to a text description of a day. For example 20030529 returns Thursday
DOWNLOAD download a file to the presentation server (PC)
DYNP_VALUES_UPDATE Similar to DYNP_VALUES_READ, this function will allow the updating of fields on a dynpro. Very useful when you want to change a field based on the value entered for another field.
ENQUEUE_ESFUNCTION Lock an abap program so that it cannot be executed.
EPS_GET_FILE_ATTRIBUTES Pass in a filename and a path, and will return attributes for the file
F4_IF_FIELD_VALUE_REQUEST Use values from a DDIC table to provide a list of possible values. TABNAME and FIELDNAME are required fields, and when MULTIPLE_CHOICE is selected, more than one value can be returned.
FILENAME_GET popup to get a filename from a user, returns blank filename if user selects cancel
FORMAT_MESSAGE Takes a message id and number, and puts it into a variable. Works better than WRITE_MESSAGE, since some messages use $ as a place holder, and WRITE_MESSAGE does not accommadate that, it only replaces the ampersands (&) in the message.
FTP_CONNECT Open a connection (and log in) to an FTP server
FU CSAP_MAT_BOM_READ You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.
G_SET_GET_ALL_VALUES Fetch values from a set.
GET_INCLUDETAB Returns a list of all INCLUDES in a program
GET_PAYSLIP Returns a fully formatted payslip, ready for displaying
GUI_DELETE_FILE Replaces WS_FILE_DELETE. Delete a file on the presentation server
GUI_EXEC Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec
GUI_RUN Start a File or Program Asynchronously with ShellExecute
HELP_START Display help for a field. Useful for doing AT SELECTION SCREEN ON VALUE REQUEST for those fields that do not provide F4 help at the DDIC level.
MS_EXCEL_OLE_STANDARD_OLE will build a file, and automatically start Excel
OTF_CONVERT wraps several other function modules. Will convert OTF to ASCII or PDF
POPUP_TO_CONFIRM_LOSS_OF_DATA Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data.
POPUP_TO_CONFIRM_STEP Create a dialog box in which you make a question whether the user wishes to perform the step.
POPUP_TO_CONFIRM_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point during an action.
POPUP_TO_CONFIRM_WITH_VALUE Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.
POPUP_TO_DECIDE Provide user with several choices as radio buttons
POPUP_TO_DECIDE_WITH_MESSAGE Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.
POPUP_TO_DISPLAY_TEXT Create a dialog box in which you display a two line message
POPUP_TO_SELECT_MONTH Popup to choose a month
POPUP_WITH_TABLE_DISPLAY Provide a display of a table for user to select one, with the value of the table line returned when selected.
PRICING Return pricing conditions in an internal table. Use structure TCOMK for parameter COMM_HEAD_1, and structure TCOMP for parameter COMM_ITEM_1, and set CALCULATION_TYPE to B. The pricing conditions will be returned in XOMV. You must fill TCOMP, and TCOMK with the appropriate values before callling the function in order for it to work.
PROFILE_GET Read an Entry in an INI File on the frontend
PROFILE_SET Write an Entry in an INI File on the frontend
READ_TEXT To load long text into SAP
REGISTRY_GET Read an Entry from the Registry
REGISTRY_SET Set an entry in the Registry
RH_DATA_COLLECTOR_ORGCHART get org info and put in tables suitable for displaying an org structure
RH_GET_ACTIVE_WF_PLVAR Return the active HR Plan
RH_GET_DATE_DAYNAME return the day based on the date provied
RH_READ_INFTY generic PD infotype read with authorization checks
RH_STRUC_GET Returns all related org info
RHP0_POPUP_F4_SEARK is a matchcode for any type of HR Planning object, including the possibility to fill the field that you want
RKD_WORD_WRAP Convert a long string or phrase into several lines.
RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
RP_LAST_DAY_OF_MONTHS Determine last day of month
RP_PNP_ORGSTRUCTURE Show a dialog box with the org structure displayed. User is then allowed to choose org units.
RPY_DYNPRO_READ Read dynpro, including screen flow
RPY_TRANSACTION_READ Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen.
RS_COVERPAGE_SELECTIONS Returns an internal table that contains a formatted list of all the selection parameters entered for a report. Table is ready to print out.
RS_REFRESH_FROM_SELECTOPTIONS Get the current contents of selection screen
RS_SEND_MAIL_FOR_SPOOLLIST Send message from ABAP/4 program to SAPoffice.
RS_VARIANT_CONTENTS Returns the contents of the specified variant in a table.
RSPO_DOWNLOAD_SPOOLJOB Download the spool from a program to a file. Requires spool number.
RSPO_RETURN_ABAP_SPOOLJOB Fetch printer spool according to the spool number informed.
RZL_READ_DIR If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server
RZL_READ_DIR_LOCAL Read a directory on the Application Server
RZL_READ_FILE Read a file from the presentation server if no server name is given, or read file from remote server. Very useful to avoid authority checks that occur doing an OPEN DATASET. This function using a SAP C program to read the data.
RZL_SLEEP Hang the current application from 1 to 5 seconds.
RZL_SUBMIT Submit a remote report.
RZL_WRITE_FILE_LOCAL Saves table to the presentation server (not PC). Does not use OPEN DATASET, so it does not suffer from authority checks.
SAP_CONVERT_TO_XLS_FORMAT Convert data to Microsoft Excel format.
SAPGUI_PROGRESS_INDICATOR Display a progress bar on the SAP GUI, and give the user some idea of what is happening
SAVE_TEXT To load long text into SAP
SCROLLING_IN_TABLE If you are coding a module pool and using a table control, you can use this function SCROLLING_IN_TABLE to handle any scrolling.
SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
SO_NEW_DOCUMENT_ATT_SEND_API1 Send a document as part of an email. The documentation is better than normal for this function, so please read it.
SO_SPLIT_FILE_AND_PATH Split a fully pathed filename into a filename and a path.
SO_SPOOL_READ Fetch printer spool according to the spool number informed. See also RSPO_RETURN_ABAP_SPOOLJOB
SO_WIND_SPOOL_LIST Browse printer spool numbers according to user informed.
SPELL_AMOUNT Convert a number to the corresponding words
SWD_HELP_F4_ORG_OBJECTS HR Matchcode tailored for organizational units. Includes a button so that you can browse the hierarchy too.
SX_OBJECT_CONVERT_OTF_PDF Conversion From OTF to PDF (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_PRT Conversion From OTF to Printer Format (SAPScript conversion)
SX_OBJECT_CONVERT_OTF_RAW Conversion From OTF to ASCII (SAPScript conversion)
SXPG_COMMAND_CHECK Check whether the user is authorized to execute the specified command on the target host system with the specified arguments.
SXPG_COMMAND_LIST_GET Select a list of external OS command definitions.
TERM_CONTROL_EDIT Edit a table of text with a very nice text editor. Just call TERM_CONTROL_EDIT and supply with the function with a table of text. Table entries are modified in the editor after clicking "ok".
TERMINAL_ID_GET Return the terminal id
TH_DELETE_USER Logoff a user. Similar results to using SM04.
TH_ENVIRONMENT Get the UNIX environment
TH_POPUP Display a popup system message on a specific users screen.
TH_REMOTE_TRANSACTION Run a transaction on a remote server. Optionally provide BDC data to be used in the transaction
TH_USER_INFO Give information about the current user (sessions, workstation logged in from, etc)
TH_USER_LIST Show which users are logged into an app server
TMP_GUI_DIRECTORY_LIST_FILES Retrieve all of the files and subdirectories on the Presentation Server (PC) for a given directory.
UNIT_CONVERSION_SIMPLE convert weights from one UOM to another.
UPLOAD upload a file to the presentation server (PC)
UPLOAD_FILES Will load one or more files from app or presentation server
WEEK_GET_FIRST_DAY For a given week (YYYYMM format), this function returns the date of the Monday of that week.
WRITE_LIST Useful for writing out the list contents that result from the function LIST_FROM_MEMORY.
WS_DOWNLOAD Save Internal Table as File on the Presentation Server
WS_EXCEL Start EXCEL on the PC
WS_EXECUTE execute a program on a windows PC
WS_FILE_DELETE Delete File at the Frontend
WS_FILENAME_GET Call File Selector
WS_MSG Create a dialog box in which you display an one line message
WS_UPLOAD Load Files from the Presentation Server to Internal ABAP Tables
WS_VOLUME_GET Get the label from a frontend device.
BP_JOBLOG_READ Fetch job log executions filling the structure TBTC5
RFC_SYSTEM_INFO Fetch information from the current instance filling the structure FRCSI
SD_PRINT_TERMS_OF_PAYMENT Format terms of payment according to base line date and payment terms
SO_USER_LIST_READ List of all users filling the structure SOUD3
TH_SAPREL Gather information from the current system including upgrade activities. It completes fields from the structure KKS03
TH_SERVER_LIST Gather information of all instances filling the structure MSXXLIST
TH_WPINFO List of work processes filling the structure WPINFO
WWW_LIST_TO_HTML After running a report, call this function to convert the list output to HTML.

Tags: , ,

Copyright © 2010 ABOUT SAP. All rights reserved.