You are on page 1of 24

1

SAP Functions
ABAP_DOCU_DOWNLOAD APPL_LOG_DELETE Download ABAP documentation in HTML format. With this function module you delete logs in the database according to specified selection conditions With this function module you can analyze logs in the database. With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database. This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory. With this function module you read the log data in the database for an object or sub-object according to specified selection conditions. 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. With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the APPL_LOG_WRITE_... messages are written in local memory or are output on the screen. 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. With this function module, you write the log header data in local memory. 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. With this function module you write a single

APPL_LOG_DISPLAY APPL_LOG_DISPLAY_INTERN

APPL_LOG_INIT

APPL_LOG_READ_DB

APPL_LOG_READ_INTERN

APPL_LOG_SET_OBJECT

APPL_LOG_WRITE_DB

APPL_LOG_WRITE_HEADER APPL_LOG_WRITE_LOG_PARAMETERS

APPL_LOG_WRITE_MESSAGE_PARAMS

2 message, with parameters, in local memory. Otherwise the function module works like APPL_LOG_WRITE_SINGLE_MESSAGE. APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory. With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed. will return the IP address of the terminal in hex. Create Control for log display Release Control Put new data in log display Delete logs from the database Unlock log Lock log Load logs from the database Load log(s) Save logs in the database Save log(s) Prepare save Find logs in the database Display messages in memory Display Log Either output extended long text or call a callback routine (based on the data in BAL_S_LOG-PARAMS) Output all log header data Display message long text Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS) Output technical data of a message such as work area, error number, etc. End output

APPL_LOG_WRITE_SINGLE_MESSAGE

ARFC_GET_TID BAL_CNTL_CREATE BAL_CNTL_FREE BAL_CNTL_REFRESH BAL_DB_DELETE BAL_DB_DEQUEUE BAL_DB_ENQUEUE BAL_DB_LOAD BAL_DB_LOAD BAL_DB_SAVE BAL_DB_SAVE BAL_DB_SAVE_PREPARE BAL_DB_SEARCH BAL_DSP_LOG_DISPLAY BAL_DSP_LOG_DISPLAY BAL_DSP_LOG_PARAMETERS

BAL_DSP_LOG_TECHNICAL_DATA BAL_DSP_MSG_LONGTEXT BAL_DSP_MSG_PARAMETERS

BAL_DSP_MSG_TECHNICAL_DATA BAL_DSP_OUTPUT_FREE

3 BAL_DSP_OUTPUT_INIT BAL_DSP_OUTPUT_SET_DATA BAL_DSP_PROFILE_DETLEVEL_GET BAL_DSP_PROFILE_NO_TREE_GET BAL_DSP_PROFILE_POPUP_GET BAL_DSP_PROFILE_SINGLE_LOG_GET BAL_DSP_PROFILE_STANDARD_GET BAL_GLB_AUTHORIZATION_GET BAL_GLB_AUTHORIZATION_RESET BAL_GLB_CONFIG_GET BAL_GLB_CONFIG_SET BAL_GLB_MEMORY_EXPORT BAL_GLB_MEMORY_IMPORT BAL_GLB_MEMORY_REFRESH BAL_GLB_MEMORY_REFRESH BAL_GLB_MSG_CURRENT_HANDLE_GET BAL_GLB_MSG_DEFAULTS_GET BAL_GLB_SEARCH_LOG BAL_GLB_SEARCH_MSG BAL_LOG_CREATE BAL_LOG_CREATE BAL_LOG_DELETE BAL_LOG_EXIST BAL_LOG_HDR_CHANGE BAL_LOG_HDR_CHECK BAL_LOG_HDR_READ BAL_LOG_MSG_ADD BAL_LOG_MSG_ADD BAL_LOG_MSG_CHANGE BAL_LOG_MSG_CHANGE BAL_LOG_MSG_CHECK BAL_LOG_MSG_CUMULATE Initialize output Set dataset to be displayed Message hierarchy in DETLEVEL Display without tree (fullscreen) Display without tree (popup) Standard profile (SLG1) for one log Standard profile (SLG1) for a lot of logs Assign authorization Reset authorization Read configuration Set configuration Put function group memory in ABAPMEMORY Get function group memory from ABAPMEMORY (Partially) reset global memory (Partially) initialize memory Get current message handle Get message defaults Find logs in memory Find messages in memory Create log with header data Create log with header data Delete log (from database also at Save) Check existence of a log in memory Change log header Check log header data for consistency Read log header and other data Put message in log Put message in log Change message Change message Check message data for consistency Add message cumulated

