You are on page 1of 19

RSABAPIV

Mass print/display of ABAP/4 help text

RSAVGL00

Table adjustment across clients

RSBDCBTC

Submit a BDC job with an internal batch number and wait for the end of
the batch input session.

RSBDCDRU

Prints the contents of a Batch Input session. No options for error


transactions only.

RSBDCOS0

Execute UNIX commands. Looks similar to the old SAPMSOS0


program that disappeared in 3.0

RSBDCSUB

Release batch input sessions automatically

RSBTCDEL

Clean the old background job records

RSCLTCOP

Copy tables across clients

RSDBCREO

Clean batch input session log

RSINCL00

Extended program list

RSORAREL

Get the Oracle Release

RSPARAM

Display all instance parameters

RSPO0041

Removing old spooling objects

RSRSCAN1

Search source code for a given string. Will also search includes. Also see
RKCTSEAR and RPR_ABAP_SOURCE_SCAN.

RSSNAPDL

Clean the old ABAP error dumps

RSTBSERV

Compare a contents of a table between clients

RSTXFCON

Converts SAPScript page formats

RSTXSCRP

Save a SAPScript layout set to disk, and load it back into SAP.

RSTXSCRP

Transport SAPscript files across systems

RSTXSCRP

Upload and download SAPScript layout sets

Pass the spool number of a report's output to this program to have the
RSTXTPD output converted to PDF format.
F4
RSTXTRAN

Add standard texts to a transport so they can be moved between systems.

RSUSR003

Check the passwords of users SAP* and DDIC in all clients

RSUSR006

List users last login

RSWBO052

Change development class of a sapscript (provided by Alan Cecchini)

RSWBO060

put objects into a request and transport it to any other system

CLPB_EXPORT

Export a text table to the clipboard (on


presentation server)

CLPB_IMPORT

Import a Text Table from the Clipboard


(on presentation server)

COMMIT_TEXT

To load long text into SAP

CONVERSION_EXIT_ALPHA_INPUT

converts any number into a string fill with


zeroes, with the number at the extreme
right

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

CONVERSION_EXIT_ALPHA_OUTPUT

converts any number with zeroes right


into a simple integer

Example:
input
output

= 00000000000123
= 123

CONVERT_ABAPSPOOLJOB_2_PDF

convert abap spool output to PDF

CONVERT_OTF

Convert SAP documents (SAPScript) to


other types.

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

converts a OTF spool to PDF (i.e.


Sapscript document)

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_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_GET_WEEK

will return the week that a date is in.

DATE_IN_FUTURE

Calculate a date N days in the future.

DATE_TO_DAY

Converts a date in internal format to a


text description of a day. For example
20030529 returns Thursday

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.(provided by Francois
Henrotte)

DOWNLOAD

download a file to the presentation server


(PC)

DYNP_VALUES_READ

Read the values from a dynpro. This


function can be used to read the values
from a report's selection screen too

(Another example).
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.

ENQUE_SLEEP

Wait a specified period of time before


continuing processing.

ENQUEUE_ESFUNCTION

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
return a list of filenames from a local or
network drive
EPS_GET_FILE_ATTRIBUTES

Pass in a filename and a path, and will


return attributes for the file

F4_DATE

displays a calendar in a popup window


and allows user to choose a date, or it can
be displayed read only.

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.

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.

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
retfield
= 'BEGRU'
value_org
= 'S'
tables
value_tab
= t_values
return_tab
= t_return
exceptions
parameter_error = 1
no_values_found = 2
others
= 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

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.

FILENAME_GET

popup to get a filename from a user,


returns blank filename if user selects

cancel
Print out selection criteria. Nicley
FM_SELECTION_CRITERIA_PRINT formatted.
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_COMMAND

Execute a command on the FTP server

FTP_CONNECT

Open a connection (and log in) to an FTP


server

FTP_DISCONNECT

Close the connection (and log off) the


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.

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
t_dep_doc
= tdep_doc
exceptions
error
= 1.

Function Group GRAP is now obsolete.

SAP recommends using functions in


function group SFES instead. Below is an
overview of the changes.

G_SET_GET_ALL_VALUES

Fetch values from a set.

GET_CURRENT_YEAR

Get the current fiscal year.

Example:
CALL FUNCTION 'GET_CURRENT_YEAR'

EXPORTING
BUKRS
DATE
IMPORTING
CURRM
CURRY
PREVM
PREVY

= '1000'
= SY-DATUM

" Company Code


" Date to find fiscal year for

=
=
=
=

"
"
"
"

w_currm
w_curry
w_prevm
w_prevy.

Current Fiscal Month


Current Fiscal Year
Previous Fiscal Month
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

GET_INCLUDETAB

Returns a list of all INCLUDES in a


program

GET_JOB_RUNTIME_INFO

Get the current job number from a


program. Also returns other useful info
about the current job.

GET_PAYSLIP

Returns a fully formatted payslip, ready


for displaying

GUI_CREATE_DIRECTORY

Create a directory on the presentation


server

GUI_DELETE_FILE

Replaces WS_FILE_DELETE. Delete a


file on the presentation server

GUI_DOWNLOAD

Replaces WS_DOWNLOAD. Download


table from the app server to presentation
server

GUI_EXEC

Replaces WS_EXECUTE. Start a File or


Program Asynchronously with WinExec

GUI_GET_DESKTOP_INFO

Replaces WS_QUERY. Delivers


Information About the Desktop (client)

GUI_REMOVE_DIRECTORY

Delete a directory on the presentation


server

GUI_RUN

Start a File or Program Asynchronously


with ShellExecute

GUI_UPLOAD

Replaces WS_UPLOAD. Upoad file from


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.

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.

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.

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.

INIT_TEXT

To load long text into SAP

K_WERKS_OF_BUKRS_FIND

Return a list of all plants for a given


company code.

LIST_FROM_MEMORY

Retrieves the output of a report from


memory when the report was executed
using SUBMIT... EXPORTING LIST TO
MEMORY. See also WRITE_LIST.

LIST_TO_ASCII

convert an ABAP report (displayed on


screen) from OTF to ASCII format

MBEW_EXTEND

Get the stock position for the previous


month. This displays the same info that
you see in MM03.

MONTH_NAMES_GET

It returns all the month and names in


repective language.

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

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

RFC_ABAP_INSTALL_AND_RUN

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
RH_DATA_COLLECTOR_ORGCHAR displaying an org structure
T
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_START_EXCEL_WITH_DATA

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!

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

Example:

Examples: search for any organizational structure


F4 = 'X'
PLVAR = '01'
OTYPE = 'O '
search for any persons
F4 = 'X'
PLVAR = '01'
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

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.

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

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. (provided by Paul
Kjaer)

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_CALL_SYSTEM

you can check the user's authorization for


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

SXPG_COMMAND_DEFINITION_GET

Read the definition of a single external


OS command from the R/3 System's
database.

SXPG_COMMAND_EXECUTE

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

TERM_CONTROL_EDIT

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

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.

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)
li_file_count
li_dir_count
ltab_dir_table
ltab_file_file_table

like
type
type
type
like
like

bdschko16-target_dir value 'C:\TEMP\',


c default '*.*'.
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

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.

WWW_LIST_TO_HTML

After running a report, call this function


to convert the list output to HTML.

You might also like