4 BAL_LOG_MSG_DELETE BAL_LOG_MSG_DELETE BAL_LOG_MSG_EXIST BAL_LOG_MSG_READ BAL_LOG_MSG_REPLACE BAL_LOG_REFRESH BAL_LOG_REFRESH BAL_MSG_DISPLAY_ABAP BAL_OBJECT_SELECT BAL_OBJECT_SUBOBJECT BAL_SUBOBJECT_SELECT BP_EVENT_RAISE BP_JOBLOG_READ CHANGEDOCUMENT_READ_HEADERS Delete message Delete message Check existence of a message in memory Read message and other data Replace last message Delete log from memory Delete log from memory Output message as ABAP-MESSAGE Read Application Log objects table record Check whether object and subobject exist and the combination is allowed Read subobject table record Trigger an event from ABAP/4 program Fetch job log executions Get the change document header for a sales document, and put the results in an internal table.

Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS' EXPORTING objectclass = 'EINKBELEG' objectid = l_objectid username = space TABLES i_cdhdr = lt_cdhdr. LOOP AT lt_cdhdr WHERE udate IN s_aedat. CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS' EXPORTING changenumber = lt_cdhdr-changenr TABLES editpos = lt_editpos. LOOP AT lt_editpos WHERE fname = 'LOEKZ' AND f_new = 'L'. p_desc = text-r01. " Cancel Contract ENDLOOP. ENDLOOP.

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.

5 Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS' EXPORTING objectclass = 'EINKBELEG' objectid = l_objectid username = space TABLES i_cdhdr = lt_cdhdr. LOOP AT lt_cdhdr WHERE udate IN s_aedat. CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS' EXPORTING changenumber = lt_cdhdr-changenr TABLES editpos = lt_editpos. LOOP AT lt_editpos WHERE fname = 'LOEKZ' AND f_new = 'L'. p_desc = text-r01. " Cancel Contract ENDLOOP. ENDLOOP.

CLAF_CLASSIFICATION_OF_OBJECTS CLOI_PUT_SIGN_IN_FRONT

Return all of the characteristics for a material 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. Export a text table to the clipboard (on presentation server) Import a Text Table from the Clipboard (on presentation server) To load long text into SAP converts any number into a string fill with zeroes, with the number at the extreme right

CLPB_EXPORT CLPB_IMPORT COMMIT_TEXT CONVERSION_EXIT_ALPHA_INPUT

Example:
input = 123 output = 0000000000000...000000000000123

CONVERSION_EXIT_ALPHA_OUTPUT

converts any number with zeroes right into a simple integer

Example:
input = 00000000000123

6
output = 123

CONVERT_ABAPSPOOLJOB_2_PDF
6

convert abap spool output to PDF Convert SAP documents (SAPScript) to other types.

CONVERT_OTF

Example:
CALL FUNCTION "CONVERT_OTF" EXPORTING FORMAT IMPORTING BIN_FILESIZE TABLES OTF LINES EXCEPTIONS ERR_MAX_LINEWIDTH ERR_FORMAT ERR_CONV_NOT_POSSIBLE OTHERS = = = = = = = = "PDF" FILE_LEN OTFDATA PDFDATA 1 2 3 4.

CONVERT_OTFSPOOLJOB_2_PDF CONVERT_TO_FOREIGN_CURRENCY CONVERT_TO_LOCAL_CURRENCY DATE_CHECK_PLAUSIBILITY

converts a OTF spool to PDF (i.e. Sapscript document) Convert local currency to foreign currency. Convert from foreign currency to local currency Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems. Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc. will return the week that a date is in. Calculate a date N days in the future. Converts a date in internal format to a text description of a day. For example 20030529 returns Thursday 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. (provided by Francois Henrotte) download a file to the presentation server (PC) Read the values from a dynpro. This function can be used to read the values from a report's selection screen too (Another example). 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

DATE_COMPUTE_DAY

DATE_GET_WEEK DATE_IN_FUTURE DATE_TO_DAY DAY_ATTRIBUTES_GET

DOWNLOAD DYNP_VALUES_READ

DYNP_VALUES_UPDATE

7 field. ENQUE_SLEEP ENQUEUE_ESFUNCTION Wait a specified period of time before continuing processing. Lock an abap program so that it cannot be executed.

Example:
Set the parameters as follows: RELID = 'ZZ' SRTF2 = 0 SRTF = (your report name)

Please note that you should not use SY-REPID to pass your report name to the function. The value of SY-REPID will change as it is being passed to the function module, and will no longer hold the value of the calling report. EPS_GET_DIRECTORY_LISTING EPS_GET_FILE_ATTRIBUTES F4_DATE return a list of filenames from a local or network drive Pass in a filename and a path, and will return attributes for the file displays a calendar in a popup window and allows user to choose a date, or it can be displayed read only. 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. F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.

F4_IF_FIELD_VALUE_REQUEST

F4IF_INT_TABLE_VALUE_REQUEST

Example:
data: begin of t_values occurs 2, value like kna1-begru, end of t_values, t_return like ddshretval occurs 0 with header line. t_values = 'PAR*'. append t_values. t_values = 'UGG'. append t_values. call function 'F4IF_INT_TABLE_VALUE_REQUEST' exporting

8
retfield value_org tables value_tab return_tab exceptions parameter_error no_values_found others = 'BEGRU' = 'S' = t_values = t_return = 1 = 2 = 3.

if sy-subrc = 0. read table t_return index 1. o_begru-low = t_return-fieldval. if o_begru-low = 'PAR*'. o_begru-option = 'CP'. else. o_begru-option = 'EQ'. endif. o_begru-sign = 'I'. append o_begru to s_begru. else. o_begru = i_begru. endif.

F4IF_SHLP_EXIT_EXAMPLE F4IP_INT_TABLE_VALUE_REQUEST

documents the different reasons to use a search help exit, and shows how it is done. This function does not exist in 4.6 and above. Use F4IF_INT_TABLE_VALUE_REQUEST instead. popup to get a filename from a user, returns blank filename if user selects cancel Print out selection criteria. Nicley formatted.

FILENAME_GET

FM_SELECTION_CRITERIA_PRINT 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. Execute a command on the FTP server Open a connection (and log in) to an FTP server Close the connection (and log off) the FTP server You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a

FTP_COMMAND FTP_CONNECT FTP_DISCONNECT FU CSAP_MAT_BOM_READ

9 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. Example:
data: begin of tstk2 occurs 0. include structure stko_api02. data: end of tstk2. data: begin of tstp2 occurs 0. include structure stpo_api02. data: end of tstp2. data: begin of tdep_data occurs 0. include structure csdep_data. data: end of tdep_data. data: begin of tdep_descr occurs 0. include structure csdep_descr. data: end of tdep_descr. data: begin of tdep_source occurs 0. include structure csdep_source. data: end of tdep_source. data: begin of tdep_order occurs 0. include structure csdep_order. data: end of tdep_order. data: begin of tdep_doc occurs 0. include structure csdep_doc. data: end of tdep_doc. data: flg_warning like capiflag-flwarning. call function 'CSAP_MAT_BOM_READ' exporting material = 'MAT100' plant = '0001' bom_usage = '1' valid_from = '20.12.1996' valid_to importing fl_warning = flg_warning tables t_stko = tstk2 t_stpo = tstp2 t_dep_data = tdep_data t_dep_descr = tdep_descr t_dep_source = tdep_source t_dep_order = tdep_order

10
t_dep_doc exceptions error = tdep_doc = 1.

Function Group GRAP is now obsolete.

SAP recommends using functions in function group SFES instead. Below is an overview of the changes. Fetch values from a set. Get the current fiscal year.

G_SET_GET_ALL_VALUES GET_CURRENT_YEAR Example:

CALL FUNCTION 'GET_CURRENT_YEAR' EXPORTING BUKRS = '1000' " Company Code DATE = SY-DATUM " Date to find fiscal year for IMPORTING CURRM = w_currm " Current Fiscal Month CURRY = w_curry " Current Fiscal Year PREVM = w_prevm " Previous Fiscal Month PREVY = w_prevy. " Previous 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 Returns a list of all INCLUDES in a program Get the current job number from a program. Also returns other useful info about the current job. Returns a fully formatted payslip, ready for displaying Create a directory on the presentation server Replaces WS_FILE_DELETE. Delete a file on the presentation server Replaces WS_DOWNLOAD. Download table from the app server to presentation server Replaces WS_EXECUTE. Start a File or Program Asynchronously with WinExec Replaces WS_QUERY. Delivers Information About the Desktop (client) Delete a directory on the presentation server Start a File or Program Asynchronously with ShellExecute Replaces WS_UPLOAD. Upoad file from

GET_INCLUDETAB GET_JOB_RUNTIME_INFO

GET_PAYSLIP GUI_CREATE_DIRECTORY GUI_DELETE_FILE GUI_DOWNLOAD GUI_EXEC GUI_GET_DESKTOP_INFO GUI_REMOVE_DIRECTORY GUI_RUN GUI_UPLOAD

11 presentation server to the app server 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. 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.

HELP_VALUES_GET_WITH_TABLE

Example:
tables: t001w. DATA: lc_werks LIKE t001w-werks, ltab_fields LIKE help_value OCCURS 0 with header line, BEGIN OF ltab_values OCCURS 0, feld(40) TYPE c, END OF ltab_values. *-- Set up fields to retrieve data ltab_fields-tabname = 'T001W'. ltab_fields-fieldname = 'WERKS'. ltab_fields-selectflag = 'X'. APPEND ltab_fields. ltab_fields-tabname = 'T001W'. ltab_fields-fieldname = 'NAME1'. ltab_fields-selectflag = space. APPEND ltab_fields. *-- Fill values select * from t001w. ltab_values-feld = t001w-werks. append ltab_values. ltab_values-feld = t001w-name1. append ltab_values. endselect. CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE' EXPORTING fieldname = 'WERKS' tabname = 'T001W' title_in_values_list = 'Select a value' IMPORTING select_value = lc_werks TABLES fields = ltab_fields valuetab = ltab_values EXCEPTIONS field_not_in_ddic = 01 more_then_one_selectfield = 02 no_selectfield = 03.

12 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.

Example:
data: ld_date lc_holiday_cal_id ltab_holiday_attributes lc_holiday_found like like like like scal-datum default sy-datum, scal-hcalid default 'CA', thol occurs 0 with header line, scal-indicator.

CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO' EXPORTING date = ld_date holiday_calendar_id = lc_holiday_cal_id WITH_HOLIDAY_ATTRIBUTES = 'X' IMPORTING HOLIDAY_FOUND = lc_holiday_found tables holiday_attributes = ltab_holiday_attributes EXCEPTIONS CALENDAR_BUFFER_NOT_LOADABLE = 1 DATE_AFTER_RANGE = 2 DATE_BEFORE_RANGE = 3 DATE_INVALID = 4 HOLIDAY_CALENDAR_ID_MISSING = 5 HOLIDAY_CALENDAR_NOT_FOUND = 6 OTHERS = 7. if sy-subrc = 0 and lc_holiday_found = 'X'. write: / ld_date, 'is a holiday'. else. write: / ld_date, 'is not a holiday, or there was an error calling the function'. endif.

HOLIDAY_GET

Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar.

Call the HR feature to determine the Benefit HR_BEN_GET_FROM_FEATURE_BAREA Area for an employee Call the HR feature to determine the Benefit HR_BEN_GET_FROM_FEATURE_BENGR Group for an employee HR_BEN_GET_FROM_FEATURE_BSTAT Call the HR feature to determine the Benefit Status for an employee

Call the HR feature to determine the Cover HR_BEN_GET_FROM_FEATURE_COVGR Group for an employee HR_BEN_GET_FROM_FEATURE_CSTV1 Call the HR feature to determine the CSTV1 feature for an employee

Call the HR feature to determine the Employee HR_BEN_GET_FROM_FEATURE_EECGR Cost Group for an employee

13 Call the HR feature to determine the Eligiblity Group for an employee

HR_BEN_GET_FROM_FEATURE_ELIGR

Call the HR feature to determine the Employer HR_BEN_GET_FROM_FEATURE_ERCGR Cost Group for an employee Evaluate the EVTGR feature for an employee HR_BEN_GET_FROM_FEATURE_EVTGR Evaluate the FLXGR feature for an employee HR_BEN_GET_FROM_FEATURE_FLXGR Evaluate the LDAYW feature for an employee HR_BEN_GET_FROM_FEATURE_LDAYW Evaluate the LRPGR feature for an employee HR_BEN_GET_FROM_FEATURE_LRPGR Evaluate the TRMGR feature for an employee HR_BEN_GET_FROM_FEATURE_TRMGR Evaluate the VARGU feature for an employee HR_BEN_GET_FROM_FEATURE_VARGU 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. Get all leave information (includes leave entitlement, used holidays/paid out holidays) Return the number of weeks between two dates. BAPI function module to create/change infotypes in HR

HR_GET_LEAVE_DATA HR_IE_NUM_PRSI_WEEKS HR_INFOTYPE_OPERATION Example:


REPORT ZZKNB_BAPI_INFOTYPE_CALL .

* Use 'BAPI_EMPLOYEE_ENQUEUE' to lock the employee before updating DATA: l_bapireturn LIKE bapireturn1. DATA: bapipakey_tab LIKE bapipakey OCCURS 0 WITH HEADER LINE. data: l_p0169 like p0169. parameters: p_pernr like p0169-pernr default '07000003'. start-of-selection. CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE' EXPORTING number = p_pernr IMPORTING

14
return = l_bapireturn. IF l_bapireturn-id NE space. WRITE: / l_p0169-pernr, 'Enqueue failed'. exit. ENDIF. *-- Suported operations: *-- change (operation *-- Create (operation *-- DELETE (operation *-- CREATESUCCESSOR (operation . l_p0169-barea = '7A'. l_p0169-pltyp = 'RRSP'. l_p0169-bplan = 'RRSP'. l_p0169-elidt = '20000101'. l_p0169-enrty = 'M'. l_p0169-perio = '4'. = = = = 'MOD') 'INS') 'DEL') 'COP')

CALL FUNCTION 'HR_INFOTYPE_OPERATION' EXPORTING infty = '0169' subty = 'RRSP' number = p_pernr record = l_p0169 validitybegin = '20021001' validityend = '99991231' operation = 'INS' * dialog_mode = '0' "Use default * nocommit = '1' "Use default IMPORTING return = l_bapireturn key = bapipakey_tab. IF l_bapireturn-id NE space. WRITE: / p_pernr, 20 'Create was unsuccessful', l_bapireturn-id, l_bapireturn-message+0(40). ELSE. WRITE: / p_pernr, 20 'Create was successful', l_bapireturn-id, l_bapireturn-message+0(40). ENDIF. * Use 'BAPI_EMPLOYEE_DEQUEUE' to un-lock the employee before updating CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE' EXPORTING number = l_p0169-pernr IMPORTING return = l_bapireturn.

HR_PAYROLL_PERIODS_GET

Get the payroll period for a particular date. (provided by Francois Henrotte)

Example:

15
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE, IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE. W_BEGDA = '20010101'. W_PERNR = '00000001'. CALL FUNCTION 'HR_PAYROLL_PERIODS_GET' EXPORTING get_begda = w_begda TABLES get_periods = it_t549q EXCEPTIONS no_period_found = 1 no_valid_permo = 2. CHECK sy-subrc = 0. CALL FUNCTION 'HR_TIME_RESULTS_GET' EXPORTING get_pernr = w_pernr get_pabrj = it_t549q-pabrj get_pabrp = it_t549q-pabrp TABLES get_zl = it_zl EXCEPTIONS no_period_specified = 1 wrong_cluster_version = 2 no_read_authority = 3 cluster_archived = 4 technical_error = 5. NOTE: it_zl-iftyp = 'A' it_zl-iftyp = 'S' absence at work

HR_READ_INFOTYPE HR_TIME_RESULTS_GET

generic PA infotype read with authorization checks Get the time results for a payroll period. (provided by Francois Henrotte)

Example:
DATA: IT_T549Q TYPE T549Q OCCURS 0 WITH HEADER LINE, IT_ZL TYPE PC2BF OCCURS 0 WITH HEADER LINE. W_BEGDA = '20010101'. W_PERNR = '00000001'. CALL FUNCTION 'HR_PAYROLL_PERIODS_GET' EXPORTING get_begda = w_begda TABLES get_periods = it_t549q EXCEPTIONS no_period_found = 1 no_valid_permo = 2. CHECK sy-subrc = 0. CALL FUNCTION 'HR_TIME_RESULTS_GET'

16
EXPORTING get_pernr get_pabrj get_pabrp TABLES get_zl EXCEPTIONS no_period_specified wrong_cluster_version no_read_authority cluster_archived technical_error NOTE: it_zl-iftyp = 'A' it_zl-iftyp = 'S' absence at work = w_pernr = it_t549q-pabrj = it_t549q-pabrp = it_zl = = = = = 1 2 3 4 5.

HRWPC_RFC_ABKRS_TEXT_GET HRWPC_RFC_ANRED_TEXT_GET HRWPC_RFC_ANSVH_TEXT_GET HRWPC_RFC_BLAND_TEXT_GET HRWPC_RFC_BTRTL_TEXT_GET HRWPC_RFC_BUKRS_TEXT_GET HRWPC_RFC_BVMRK_TEXT_GET HRWPC_RFC_COMTY_TEXT_GET HRWPC_RFC_COUNC_TEXT_GET HRWPC_RFC_CURCY_TEXT_GET

Get text description for Payroll Area Get text description for Title Get text description for Work Contract Get text description for Tax Region Get text description for Personnel Subarea Get text description for Company Code Get text description for Processing indicator Get text description for Type of control recipe destination Get text description for County Code Get text description for Currency Key Get text description for Evaluation Group

HRWPC_RFC_EVGRD_TEXT_GET Get text description for Family Characteristics HRWPC_RFC_FAMEI_TEXT_GET HRWPC_RFC_FAMST_TEXT_GET HRWPC_RFC_FISTL_TEXT_GET HRWPC_RFC_FREQU_TEXT_GET HRWPC_RFC_GEBER_TEXT_GET Get text description for Gender Key HRWPC_RFC_GESCH_TEXT_GET Get text description for Business Area HRWPC_RFC_GSBER_TEXT_GET Get text description for Period Get text description for Funds Get text description for Marital Status Key Get text description for Funds Center

17 Get text stored on the infotype HRWPC_RFC_IT0XXX_TEXT_GET Get text description for Survery Job HRWPC_RFC_JCODE_TEXT_GET Get text description for Controlling Area HRWPC_RFC_KOKRS_TEXT_GET HRWPC_RFC_KONFE_TEXT_GET Get text description for Religious Denomination Key Get text description for Cost Center HRWPC_RFC_KOSTL_TEXT_GET Get text description for Country of company HRWPC_RFC_LAND_TEXT_GET Get text description for Reason for Action HRWPC_RFC_MASSG_TEXT_GET Get text description for Action Type HRWPC_RFC_MASSN_TEXT_GET Get text description for Country Grouping HRWPC_RFC_MOLGA_TEXT_GET HRWPC_RFC_NAMZ2_TEXT_GET HRWPC_RFC_NAMZU_TEXT_GET HRWPC_RFC_NATIO_TEXT_GET HRWPC_RFC_ORGEH_TEXT_GET Get text description for Object Type HRWPC_RFC_OTYPE_TEXT_GET Get text description for Employee Group HRWPC_RFC_PERSG_TEXT_GET HRWPC_RFC_PERSK_TEXT_GET HRWPC_RFC_PLANS_TEXT_GET Get text description for Plan Version HRWPC_RFC_PLVAR_TEXT_GET HRWPC_RFC_RAILW_TEXT_GET HRWPC_RFC_SACHX_TEXT_GET Get text description for Social Subscription Railway Get text description for Administrator Get text description for Employee Subgroup Get text description for Position Get text description for Nationality Get text description for Organizational Unit Get text description for Name Affix for Name at Birth Get text description for Other Title

18 Get text description for Language Key HRWPC_RFC_SPRSL_TEXT_GET HRWPC_RFC_STATV_TEXT_GET HRWPC_RFC_STELL_TEXT_GET Get text description for Street Abbreviation HRWPC_RFC_STRDS_TEXT_GET Get text description for Subtype HRWPC_RFC_SUBTY_0XXX_TEXT_GET Get text description for Subtype HRWPC_RFC_SUBTY_1XXX_TEXT_GET Get text description for Title HRWPC_RFC_TITEL_TEXT_GET Get text description for Second Title HRWPC_RFC_TITL2_TEXT_GET Get text description for Task Type HRWPC_RFC_TMART_TEXT_GET Get text description for Organizational Key HRWPC_RFC_VDSK1_TEXT_GET Get text description for Second Name Prefix HRWPC_RFC_VORS2_TEXT_GET Get text description for Name Prefix HRWPC_RFC_VORSW_TEXT_GET Get text description for Personnel Area HRWPC_RFC_WERKS_TEXT_GET INIT_TEXT K_WERKS_OF_BUKRS_FIND LIST_FROM_MEMORY To load long text into SAP Return a list of all plants for a given company code. Retrieves the output of a report from memory when the report was executed using SUBMIT... EXPORTING LIST TO MEMORY. See also WRITE_LIST. convert an ABAP report (displayed on screen) from OTF to ASCII format Get the stock position for the previous month. This displays the same info that you see in MM03. It returns all the month and names in repective language. Get text description for Statistics indicator for pensions Get text description for Job

LIST_TO_ASCII MBEW_EXTEND

MONTH_NAMES_GET

19 MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.

Example:
data: new_date type d. CALL FUNCTION 'MONTH_PLUS_DETERMINE' EXPORTING months = -5 " Negative to subtract from old date, positive to add olddate = sy-datum IMPORTING NEWDATE = new_date. write: / new_date.

MS_EXCEL_OLE_STANDARD_OLE OTF_CONVERT POPUP_TO_CONFIRM_LOSS_OF_DATA

will build a file, and automatically start Excel wraps several other function modules. Will convert OTF to ASCII or PDF Create a dialog box in which you make a question whether the user wishes to perform a processing step with loss of data. Create a dialog box in which you make a question whether the user wishes to perform the step. Create a dialog box in which you inform the user about a specific decision point during an action. Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object. Provide user with several choices as radio buttons Create a dialog box in which you inform the user about a specific decision point via a diagnosis text. Create a dialog box in which you display a two line message Popup to choose a month Provide a display of a table for user to select one, with the value of the table line returned when selected. Return pricing conditions in an internal table. Use structure TCOMK for parameter COMM_HEAD_1, and structure TCOMP for

POPUP_TO_CONFIRM_STEP

POPUP_TO_CONFIRM_WITH_MESSAGE

POPUP_TO_CONFIRM_WITH_VALUE

POPUP_TO_DECIDE POPUP_TO_DECIDE_WITH_MESSAGE

POPUP_TO_DISPLAY_TEXT POPUP_TO_SELECT_MONTH POPUP_WITH_TABLE_DISPLAY

PRICING

20 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 PROFILE_SET READ_TEXT REGISTRY_GET REGISTRY_SET RFC_ABAP_INSTALL_AND_RUN Read an Entry in an INI File on the frontend Write an Entry in an INI File on the frontend To load long text into SAP Read an Entry from the Registry Set an entry in the Registry Runs an ABAP program that is stored in the table PROGRAM when the MODE = 'F'. Table WRITES contains the ouput of the program. Allows you to run a program without having the source code in the target system. get org info and put in tables suitable for displaying an org structure Return the active HR Plan return the day based on the date provied generic PD infotype read with authorization checks starts Excel with the contents of an internal table. This function finds Excel in the desktop registry. It also uses a local PC working directory to save the file (that's what the 'W' value for data path flag does). Very transparent to user! Returns all related org info is a matchcode for any type of HR Planning object, including the possibility to fill the field that you want

RH_DATA_COLLECTOR_ORGCHART RH_GET_ACTIVE_WF_PLVAR RH_GET_DATE_DAYNAME RH_READ_INFTY RH_START_EXCEL_WITH_DATA

RH_STRUC_GET RHP0_POPUP_F4_SEARK

Example:
Examples: search for any organizational structure F4 = 'X' PLVAR = '01' OTYPE = 'O ' search for any persons F4 = 'X' PLVAR = '01'

21
OTYPE = 'P ' MULTI_SELECT = 'X' to allow multiple selection EASY = 'X' for user-dependent matchcode Unfortunately, the use of table BASE_OBJIDS is disabled, so you can't specify a root for the hierarchy you display

RKD_WORD_WRAP RP_CALC_DATE_IN_INTERVAL RP_LAST_DAY_OF_MONTHS RP_PNP_ORGSTRUCTURE

Convert a long string or phrase into several lines. Add/subtract years/months/days from a date Determine last day of month Show a dialog box with the org structure displayed. User is then allowed to choose org units.

Example:
CALL FUNCTION 'RP_PNP_ORGSTRUCTURE' TABLES pobjid = l_pobjid.

RPY_DYNPRO_READ RPY_TRANSACTION_READ

Read dynpro, including screen flow Given a transaction, return the program and screen or given a program and screen, return the transactions that use the program and screen. Returns an internal table that contains a formatted list of all the selection parameters entered for a report. Table is ready to print out. Get the current contents of selection screen Send message from ABAP/4 program to SAPoffice. Returns the contents of the specified variant in a table. Download the spool from a program to a file. Requires spool number. Fetch printer spool according to the spool number informed. If the server name is left blank, it reads a directory from local presentation server, otherwise it reads the directory of the remote server Read a directory on the Application Server Read a file from the presentation server if no

RS_COVERPAGE_SELECTIONS

RS_REFRESH_FROM_SELECTOPTIONS RS_SEND_MAIL_FOR_SPOOLLIST RS_VARIANT_CONTENTS RSPO_DOWNLOAD_SPOOLJOB RSPO_RETURN_ABAP_SPOOLJOB RZL_READ_DIR

RZL_READ_DIR_LOCAL RZL_READ_FILE

22 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 RZL_SUBMIT RZL_WRITE_FILE_LOCAL Hang the current application from 1 to 5 seconds. Submit a remote report. Saves table to the presentation server (not PC). Does not use OPEN DATASET, so it does not suffer from authority checks! Convert data to Microsoft Excel format. Display a progress bar on the SAP GUI, and give the user some idea of what is happening To load long text into SAP If you are coding a module pool and using a table control, you can use this function SCROLLING_IN_TABLE to handle any scrolling. (provided by Paul Kjaer) Give the difference in Days and Time for 2 dates Send a document as part of an email. The documentation is better than normal for this function, so please read it. Split a fully pathed filename into a filename and a path. Fetch printer spool according to the spool number informed. See also RSPO_RETURN_ABAP_SPOOLJOB Browse printer spool numbers according to user informed. Convert a number to the corresponding words HR Matchcode tailored for organizational units. Includes a button so that you can browse the hierarchy too. Conversion From OTF to PDF (SAPScript conversion) Conversion From OTF to Printer Format (SAPScript conversion) Conversion From OTF to ASCII (SAPScript conversion) you can check the user's authorization for the

SAP_CONVERT_TO_XLS_FORMAT SAPGUI_PROGRESS_INDICATOR SAVE_TEXT SCROLLING_IN_TABLE

SD_DATETIME_DIFFERENCE SO_NEW_DOCUMENT_ATT_SEND_API1

SO_SPLIT_FILE_AND_PATH SO_SPOOL_READ

SO_WIND_SPOOL_LIST SPELL_AMOUNT SWD_HELP_F4_ORG_OBJECTS

SX_OBJECT_CONVERT_OTF_PDF SX_OBJECT_CONVERT_OTF_PRT SX_OBJECT_CONVERT_OTF_RAW SXPG_CALL_SYSTEM

23 specified command and run the command. The command runs on the host system on which the function module is executed. The function module is RFC capable. It can therefore be run on the host system at which a user happens to be active or on another designated host system at which an R/3 server is active. SXPG_COMMAND_CHECK Check whether the user is authorized to execute the specified command on the target host system with the specified arguments. Read the definition of a single external OS command from the R/3 System's database. Check a user's authorization to use a command, as in SXPG_COMMAND_CHECK. If the authorization check is successful, then execute the command on the target host system. Select a list of external OS command definitions. 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". Return the terminal id Logoff a user. Similar results to using SM04. Get the UNIX environment Display a popup system message on a specific users screen. Run a transaction on a remote server. Optionally provide BDC data to be used in the transaction Give information about the current user (sessions, workstation logged in from, etc) Show which users are logged into an app server Retrieve all of the files and subdirectories on the Presentation Server (PC) for a given directory.

SXPG_COMMAND_DEFINITION_GET SXPG_COMMAND_EXECUTE

SXPG_COMMAND_LIST_GET

TERM_CONTROL_EDIT

TERMINAL_ID_GET TH_DELETE_USER TH_ENVIRONMENT TH_POPUP TH_REMOTE_TRANSACTION TH_USER_INFO TH_USER_LIST TMP_GUI_DIRECTORY_LIST_FILES

When a value other than * or *.* is used for the filter, you will not get any directories, unless they match your wildcard filter. For example, if you entered *.png, then only files and directories that end in png will be returned by the function.

Example:
data: lc_directory lc_filter(20) like bdschko16-target_dir value 'C:\TEMP\', type c default '*.*'.

24
li_file_count li_dir_count ltab_dir_table ltab_file_file_table type type like like i, i, sdokpath occurs 0 with header line, sdokpath occurs 0 with header line.

call function 'TMP_GUI_DIRECTORY_LIST_FILES' exporting directory = lc_directory filter = lc_filter importing file_count = li_file_count dir_count = li_dir_count tables file_table = ltab_file_table dir_table = ltab_dir_table exceptions cntl_error = 1 others = 2.

UNIT_CONVERSION_SIMPLE UPLOAD UPLOAD_FILES WEEK_GET_FIRST_DAY

convert weights from one UOM to another. upload a file to the presentation server (PC) Will load one or more files from app or presentation server For a given week (YYYYMM format), this function returns the date of the Monday of that week. Useful for writing out the list contents that result from the function LIST_FROM_MEMORY. Save Internal Table as File on the Presentation Server Start EXCEL on the PC execute a program on a windows PC Delete File at the Frontend Call File Selector Create a dialog box in which you display an one line message Load Files from the Presentation Server to Internal ABAP Tables Get the label from a frontend device. After running a report, call this function to convert the list output to HTML.

WRITE_LIST

WS_DOWNLOAD WS_EXCEL WS_EXECUTE WS_FILE_DELETE WS_FILENAME_GET WS_MSG WS_UPLOAD WS_VOLUME_GET WWW_LIST_TO_HTML

You might also like