100% found this document useful (4 votes)
4K views64 pages

Function Modules

The document summarizes various function modules for file and directory operations in SAP. It groups the functions into categories like downloads/uploads, file information, frontend services, business document tools, file checks, and more. The functions allow operations like downloading/uploading files, getting file/directory information, checking for file/folder existence, browsing for files/folders, and other basic file system interactions.

Uploaded by

api-3758455
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
4K views64 pages

Function Modules

The document summarizes various function modules for file and directory operations in SAP. It groups the functions into categories like downloads/uploads, file information, frontend services, business document tools, file checks, and more. The functions allow operations like downloading/uploading files, getting file/directory information, checking for file/folder existence, browsing for files/folders, and other basic file system interactions.

Uploaded by

api-3758455
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 64

Workstation:

Function
Function Function
group
group Function module name module Description
descripti
name description
on
Store
Calls WS_QUERY,
Internal
WS_FILENAME_G
Table with
ET,
DOWNLOAD Dialog as
WS_DOWNLOAD.
File on the
Dialog like se38
Presentation
"Download..."
Server
Save Internal
Table as File
WS_DOWNLOAD on the
Presentation
Server
Load Data
from the Calls WS_QUERY,
Presentation WS_FILENAME_G
UPLOAD Server into ET, WS_UPLOAD.
an Internal Dialog like se38
Table / "Upload..."
Dialog
Load File
from the
Presentation
WS_UPLOAD
Server into
Internal
Table
Browse and get file
Call file
WS_FILENAME_GET name of the chosen
Selector
type
Execute an
External
Program on
WS_EXECUTE
the
Calling Presentation
up Server
GRAP graphics /
File Issue the Note. Only I, E and
transfer WS_MSG Presentation A types. Does not
Server style affect events flow
message logic.
Download internal
table into file and
start Excel for it
[and upload changed
WS_EXCEL
file into the internal
table]. See also
FTBU_START_EX
Functional Group GRAP is obsolete in SAP 4.6. Use instead the SFES Function Group
(Function Modules like GUI_*).
IBIP: F4 for
Batch filename / Uses current dynpro
Input/Cal Filemanager value, calls
IBIP F4_FILENAME
l support to WS_FILENAME_G
transactio locate file in ET
n: PM a directory
Browse and get file
name of the chosen
Diverse Call file
KDUT KD_GET_FILENAME_ON_F4 type. Allows also
utilities Selector
File Mask (e.g.
C:\Work\abc*.*)
TYPE= -1(SAP dir)
-2(SAP sys dir)
1(computer name)
2(Win dir) 3(Sys
Delivers dir) 4(tmp dir)
Information 5(user name) 6(Win
GUI_GET_DESKTOP_INFO About the OS) 7(Win build
Desktop No) 8(Win ver)
(client) 9(SAP GUI program
name) 10(SAP GUI
program path)
11(SAP current dir)
12(desktop dir)
Version, language,
GUI_GET_FILE_INFO single-character
flag, size
Like previous, but
GUI_GET_FILELIST_INFO
for list of files
GUI_HAS_OBJECTS OBJECT_MODEL=
GUI_HAS_ACTIVEX ACTX | JBEAN |
OLE | SAP | HTML
GUI_HAS_JAVABEANS Returns 'X' if model
GUI_IS_ITS supported.
Calls
GUI_HAS_OBJEC
TS with
OBJECT_MODEL=
ACTX
Calls
SAPGUI
GUI_HAS_OBJEC
Frontend object
SFES TS with
services models
OBJECT_MODEL=
GUI_GET_OBJECT_MODEL JBEAN
S
Calls
GUI_HAS_OBJEC
TS with
OBJECT_MODEL=
HTML (ITS -
Internet Transaction
Server)
Returns table within
all models supported
GUI_DELETE_FILE
GUI_CREATE_DIRECTORY
Business
Returns WIN_GUI |
BDS_TOO Documen
BDS_GET_GUI_TYPE WEB_GUI |
LS t Service
JAVA_GUI
Tools
TMP_GUI_CREATE_DIRECT No-flush and flush
ORY allowed
TMP_GUI_REMOVE_DIREC
TORY
TMP_GUI_DELETE_FILE File or directory. For
file returns also
TMP_GUI_GET_FILE_EXIST
filelength.
TMP_GUI_READ_DIRECTO
Imports: directory
RY
name, extension
TMP_GUI_BROWSE_FOR_F (space for all).
OLDER Returns list of file
KEN: TMP_GUI_FILE_OPEN_DIAL names.
Info OG Self- Imports: window
SI72 Object TMP_GUI_DIRECTORY_LIS explanatory title, initial folder.
editor T_FILES names Returns folder
link name.
TMP_GUI_GET_SYSTEMDIR
TMP_GUI_GET_COMPUTER Multiselection
NAME allowed
Imports: directory
(ended with '\'),
filter (default '*.*').
Returns: list of files,
TMP_GUI_GET_TEMPPATH list of
subdirectories.
PC_CHECK_DRIVE Checks for
PC_CHECK_PATH correctness only, not
existence (can be
PC_CHECK_FILENAME checked for DOS
PC_CHECK_EXTENSION also)
PC
interface PC_CHECK_PATH_WITH_D Self-
C0PC (file RIVE explanatory
name PC_CHECK_FILENAME_WI names
checks) TH_EXT
PC_BUILD_COMPLETE_FIL
ENAME
PC_SPLIT_COMPLETE_FIL
ENAME

Application Server:
Functio Function
Function
n group
Function module name module Description
group descriptio
description
name n
Repository Return table with file list for the
SAUS Switch SUBST_GET_FILE_LIST
given directory (pattern
Tools allowed)
Popup to select one file from the
given application server
directory (pattern allowed).
(Can be used also for selecting
file on presentation server: calls
File
DX_FIL F4_DXFILENAME_TOPRECUR WS_FILENAME_GET)
Manageme
E SION Parameters:
nt
I_LOCATION_FLAG={A|P|
space}; if I_LOCATION_FLAG
is blank then popup to choose
Appl./Present.; if I_SERVER='?'
then popup to select appl.server.
Returns table with Work
TH_SYSTEMWIDE_WPINFO
Processes Inf.
TH_SYSTEMWIDE_USER_LIS
Returns table with Users Inf.
T
Task TH_REMOTE_USER_LIST Returns table with Users on the
THFB handler
TH_USER_LIST given Application server.
functions
Returns list of application
TH_SERVER_LIST
servers.
Popup to select one of available
TH_SELECT_SERVER
application servers.
Returns:
- System Codepage (static sys
cp from app server's profile
SAPscript
STXU SYSTEM_CODEPAGE parameter)
utilities
- Dynamic Codepage
(dynamically changing sys cp
due to SET LOCALE)

Date and Time:


Funct Functio Functio
ion n n
group group Function module name module Description
descrip descrip
name tion tion
Returns
Calculates and returns factory
factory
calendar date for a date (if
DATE_CONVERT_TO_FA calenda
CorrectOption = '+');
CTORYDATE r date
Checks if the date is work day (if
for a
CorrectOption = '-').
date
Returns
Import : YYYYMMDD; Export :
week in
DATE_GET_WEEK YYYYNN, where NN is # of
which a
week.
date lies
Calenda
r Calenda
SCAL r
functio
ns functio
n: Import week in format YYYYNN
WEEK_GET_FIRST_DAY
Return where NN is # of week.
first day
for a
week
Returns
day of
Import : YYYYMMDD; Export :
DATE_COMPUTE_DAY week
1-Monday, ...
for a
date
Time
Sheet:
CAPP DAY_IN_WEEK
Approv
al
Import : YYYYMMDD; Export :
GET_WEEK_INFO_BASE
YYYYNN - week # for the date, Monday
D_ON_DATE
and Sunday of the week.
Import : YYYYNN (week #); Export :
LAST_WEEK YYYYNN - previous week #, Monday and
C Calcula Sunday of the previous week.
ADA te Date
Import : YYYYNN (week #); Export :
NEXT_WEEK YYYYNN - next week #, Monday and
Sunday of the next week.
Import : YYYYMMDD; Export : weekday
DATE_TO_DAY
(as word).
Returns
week Import : YYYYMMDD; Export :
DATE_GET_FIRST_DAY_
within YYYYMMDD - Monday in the
OF_WEEK
which a week.
Date date lies
format Convert
ZDAT
convers s
ion internal
CONVERT_DATE_TO_AL Import : YYYYMMDD,
date to
PHA_NUMERIC Language; Export : DD Mon YY.
DD
Mon
YY
Convert
s Import/Export : YYYYMMDD;
internal Export/Import : user specific date
date to string. Can be for import either
CONVERT_DATE_TO_EX
Date: user- without or within delimiters, but
TERNAL
SCA1 Conver specific for export only without delimiters.
CONVERT_DATE_TO_IN
sion format See field DATFM in the USR01
TERNAL
string table. Can be set up via System ->
and User Profile -> User Defaults or
vice using su50.
versa.
Import : country specific date|
period string (External Date),
External or Internal Periods;
Export : YYYYMMDD (Internal
Date - concrete date or first day of
Input period), Internal Period;
convers Int.Perio Ext.Peri Int.Date|
PERIOD_AND_DATE_CO ion for d od Period, e.g.
NVERT_INPUT a date
MM/DD/YYY
with 1 D
Y
period.
2 W WW/YYYY
3 M MM/YYYY
4 P ?
5 K ?
Date Import : YYYYMMDD (Internal
V
convers Date), Language, Country, Internal
DAT
ion Period;
Export : country specific date|
period string (External Date),
Conver External Period, External Period
sion of Text.
a date Int.Pe Ext.Pe Ext.Date, Ext.Per.
with riod riod e.g. Text
PERIOD_AND_DATE_CO
period
NVERT_OUTPUT MM/DD/
specific 1 D
YYYY
ation
with WW/YY
2 W Week
output. YY
MM/YY
3 M Month
YY
4 P ? space
5 K ? space Calndr
Test
tool - Import: date in current external format for
Functio user; number of days.
BCAT DATE_IN_FUTURE
n Export: calculated date in future in
module external format mm/dd/yyyy
s
RS_VARI_V_1_ACTUAL_
MONTH
RS_VARI_V_1_LAST_MO Returns first day of the actual/last/next
NTH month.
RS_VARI_V_1_NEXT_MO
NTH
RS_VARI_V_ACTUAL_M
Returns selection range for the actual/last
ONTH
month.
RS_VARI_V_LAST_MONT
Output: 1st line in table P_DATETAB
H
Returns selection range from today-a_days
to today+b_days.
RS_VARI_V_DAYS_UP_T Input: 1st line in P_INTRANGE
O_NOW (a=P_INTRANGE-LOW,
b=P_INTRANGE-HIGH);
Output: 1st line in table P_DATETAB
Returns selection range from today-
a_work_days to today+b_work_days.
Input: a=P_INTRANGE-LOW,
RS_VARI_V_WDAYS_UP_ b=P_INTRANGE-HIGH (if
TO_NOW P_INTRANGE-SIGN <> 'C');
Fact.Calendar Id = P_INTRANGE-
OPTION (if P_INTRANGE-SIGN = 'C')
Output: 1st line in table P_DATETAB
Returns selection range for the actual
Variabl month [-a_months +b_months].
e date RS_VARI_V_MONTH_XX Input: 1st line in P_INTRANGE
fields in X_YYY (a=P_INTRANGE-LOW,
variants b=P_INTRANGE-HIGH);
SVAV Output: 1st line in table P_DATETAB
Note. RS_VARI_V_L_LAST_MO
Local NTH Returns last day of last month.
time for
user Returns selection range for the actual
RS_VARI_V_MONTH_UP_
month up to now.
TO_NOW
Output: 1st line in table P_DATETAB
RS_VARI_V_QUARTER1X
XXX
Returns selection range for the Quarter of
RS_VARI_V_QUARTER2X
the given year.
XXX
Input: 1st line in P_INTRANGE
RS_VARI_V_QUARTER3X
(Year=P_INTRANGE-LOW);
XXX
Output: 1st line in table P_DATETAB
RS_VARI_V_QUARTER4X
XXX
RS_VARI_V_TODAY Today
Returns Today + P_INTRANGE-LOW
Country
-
specific
Examples of output: MM/YY,
date
D Date DATUMSAUFBEREITUN MM/YYYY, DD.MM,
formatti
ATD format G M/D/YYYY, DD/MM/YYYY,
ng for
WW/YY, WW/YYYY.
the
current
user.
Module
to go
Archivi back Funny module: 03/31/2002 - 1
C ng CCM_GO_BACK_MONTH specifie
CMC functio
n group
S d
number month = 02/31/2002
of

months
DMM_OPER can be '+', '-' or '='.
if '=', then

• DMM_POS = 'BEG' -
return 1st day of the
DMM_COUNT month of
the same year. Use MM
format (e.g. 02) otherwise
HR-PT: you can get date like
HR-PT:
Add or '2 /12/2002' for February
Get
HR_PT_ADD_MONTH_TO subtract
RPP3 levels, .
_DATE months
rates,
to a
etc
date • DMM_POS = 'END' -
returns the
(DMM_COUNT month +
1), (day - 1) for the input
date DMM_DATIN.
Bug: try DMM_DATIN =
MM/31/YYYY,
DMM_COUNT = 1  .
RE
instalm
F RE_ADD_MONTH_TO_DA This module really can add/subtract
ent
VOZ TE months to/from date.
paymen
ts
R HR-D: RP_LAST_DAY_OF_MON HR-D:
Determi
Payroll
ne last
PDD German THS
day of
y
month
FIMA DAYS_BETWEEN_TWO_
auxiliar DATES
FV02 y
functio MONTHS_BETWEEN_TW Integer number
ns O_DATES
Functio Returns
PRICING_DETERMINE_D
V61A ns for Days/Weeks/Months/Years
ATES
Pricing between two dates (float values)
Real
Estate
Most universal FM to determine
financia MONTHS_BETWEEN_TW
FVVI months (both integer and float
l assets O_DATES_NEW
values)
manage
ment
Returns list of months (for a
MONTH_NAMES_GET
language)
Returns list of days (for a
DAY_NAMES_GET
language)
FACTORY_CALENDAR_G Returns list of factory calendars
ET (for a language)
Calenda HOLIDAY_CALENDAR_G Returns list of holiday calendars
r: ET (for a language)
Additio FACTORY_CALENDAR_A Returns attributes of the factory
SCA5
nal TTRIBUTE_GET calendar
functio
ns Input: Factory calendar; Holiday
calendar; Date range
HOLIDAY_GET
Returns: list of all holidays in the
date range
Input: Factory calendar; Holiday
calendar; Date range
DAY_ATTRIBUTES_GET
Returns: list of all days with
attributes in the date range

Currency:
Functi Functio Function module name Functio Description
on n group n
module
group descript
descript
name ion
ion
Currenc • All the currency
y amounts are stored in
FWOS_CURRENCY_DECIM
FWOS translati SAP tables as
ALS_READ
on for CURR(n,2) (the same
flows as DEC(n,2)). So before
CONVERT_TO_LOCAL_CU any arithmetic
RRENCY operation value should
be adjusted using the
real decimals number
for the given currency
(stored in TCURX).
• Conversion Rates by
type and date are stored
in TCURR (+factors).
Standard type is M.
Date is stored in
inverted format (the
most recent date has the
numerically smallest
value). ABAP code to
convert dates:
o convert date
p_date into
inverted-date
w_date.
o convert
inverted-date
w_date into date
p_date.
• the only difference
between
CONVERT_TO_LOCA
L_CURRENCY and
CONVERT_TO_FORE
IGN_CURRENCY
Translati seems to be the
on of following:
Currenc o Foreign
SCUR
y CONVERT_TO_FOREIGN_ currency is
Amount CURRENCY TCURR-
s etc. FCURR (From
Currency)
o Local Currency
is TCURR-
TCURR (To
Currency)

So result will be
Both CONVERT_TO_LOCAL_CURRENCY and
CONVERT_TO_FOREIGN_CURRENCY use complicated logic considering contents of
the TCURX (Decimal Places in Currencies), TCURR (Exchange Rates), TCURF
(Conversion Factors) and other tables, € conversion rules etc. Often functions return error
message if information in the tables is inconsistent or not maintained.
To simple currency conversion can be used direct calculation based on the tables TCURR
and TCURX.
See also BAPIs:

• Currency (since 4.0A) - to get currencies and decimals

• ExchangeRate (since 4.5A) - to get exchange rates and factors for a date
1. convert an amount into
words
2. convert a number into
Convers Convert words
ion of numbers (CURRENCY=space)
F017 amounts SPELL_AMOUNT and
to words figures 3. set decimal point in an
utility in words amount and return
number of decimals for
the currency
(LANGUAGE=space)

Address:
Functio Function Function
n group module
Function module name Description
group descriptio descriptio
name n n
Get address data by
ADDR_GET
address number
Get communication data
Central for address number.
address Possible TABLE_TYPE:
SZA0 manageme ADTEL, ADFAX,
nt (w/o ADDR_COMM_GET ADTTX, ADTLX,
dialog) ADSMTP, ADRML,
ADX400, ADRFC,
ADPRT, ADSSF, ADURI,
ADPAG
Address see FM documentation.
format Note. It's enough to
ADDRESS_INTO_PRINTFO according import two
RM to Post parameters:
Office
Address guidelines • ADDRESS_TYPE
SADR
formatting = 1 (Firm or
Organization, SAP
ADDRESS_SHOW_PRINTF Address)
ORM
• ADDRESS_NUM
BER
see tables:

• ADRC - Addresses (central address admin.)

Units of measure (UOM):


Functi Function Function
on group module
Function module name Description
group descriptio descriptio
name n n
Measurem
ent unit
conversio
CONVERSION_FACTOR_GE n: Get
T measurem
ent unit
conversio
n factor Not for Dimensionless
Measurem Units of Measure
Measurem
ent units: ent unit
SCV0
Conversio conversio
n UNIT_CONVERSION_SIMPL
n by table
E
T006,
with
rounding
UNIT_OF_MEASURE_SAP_T
O_ISO
UNIT_OF_MEASURE_ISO_T
O_SAP
MAME Mat. MATERIAL_UNIT_CONVER Material For Dimensionless Units
quantity
of Measure (Each, Piece,
conversio
Box etc.) conversion
n from
depends on the given
Base Unit
Material (see table
Master: of
MARM). For other Units
Determine Measure
SION of Measure (Length,
Units of to
Weigth etc.) conversion
Measure Alternativ
can be calculated from the
e Unit of
T006 table or via
Measure
CONVERSION_FACTO
and vice
R_GET.
versa.
CONVERSION_EXIT_CUNIT Conversion exit for commercial (3-
_INPUT char) measurement unit INPUT
CONVERSION_EXIT_CUNIT Conversion exit for commercial (3-
_OUTPUT char) measurement unit OUTPUT
CONVERSION_EXIT_LUNIT Conversion exit for technical (6-
_INPUT char) measurement unit INPUT
Measurem CONVERSION_EXIT_LUNIT Conversion exit for technical (6-
ent units: _OUTPUT char) measurement unit OUTPUT
SCVU
Conversio
n, F4 help Input help
Allows to browse/select
for
an internal/external UOM
measurem
from commercial(3-
UNIT_OF_MEASUREMENT_ ent units
char)/technical(6-char)
HELP of a
UOMs, possible with
predefined
predefined dimension (see
dimension
FM documentation).
(F4 help)

BDC:
Function Function
Function group
group Function module name module Description
description
name description
Open batch input
BDC_OPEN_GROUP
session
Close batch input
SBDC Batch input BDC_CLOSE_GROUP
session
Add data to batch
BDC_INSERT
input session
Popup Windows:
Functi Functio
on n group Function module
Function module name Description
group descript description
name ion
Displays an
internal
table and
returns
Global index of
POPUP_WITH_TABLE_DIS Popup to display internal
KYSY function chosen line.
PLAY table data
s Good also
for F4 (on
value-
request)
function.
Does the
same as
default F4
(on value-
request)
function.
Can be
used, for
example, if
Popup to display default F4
HELP_VALUES_GET selected
help values for a table field
value
should be
used for
Help immediate
function update
SHL3 s for another
external screen
use fields.
Example.
Standard popup to display
F4 help values for a table
field as internal table with
HELP_VALUES_GET_NO_D additional columns (all
D_NAME fields should be active Data
Dictionary table fields).
Allow selection for each Example
column. (obsolete since 4.0)
Prepare formatted internal
TRANSFER_NAMES_TO_FI table to use as parameter of
ELDS HELP_VALUES_GET_NO
_DD_NAME.
Should be
F4 help also returning the used as
F4IF_INT_TABLE_VALUE_
F4 value to be displayed in standard
REQUEST
interface internal table since 4.0.
module Example
SDHI
for Standard F4
external help for a
appl. F4IF_FIELD_VALUE_REQU F4 help for fields that are
Data
EST only known at runtime
Dictionary
help
Returns 'J'
Popup a question (two lines
POPUP_TO_CONFIRM_STE for Yes, 'N'
of text) with buttons Yes, No
P for No, 'A'
[,Cancel]
for Cancel.
Popup a diagnostic message
Returns 'J'
(two lines of text) and a
POPUP_TO_CONFIRM_WI for Yes, 'N'
question (two lines of text)
TH_MESSAGE for No, 'A'
Dialog with buttons Yes, No
for Cancel.
box for [,Cancel]
SPO1
save Returns '1'
prompts Popup a question with two and '2' for
POPUP_TO_CONFIRM customized buttons (e.g. 1st and 2nd
Yes, No) and [Cancel] buttons, 'A'
for Cancel.
Popup a 'Data will be lost'
POPUP_TO_CONFIRM_LOS and question (two lines of Returns 'J'
S_OF_DATA text) with buttons Yes and or 'N'.
No
Calls
General
POPUP_TO_CONFIRM_DAT POPUP_TO_CONFIRM_S
SHI5 Functio
A_LOSS TEP with 'Changed data will
ns
be lost. Save?'
Reposit
ory Info Returns
System Popup a question (two lines Answer='J'(
SEUO POPUP_TO_DECIDE_INFO
- of text). Yes) and
backgro 'A'(Cancel).
und
Returns '1'
Popup a question (three
and '2' for
lines of text) with two
POPUP_TO_DECIDE 1st and 2nd
customized buttons and
Dialog buttons, 'A'
[Cancel]
box for for Cancel.
SPO2
deciding Popup a message (three Returns '1'
ages lines of text) and a question and '2' for
POPUP_TO_DECIDE_WITH
(three lines of text) with two 1st and 2nd
_MESSAGE
customized buttons and buttons, 'A'
[Cancel] for Cancel.
Returns
Answer=' '
Popup to request for a field
POPUP_TO_GET_VALUE if the value
of the given dictionary table.
Dialog changed, 'C'
box for if not.
SPO3
entering Returns
data Answer='J'
POPUP_TO_GET_ONE_VAL Popup to request for a string
if the value
UE value.
entered, 'A'
if not.
Dialog box for the display
POPUP_GET_VALUES and request of values,
without check
Dialog box for requesting One or
POPUP_GET_VALUES_DB_
values, check against the more DB
CHECKED
DB table/view table/view
Dialog box for requesting fields
values, check by user exit (Medium
POPUP_GET_VALUES_USE
(import parameters field label
R_CHECKED
FORMNAME and for data
Dialog
PROGRAMNAME) element
box for
SPO4 display Dialog box for requesting used as
values, call of user exits prompt
and
(import parameters text).
request
FORMNAME and Returncode
POPUP_GET_VALUES_USE PROGRAMNAME) and =' ' if the
R_HELP help (import parameters value
F1_FORMNAME and entered, 'A'
F1_PROGRAMNAME, if cancel.
F4_FORMNAME and
F4_PROGRAMNAME) Example
Dialog box for requesting
POPUP_GET_VALUES_USE
values and offering user
R_BUTTONS
pushbuttons
Returns
Answer='J'
if modified,
POPUP_TO_MODIFY_TEXT Text field has length 45.
'A' if not
(and empty
FI-LC: field).
Currenc POPUP_CONTINUE_YES_N Returns 'J'
y O or 'N'.
GLU2 translati Like this:
on Value 1
customi Value 2
zing Value 3
Value 4
LC_POPUP_RADIO_5 Value 5
Returns No
of line or
'A' if
cancelled.
Like this:
Value 1
Dialog Value 2
box for Value 3
Displays internal table as Value 4
SPO5 selectin POPUP_TO_DECIDE_LIST
radiobuttons. Returns No
g from
lists of line or
'A' if
cancelled.
Shift
Plannin
g:
POPUP_TO_DISPLAY_TEX Displays two lines of text
RHRD Rqmnts
T like (I) message.
Definiti
on
Maint.
Monitor
Displays four long lines of
STMO ing POPUP_TO_INFORM
text.
statistics
List
processi
ng - Displays 'Action not possible' string and
POPUP_DISPLAY_MESSAG
SLST addition formatted message (input: Message Id,
E
al Number and parameters).
function
s
ALDB Logical COMPLEX_SELECTIONS_ External Call 'Multiple Displays
standard
'Multiple
Selection'
window
(like after
pressing
database button
s in DIALOG Selection' on selection
ABAP/4 screen) for
a range or
select-
option
(table
parameter
RANGE).
See also:

• F4 popup screen for Units of Measure (UOM).

Lists (Reports):
Functio Function Function
n group module
Function module name Description
group descripti descriptio
name on n
Builds nice ready to print
table within Report Id,
variant, date/time and
selected parameters /
Logical selection options.
databases Receives Report Id (sy-
ALDB PRINT_SELECTIONS
in cprog), variant (sy-slset).
ABAP/4 Note. Parameter MODE is
not used. Returns internal
table (parameter
INFOTABLE).
Example.
SVAP Variant RS_COVERPAGE_SELECTI Internal Called from
maintenan ONS use: PRINT_SELECTIONS
ce Generate
table for
printing
cover
sheet
Just prints selection
FIFM: FM_SELECTION_CRITERIA criteria for the report (sy-
FMRE
Reporting _PRINT cprog).
Example.
Read,
determine Read,
, change determine,
spool change Only correct way to
print spool print modify a print or archive
SPRI GET_PRINT_PARAMETERS
parameter parameters parameter record (see FM
s and and documentation).
archive archive
parameter parameters
s
report report01.
...
data listtab like
listobject occurs 1.
...
* Either other report
Prepared * has exported the
list to memory, or
list import
LIST_FROM_MEMORY submit report02...
from exporting list
memory to memory and return.
call function
'LIST_FROM_MEMORY'
tables
listobject = listtab.
* process listtab
(see below)
LIST_TO_MEMORY Exports list of SY-LSIND to memory
List
processin LIST_FREE_MEMORY Refreshes list saved in memory [and
SLST g- listobject table]
additional Writes list (e.g. imported
functions from memory), not
Display a encapsulated in a CALL
WRITE_LIST (saved) list SCREEN. Can be used
object after or before WRITE
statement to add list data
to the current screen
List object Displays list (e.g.
display imported from memory)
DISPLAY_LIST
(ABAPLI in full screen or dialog
ST) box.
Saves list of SY-LSIND as
SAVE_LIST Save list
internal table
LIST_TO_ASCI Saves list of SY-LSIND as text
internal table (without line breaks,
LIST_TO_TXT icons, colors etc)
Like List->Save->Local
file. METHOD = RTF |
ABAP list
LIST_DOWNLOAD DAT | HTML | NOCO(no
download
conversion) |
space(selection dialog)
Download list in ASCI format (called
DOWNLOAD_LIST from LIST_DOWNLOAD when
METHOD = NOCO)
Download list in HTML format
LIST_DOWNLOAD_HTML (called from LIST_DOWNLOAD
Internal
when METHOD = HTML)
system
SYSF E.g. to place an
functions
(lists) interactively-selected line
(SY-LILLI) directly after
Scroll List
the page header:
Display: call function
LIST_SCROLL_LINE_TOPM Selected 'LIST_SCROLL_LINE_TOP
OST Line MOST'
Becomes exporting
list_line = sy-lilli.
First Line
See FM documentation.
See also SCROLL
statement.
LIST_SCAN Calls standard Find window.

Programs:
Functio Function Function
n group module
Function module name Description
group descriptio descriptio
name n n
Allows submit
another report
Current
with
RS_REFRESH_FROM_SELECTOPTI contents of
parameters
ONS selection
entered for the
screen
current report.
Example.
Input: report/variant;
RS_VARIANT_CONTENTS
Output: variant contents
Copy all variants from one
RS_COPY_SELECTION_SETS
report to another report
Returns list of selection
screen parameters and
RS_REPORTSELECTIONS_INFO
select-options, including
Variant
default values
SVAR maintenanc
e Returns list of variants for
RS_VARIANT_INFO report(s), additional
selection criteria allowed
RS_VARIANT_TEXT Returns variant short text
Assigns the variant values
RS_SUPPORT_SELECTIONS
to a loaded report
RS_VARIANT_EXISTS R_C = 0 if variant exists
Standard pop-up window
RS_VARIANT_CATALOG to select a variant for the
report
Maintain report variants:
STATUS=LIST to
RS_VARIANT_LIST
Display|Delete|Print
STATUS=LIS1 to Choose
is report
Gives
sel.screen
informatio
FMs for processing
n about the
SLDB logical RS_SUBMIT_INFO under run|print|
mode of
databases variant maint|
the current
submit via job
SUBMIT
etc.?

SAPscript:
Functio Function Function module name Function Description
n group module
group descriptio descripti
name n on
• to only
preview
the form:
options-
tdpreview
='X'
(options-
tdnoprint
forbids
print even
from
preview)
SAPscript • to get OTF
: Open data
OPEN_FORM
form instead of
printing printing:
options-
tdgetotf='
X'

• to output
OTF data
to memory
buffer
instead of
printing:
device='O
SAPscript TF_MEM'
composer
STXC • spool #:
 result-
Example tdspoolid

SAPscript • OTF data:


: End otfdata
CLOSE_FORM
layout set (when
printing options-
tdgetotf='
X' in
OPEN_FO
RM)
SAPscript
: Output
text
WRITE_FORM
element in
form
window
Write
OTF
SAVE_OTF_TO_MEMORY
format to export|import
memory OTF internal
table to|from
Read OTF memory id ...
READ_OTF_FROM_MEMORY from
memory
print OTF from
PRINT_OTF
internal table
Display
an OTF
DISPLAY_OTF
table on
the screen
Display a tables
postscript postscript
DISPLAY_POSTSCRIPT
table on structure
the screen itcps
Convert
OTF
format to
CONVERT_OTF various ASCII or PDF
formats
OTF (TLINE
STXW screen table)
output
Convert OTF to PDF
(TLINE table). OTF can be
CONVERT_OTF_2_PDF
filled used archivelink. Calls
CONVERT_OTF.
Convert OTF to PDF
(TLINE table). Calls
CONVERT_OTF. Looks
CONVERT_OTF_2_PDF_ARCHIV like the function names for
ELINK these two functions are

mixed up 
CONVERT_OTF_AND_FAX
CONVERT_OTF_AND_MAIL
Input: spool # (SAPscript:
CONVERT_OTFSPOOLJOB_2_PD tsp01-rqdoctype='OTF');
F Output: PDF as internal
table (TLINE) Example
Input: spool # (ABAP
listing: tsp01-
CONVERT_ABAPSPOOLJOB_2_P
rqdoctype='LIST'); Output:
Messages:
Function Function Function
group group Function module name module Description
name description description
Import:
Read T100 Language;
message and Message Id, #
Application
format and variables;
SLG9 log: Auxiliary MESSAGE_PREPARE
message
functions
with Export:
parameters formatted
message text.
Import:
Message Id, #
and variables;
Set up a
RV Condition Export:
message
V12B Generation - MESSAGE_TEXT_BUILD formatted
with
General message text.
parameter
Since 4.x can
be replaced
by: MESSAGE
... INTO f.
New in 4.5a.
Import:
Message Id,
BAPIs for Read long #, variables
BATG Reading BAPI_MESSAGE_GETDETAIL text of error and formats;
Documentation message Export:
formatted
message text
and long text.

Data Dictionary and Data Processing:


Functio Function
Function
n group module
group Function module name Description
descript descripti
name
ion on
Checks if
Exceptions:
a fixed
Accesses CHECK_DOMAIN_VALUES value is WRONG_VALUE,
for DOM_NOT_FOUN
valid for
Generato D
MGF2 domain
r & For.
Key Read out With text
Checks GET_DOMAIN_VALUES fixed descriptions:
values of Example1
a domain Example2
External
ABAP/4 interface
Called from
Dict.: for
GET_DOMAIN_VA
official reading
SDEX DD_DOMVALUES_GET LUES. Allows use of
ext. the
any Language for
interface domain
text descriptions.
s fixed
values
DD:
Interface
Length, Texts etc.
for
Example - print
DDIF_FIELDINFO_GET retrieving
current values of the
informati
system fields (SY-...)
on about
DD field
DD:
Interface
to Read a
Table
DDIF_TABL_GET Length, Texts etc.
from the
ABAP
Dictionar
y
DD:
Interface
to Read a
Interface Runtime Length etc., but not
s for the DDIF_NAMETAB_GET Object Texts (called from
SDIF ABAP/4 from the GET_FIELDTAB).
Dictiona ABAP
ry Dictionar
y
DD:
Interface
to Read a
Lengths, Domain etc.
Data
for the Data Element
DDIF_DTEL_GET Element
(see also table
from the
DD04V)
ABAP
Dictionar
y
DD:
Interface
to Read a
Lengths etc. for the
Domain
DDIF_DOMA_GET Domain (see also
from the
table DD01V)
ABAP
Dictionar
y
SDD3 Dictiona GET_FIELDTAB Read Obsolete. Length,
ry fields of a Texts etc. Example
interface table in
the
s format
DFIES
Check Authorization
Objects
Check S_TABU_DIS (for
authority whole table class
VIEW_AUTHORITY_CHEC
for according to the table
K
table/vie TDDAT) and
Editing w. S_TABU_CLI (if
SVIX tabular client-independent
data table).
Lock/Unl
ock data
Whole table or
VIEW_ENQUEUE in
selection
table/vie
w.
ENQUEUE_E_TABLEE Whole table or
/1BCDWBEN/ DEQUEUE_E_TABLEE selection (called
SENQ ENQUEUE_E_TABLES Lock/Unl from
DEQUEUE_E_TABLES ock data VIEW_ENQUEUE)
in table. Exclusive | Shared
/1BCDWBEN/ ENQUEUE_E_TABLE
Whole table or
SEN4 DEQUEUE_E_TABLE
selection
LOI:
Data CLOI_PUT_SIGN_IN_FRON Put sign
LOIK And condense result
Conversi T in front.
on
Returns output length for the
Maintain table field or for the ABAP type
KCD_SFELD_OUTPUT_LEN
KCD0 Data (C,N,D,T,P).
GTH_GET
Transfer Note. Add 1 if P (FM doesn't
provide place for sign +/-)

Screens:
Function
Function Function
group Function module name module Description
group
description description
name
Reads a
DYNP_VALUES_READ
Help screen field
SHL2 Example.
functions Updates a
DYNP_VALUES_UPDATE
screen field
Powerful function
Make use module to control
of SELECT-OPTIONS
SELECT- (see FM
FMs for
SELECT_OPTIONS_RESTRIC OPTIONS documentation).
SLDB logical
T easier on E.g. fully forbids
databases
the intervals in
selection SELECT-
screen OPTIONS:
Example.
Combines into one
character field:
icon, text, additional
text that will appear
General Transfer on mouse over
functions Icon Name event. This field can
ICON for ICON_CREATE and Text to be used for screen
graphical a Screen field or for list
elements Field output field as well.
Example:

Transfer
Populates listbox
Value
values to
parameter (like )
SVSM Request VRM_SET_VALUES
listbox
with values for
Manager
parameter
selection. Example
Can be called while
Sets own INITIALIZATION
FMs for
RS_SET_SELSCREEN_STATU GUI status to set needed PF-
SLDB logical
S on selection STATUS before
databases
screens selection screen
output.

SAPGUI, RFC:
Functio Function Function module name Function Description
n group module
group descriptio descripti
name n on
SAPGUI ver. 4.0B:
Set
'Progress
SAPgui SAPGUI_PROGRESS_INDI
SGUI Indicator' SAPGUI ver. 4.6D:
interface CATOR
in Current
Window

If destination = 'SAPGUI"
then returns:
Returns - SAP character set;
RFC
System - SAPGUI version;
SRFC administrat RFC_SYSTEM_INFO
Informati - Frontend computer Name,
ion
on. Operating System and IP-
address etc.
Example.
Returns
IP address, computer name,
User
TH_USER_INFO sessions. Example1 (3.1),
Informati
Example2 (4.6).
on.
TH_LONG_USR_INFO Returns User Sessions Information.
The message will appear in
SAPGUI popup window.
Send
The user can be in other
message
TH_POPUP mandant (parameter
to a SAP
CLIENT) or SAP system
user.
Task (call ... destination
THFB handler DEST ...)
functions Call transaction [using bdctab].
TH_REM_TRANSACTION Remotely if call ... destination
DEST ...
Login and Call transaction [using
TH_REMOTE_TRANSACT
bdctab] on remoted system (parameter
ION
DEST).
Login and Call transaction [using
bdctab] on remoted system (call ...
TH_SAP_LOGIN destination DEST ...). Called
from
TH_REMOTE_TRANSACTION
SAPphone: Returns IP-address and
PHOH Help TERMINAL_ID_GET Terminal(Computer) Id for the
functions particular SAP User.
SDTX Desktop RFC_READ_TABLE External As of 4.6c, not Released to
access to
Access R/3 tables Customers
via RFC

OLE, Excel:
Functio
Functio
Function n
n group
group Function module name module Description
descript
name descript
ion
ion
HR/PC Just calls
EXCEL_OLE_STANDARD_
RPPC interfac MS_EXCEL_OLE_STANDA
DAT
e RD_DAT
OLE -
Downloads internal table and
PC MS_EXCEL_OLE_STANDA
SLPC opens it in MS Excel.
interfac RD_DAT
Example.
e
Uploads an *.xls file to
internal table (max cell length
= 32). Example. This function
uses a range selection and
Data copy-paste technique,
transfer KCD_EXCEL_OLE_TO_IN
KCDE
from PC T_CONVERT
files

therefore it quite fast.
There is another Example 2
that reads data from Excel file

cell by cell. 
FI-AA
Legacy the same as
Data ALSM_EXCEL_TO_INTER KCD_EXCEL_OLE_TO_INT
ALSMEX
Transfer NAL_TABLE _CONVERT but max cell
w/ length = 50
Excel
General just [download internal table
FTBU_C
conversi FTBU_START_EXCEL to file and] start Excel (w/o
ONV
on OLE). See also WS_EXCEL
The TXXL function group uses the DLLs and other files installed with SAPGUI in
directory: ...\Program Files\SAP\FrontEnd\SAPgui\xxl\
Can work both with Excel and Lotus 1-2-3:
Output SAP examples:
Excel
XXL_FULL_API list • XXLFTEST (XXL Test
viewer Environment /
list XXL_FULL_API
Example)
• XXLTTEST (XXL
Output Interface: Test
list Program for Formats
viewer and Types (also
XXL_SIMPLE_API list with XXL_FULL_API))
EXCEL reduced
- list function • XXLSTEST (XXL Test
TXXL viewer s Environment /
interfac XXL_SIMPLE_API
e Example)
Examble of use in customer
reports:
if question = 'STARTABLE'
and return_code <> 0
then "Download to Excel"
XXL_CHECK_API button has to be excluded
from a pf-status

In fact, the return_code is


always set to 0 in the FM
source code  .

Jobs:
Function Function Function
group group Function module name module Description
name description description
Job, Step, Event
GET_JOB_RUNTIME_INFO
etc.
Open Job
Scheduling
Open background
Without
job and obtain the
JOB_OPEN Dialog
job Id
(Including
(JOBCOUNT)
COMMIT
WORK)
Insert
Background
Task in
Background Add step to the
BTCH JOB_SUBMIT Background
processing opened job
Request with
COMMIT
WORK
Close
Background
JOB_CLOSE Request With Release the job
COMMIT
WORK
Ofter used to
Trigger
submit
BP_EVENT_RAISE Background
background job
Event
by event

Spools:
Function Function
Function
group module
group Function module name Description
descripti descripti
name
on on
Displays
RSPO_RID_SPOOLREQ_DIS spool(s)
Input: Spool ID list.
P contents
on screen
Input: Spool ID
Spool
Output: Spool Info
RSPO_ISELECT_TSP01 Informati
(Structure
on
TSP01SYS)
The raw data
contains format
codes and therefore
Collection Input:
cannot be used in
SPOOL_SP0 for New Spool
WRITE statement
1R SP01 Info
(in some cases). To
(Remote) (Structure
display ABAP spool
TSP01SY
can be used two
S)
RSPO_IRETURN_RAW_DAT function modules
Output:
A below (Example).
Raw data
How to write
table (text
SAPscript spool -
with
example can be
some
found in SAP utility
format
FM
codes)
RSPO_ROUTPUT_
JOB, which prints
spool(s).
Should be
called
before
RSPO_SPOOLDATA_WRITE
using
_INIT
next
Spool: function
SPOC Conversio module
ns
Just write
line.
RSPO_SPOOLDATA_WRITE Input:
Raw data
table line
Return spool data in text [or
PDF format]:
Input: Spool #; Desired Type
RSPO_RETURN_SPOOLJOB for output (RAW - text data
ready to be printed, PDF - can
be used only for OTF spools)
Output: text table (line length
= 255), [table for PDF data]
Spooler RSPO_DISPLAY_SPOOLJOB
SPOX eXtended RSPO_RETURN_ABAP_SPO Output: text table
functions OLJOB ready to be printed
RSPO_DISPLAY_ABAP_SPO Input:
OLJOB Spool #

RSPO_GET_TYPE_SPOOLJ Output:
OB IS_OTF='X'|' '
Input: Spool # and File name.
RSPO_DOWNLOAD_SPOOL Just calls consecutively
JOB RSPO_RETURN_SPOOLJO
B and WS_DOWNLOAD
How to convert SAPscript|ABAP spool to PDF

Users and Authorizations:


Functio Function Function
n group module
Function module name Description
group descripti descriptio
name on n
USER_EXISTS
PROFILE_EXISTS returns result in exeptions
OBJECT_EXISTS
returns user details (can display
SUSR_SHOW_USER_DETAILS
them in popup window)
returns defaults for the users in
SUSR_GET_USER_DEFAULTS
Function table parameter
modules AUTHORITY_CHECK_TCODE check user via CALL
SUSE
for ext. authorizati 'AUTH_CHECK_TC
usage on for a ODE'
SUSR_AUTHORITY_CHECK_S_ tcode
using via AUTHORITY-
TCODE
different CHECK OBJECT
procedures 'S_TCODE'
Display authorizations (for a
SUSR_USER_AUTH_FOR_OBJ_
specified object) belonging to a
GET
user

System and Transports:


Functi Function Function
on group module
Function module name Description
group descriptio descripti
name n on
Create request
IW_C_CREATE_TRANSPORT_ (Workbench, Transport
REQUEST etc.), assigning next
request # w/o dialog
KEN: Add objects to request
Transport (Workbench, Transport
SI23 etc.) If all objects are
Info
Objects IW_C_APPEND_OBJECTS_TO_ unlocked, then dialog to
choose request. If one
REQUEST
of objects is locked in a
request, then remaining
objects added to the
same request
SVRY Version SVRS_AFTER_CHANGED_ONL Generate new
Managem INE_NEW version. Only
ent: for the objects
External that:
• versionable
Interfaces • exist in TADIR

• locked or local
Program RS_GET_ALL_INCLUDES
SEDA
parsing RS_GET_MAINPROGRAMS
Import: function group
Get
name.
Function
Export: table of
RS_FUNCTION_POOL_CONTE Modules
Interfaces NTS function modules
in a
to (function module name
SEUF Function
Function <->ABAP program
Group
Builder name)
Get function module information
FUNC_GET_OBJECT (main program, include number,
parameters and source code.
Depending on
the import
parameter,
returns the
following data:

• PROGRAM -
namespace,
function group
• COMPLETE_A
REA -
namespace,
function group
Example: find
main program
for function
group.
• INCLUDE -
o namespa
ce,
Get
function
Function
group
Modules
o include
and
(without
FUNCTION_INCLUDE_SPLIT Includes
namespa
Belongin
ce)
g to a
o include
Function
number
Group
(for
function
module
includes)
o 3-
character
suffix,

o function
module
name
(for
Function function
Library module
SUNI includes,
program
interface and if
SUPPRE
SS_SEL
ECT=sp
See also tables:

• TLIBG - Person responsible for function class (list of all function groups)
• TFDIR - Function Module
• ENLFDIR - Additional Attributes for Function Modules

• FUPARAREF - Parameters of function modules

Application Log:
Functio
Function
Function n
group
group Function module name module Description
descripti
name descrip
on
tion
Returns Log(s) header and
Read messages into internal
Applicati Applica tables.
on Log APPL_LOG_READ_DB_W tion E.g. all the messages for an
SLG1
(old): ITH_LOGNO Log by IDoc # can be read from
Read Log application log if the
Number EDIDS-APPL_LOG
contains the log number.
Display
Applicati Applica
on Log APPL_LOG_DISPLAY_WI tion Displays Log(s) like
SLG3
(old): TH_LOGNO Log by transaction SLG1.
Display Log
Number
Functional Groups SLG* exist since 3.0. New more flexible function modules exist since
4.6 (Function Groups SBAL_*, Function Modules like BAL_*).
Read
New in 4.5a.
Details
Import: Log Numbers /
BAPIs for of
[Message Numbers];
Reading BAPI_APPLICATIONLOG Entries
BATG Export: formatted messages.
Document _GETDETAIL in
(calls
ation Applica
APPL_LOG_DISPLAY_WI
tion
TH_LOGNO)
Log
Applica
tion
Log:
Log:
BAL_LOG_CREATE
Create
Applicati with
on Log: header
SBAL data
Collect
Messages Applica
tion Created log can be referred
Log: by Log Handle. (log handle
BAL_LOG_MSG_ADD
Log: can be skipped if the
Messag program itself created and is
e: Add using the log).
Applica Example.
tion
Log:
Applicati Fullscre
SBAL_DIS on Log: en log
BAL_DSP_LOG_DISPLAY
PLAY Display output
Log (like
transact
ion
SLG1)
Logs in memory and in the database are referred to in the new Application Log by the log
handle (LOG_HANDLE), but the previous LOGNUMBER, which is assigned from
number range interval 01 of number range object APPL_LOG when you save, still exists.
A lot of applications have a reference to this LOGNUMBER in their structures, so it is still
supported. The LOGNUMBER is also more understandable for users than the
LOG_HANDLE. There is a 1:1 relationship between LOG_HANDLE and LOGNUMBER.

ALE, EDI, IDocs:


Funct Functio Functio
ion n n
group group Function module name module Description
descrip descrip
name tion tion
I. Opening Idoc to process:
EDI
interfac Initiates the generation of an IDoc.
EDI_DOCUMENT_OPEN_F e: Open <-- IDENTIFIER - temporary Id
OR_CREATE IDoc for referring in following FMs
for (multiprocessing allowed)
create
EDI
interfac
e: Open If the
IDoc EDI_DOCUMENT_OPEN_FOR_
EDI_DOCUMENT_OPEN_F
for CREATE failed but the IDoc must
OR_FORCE
create be passed to the database
with (multiprocessing allowed)
few/no
checks
EDI
interfac Simulates the creation of an IDoc.
EDI_DOCUMENT_OPEN_F e: Open No number specification and
OR_TRACE IDoc database operations
for (multiprocessing allowed).
trace
EDI_DOCUMENT_OPEN_F open in edit mode with locking of
OR_EDIT the IDoc
Open
IDoc To change status records and
EDI_DOCUMENT_OPEN_F
for control record (multiprocessing
OR_PROCESS
processi allowed)
ng
EDI
interfac
status of the IDoc cannot be
EDI_DOCUMENT_OPEN_F e: Open
changed (multiprocessing
OR_READ IDoc
allowed)
for
reading
II. Processing Idoc (after step I):
EDI
interfac
e:
Sequent
EDI_SEGMENT_GET_NEX
ial
T
accesse
s to
data
record
Display
EDI:
last
display
status
data, EDI_DOCUMENT_STATUS
EDI5 record like in WE02
status, _DISPLAY
for
ctrl
current
record
IDoc
Calls in order:

Writes • EDI_DOCUMENT_OPEN
one or _FOR_PROCESS
ALE:
more • IDOC_STATUS_CONVE
IDoc IDOC_STATUS_WRITE_TO
BD15 status RT
functio _DATABASE
records • EDI_STATUS_ADD_BLO
ns (3.0)
for an CK
IDoc
• EDI_DOCUMENT_CLOS
E_PROCESS

XML:
Functio Function Function
n group module
Function module name Description
group descripti descripti
name on on
Convert SAP data
SDIXML_DATA_TO_D (elementary/structured
OM /table types) into
DOM (XML)
Convert DOM (XML) Example
(Since into string of bytes
SDIXM 4.6D, in SDIXML_DOM_TO_X that can be
L 4.6C - ML
downloaded to PC or
beta) application server
SDIXML_DOM_TO_SC
Display DOM (XML)
REEN
SDIXML_DOM_TO_DA
TA
All this can be made using the objects except of SDIXML_DOM_TO_DATA and
SDIXML_DATA_TO_DOM (ABAP OO-versions will be soon).

Example in OO-style.
standard program for inbound
IDoc:
processing that imports an XML
Inbound IDOC_XML_FROM_FI
EDIN file from the file system,
processin LE
converts it into IDoc format, and
g
passes it to ALE layer.

Miscellaneous:
Functio Function Function
n group module
Function module name Description
group descriptio descriptio
name n n
Access
routines Up to 5
SAL2 RZL_SLEEP Sleep
for RZL seconds
storage
ENQUEU
Without
SENT E utilities ENQUE_SLEEP Sleep
restrictions
and test
Returns
Random random
QF05_RANDOM number number
generator between 0 and
Random 1
QF05 number Returns
generators random
Random
integer
QF05_RANDOM_INTEGER (whole)
number
number
between min
and max
Conversion Used
exit especially with
CONVERSION_EXIT_ALPHA_INPU
ALPHA, account
T
external- numbers.
>internal Numeric fields
(only
numbers, can
ALPHA
ALFA be spaces
conversion Conversion before and
exit after them):
CONVERSION_EXIT_ALPHA_OUTP
ALPHA, " 1234 "
UT
internal- ->
>external "0000001234"
"0000001234"
->
"1234 "

Miscellaneous: Static Methods of ABAP Objects:


Static
Class method
Class Static method Comments
description descriptio
n
cl_abap_math ABAP: round_f_to_15_decs round Sometimes
Math variable of type F (float)
Library type f to is used to
15 represent
decimals exact data
(Amounts,
Quantities):

• if values are
to big to be
represented
as Packed (>
31 decimals)
• to
significally
improve
performance
of
calculations,
e.g. in
statistical
reports

This method helps


to round float data
correctly: Example
Called automatically
by SAP to free
Utilities for
memory for objects
ABAP Execute
cl_abap_memory_utilit do_garbage_collecti created by
Memory Garbage
ies on CREATE OBJECT .
Manageme Collection
.. and
nt
CREATE DATA ...
statements
since 4.6

SD:
Functio Function Function
n group module
Function module name Description
group descripti descripti
name on on

Example
Reads Don't forget also check
sales direct reference documents
document for the both starting
RV SD
flow of document # and
Documen preceding/following
RV_ORDER_FLOW_INFOR sales
V05C t Flow
MATION document document types that you
Cumulati are searching for (For
after
ve Qties
delivery example, if you search
and delivery for the given SO,
billing check also LIPS-VGBEL
and LIPS-VGPOS, if it's
possible with regard to
performance).
Reads sales document
header and business data:
SD_SALES_DOCUMENT_RE tables VBAK, VBKD and
AD VBPA (Sold-to (AG),
Payer (RG) and Ship-to
(WE) parties)
Reads sales document
SD_SALES_DOCUMENT_RE header and item material:
AD_POS tables VBAK, VBAP-
MATNR
partner information
SD_DOCUMENT_PARTNER_
including address. Calls
READ
SD_PARTNER_READ
In: at least VBAK-VBELN
Exceptions: NO
SD_DETERMINE_CONTRAC
SD CONTRACT |
T_TYPE
Functions SERVICE_CONTRACT |
for QUANTITY_CONTRACT
V45A
Copying copy
Documen Sales
ts Doc into
new one
with the
required
SD_SALES_DOCUMENT_CO
Sales
PY
Doc Type
(VBAK-
AUART) Example - create
for subsequent document
further
creating.
create
Sales
SD_SALES_DOCUMENT_SA Doc from
VE the
copied
document
Sales
Order
SD_SALES_DOCUMENT_EN to dequeue use
V45K Processin
QUEUE DEQUEUE_EVVBAKE
g
Functions
SD Index all the partners information
V05I SD_PARTNER_READ
Update and addresses
Data
provision
RV_DELIVERY_PRINT_VIE for
W delivery
SD Data note
Collectio printing
V05O n for Dlv
SD_PACKING_PRINT_VIEW
Note
Printing called from
Data
RV_DELIVERY_PRINT_
collection
SD_DELIVERY_VIEW VIEW,
for
SD_PACKING_PRINT_VI
printing
EW
Data
SD Data
Provision
Collectio
for
V05N n for Bill RV_BILLING_PRINT_VIEW
Billing
Doc
Documen
Printing
t Print
RV_PRICE_PRINT_HEAD To be used in print program to get
pricing data on header [and item]
level.

• Input: structures KOMK


(fields
mandt,kalsm,waerk,knumv,
Functions vbtyp to be taken from
V61A for VBDKR, kappl='V').
Pricing RV_PRICE_PRINT_ITEM [and KOMP (field kposn to
be taken from VBDPR, field
mglme (quantity) can be
changed to calculate price
accordingly].

• Output: pricing data in tables


TKOMV [and TKOMVD].

MM:
Functio Function
Function
n module
group Function module name Description
group descriptio
description
name n
Material
number
CONVERSION_EXIT_MATN1_ E.g. 00001234 ->
conversion
OUTPUT 1234
Material (OUTPUT
OMCV Number )
Conversion Material
E.g. 1234 ->
CONVERSION_EXIT_MATN1_ number
000000000000001
INPUT conversion
234
(INPUT)
For material numbers conversion, in contrast to simple ALFA conversion, more
complicated logic is used including customer exit MGA00003 (see transaction SMOD).

 Very
useful function
module to create
new material
master data or to
Create and change existing
BAPIs for
Change material master
1001UE Creating/Chan
BAPI_MATERIAL_SAVEDATA Material data, although it is
B ging Matl
Master not used directly
Data
Data as method in any
BAPI object, and
therefore cannot
be found via
transaction BAPI.
See Function
Module
Documentation
MGDS Screen SELECTION_VIEWS_FIND Determine
Sequence
Control:
Material
Views for
View
Selection functional

One of

Master or View modules for those


Configurat who still has to
ion use BDC for
Material Master
transactions
(MM01 and
MM02). Allows to
determine line
number for
desired view in
the "Select
View(s)" window,
to prepare BDC
for the view
access.
See skeleton as
complete
example.
Read
Read
History of
EINR Purchasing ME_READ_HISTORY
Purchasing Example
Document
Document
Will be called:
I_EDIT='X' => ME22
I_DISPLAY_ONLY='X' or
default => ME23
Display
MESHO ME_DISPLAY_PURCHASE_DO I_ENJOY='X' => new
Purchasing
W CUMENT transactions: ME23N /
Documents
ME22N
I_PREVIEW='X' => screen
preview for default output
type
BAPIs Both
MEWP BAPI_PO_CREATE
Purchase order BAPIs
create an
PO, but
BAPI_PO
_CREATE
1:

• allows
much
more
things:
entering
conditions,
Create test mode,
BAPI in the purchase hold
Enjoy order uncomplet
2012 BAPI_PO_CREATE1
Purchase e POs etc.
Order
• not listen
in BAPI
transaction
(4.6C),
because
this
method of
2012
business
object is
not
released

MRP:
Functio
Functi Functio
n
on n group
Function module name module Description
group descript
descript
name ion
ion
CS_BOM_EXPLOSION_MAT old version (before 3.0)
CS_BOM_EXPL_MAT_V2 Explode BOM for Production.
Mostly necessary input
parameters:

• CAPID (Application
Id): 'PP01' (Production
- general)
• DATUV (Validity
date)
• MTNRV (Material)
• WERKS (Plant)
BOM
explosio Example: Explode assembly
n for (including phantom
CS_BOM_EXPL_KND_V1 material assemblies up to last level)
BOM
CSS4 explosio Explode BOM for Sales and
ns Distribution. Additional input
parameters:

• CAPID (Application
Id): 'SD01' (Sales and
Distribution)
• VBELN (Sales order
number)

• VBPOS (Item in sales


order)
Internal function module,
General called by all FMs from
BOM function group CSS4 (for
CS_BOM_EXPLOSION
explosio material as well as for
n equipment, Project Position,
Document etc.)
BOMs:
CS_WHERE_USED_MAT where-
used list
Bills of
material
CS_WHERE_USED_MAT_VIA ; where- returns BOM##, parent
_CLA used list materials and other
BOMs: via information for component.
CSS5 where- classes Additional criterias: valid
used list Bills of dates, item category and BOM
material usage, plant (can be '*' to
; where- select all plants).
CS_WHERE_USED_MAT_AN used list
Y as
material
or class
item
In SAP 4.6C this function group is used in report RCS15001 (Material Where-Used List),
which called from transaction CS15 (Single-Level Where-Used List)
BOM - API New and simplified function
APIs for Bills of module. Input: only
CSEP_MAT_BOM_SELECT_
CSEP Enterpri Material component name (material
WHERE_USED
se : Select number). Return the same as
Portal BOM(s) function modules above.
Returns internal table within
Docume materials and documents for
DOCUMENTS_TO_CHANGE_ nts for the engineering change
NUMBER Change number AENR-AENNR (just
Number select * from the DRAW
General table).
DMS
CVIN Check
Functio
ns use of
Raises NO_USAGE if not
change
DOCUMENTS_CHANGE_NU used. Calls
number
MBER_USAGE DOCUMENTS_TO_CHANG
for
E_NUMBER to check usage
docume
nts
Read MRP Table data.
Input: MRP Table # and
Aggregated MRP list flag
M61R DISPOBELEG_LESEN (MDKP-DTNUM and
MDKP-CFLAG).
Output: MRP Table data (~
MDTB data)
FI:
Function Function
Function
group module
group Function module name Description
descriptio descriptio
name
n n
Posting
Business
period
Object
BAPI_GL_ACC_GETPERIODBALAN balances
3006 General
CES for each
Ledger
G/L
Account
account
FI_CHART_OF_ACCOUNT_DETER
MINE
FACSCOR FI_COMPANY_CODE_CHECK
Self-explaining
E FI_COMPANY_CODE_DATA
FI_COUNTRY_CHECK
FI_COUNTRY_DATA
FI_GL_ACCOUNT_CHECK
FI_GL_ACCOUNT_DATA
FI
Services FI_VENDOR_CHECK
FACS Self-explaining
for FI/CO FI_VENDOR_DATA
Interface
FI_CUSTOMER_CHECK
FI_CUSTOMER_DATA

FI-CO:
Functio Function Function
n group module
Function module name Description
group descriptio descripti
name n on
Good for F4 (on value-
request) function.
Imports a field name
and returns chosen
Group name for the
field:
Cost
RACC Account
KSATR element
T group
group
Searchin
Busines
g for s KSTR
Cost
PRZNR object
cost- process G
group
group
object
K_GROUP_SELECT Cost
groups KOSTL center
AUFN Order
R group
group
via a
Statistical
CO pop-up Activit
STAG key
LSTAR y type
Reporting window group
R figure
KAB2 group
: General Sender
Sender
Functions SKOST
cost
SLSTA activity
center
group
group
PRCTR Profit Network
VORN
RPRCT center activity
R
R group group
POSID

Example.
CO:
searches
a
document
K_DOCUMENT_SELECT also good for F4
number
according
to certain
criteria
K_F4_STANDARD_HIERARCHY Displays hierarchy tree for the
_VALUE given SETCLASS and Valuation
Area (requested in separate
dialog window), returns selected
value | node.
Import parameter SETCLASS:
Group values see in GSETC type-pool.
KKHI Maintena Following standard hierarchies
nce K_F4_STANDARD_HIERARCHY allowed in the FMs:
_NODE
• 0101 - Cost Center
• 0106 - Profit Center
• 0107 - Business Process

Example

FI-SL Sets:
Functio Function Function
n group module
Function module name Description
group descripti descriptio
name on n
Imports a set Id and table
name and returns an internal
table filled with elements of
SETS:
Read All the set.
Generatin
G_SET_GET_ALL_VALU Values in 3.1H Example (set Id = 0H +
GSGE g and
ES a Set Group name).
reading
Hierarchy 4.6C Example (retrieve set Id
sets
using
G_SET_GET_ID_FROM_N
AME).
Imports a set Id and table
name and returns two internal
tables filled with

1. elements of the set;


2. hierarchy tree of the
Importing
set.
G_SET_TREE_IMPORT a Set
Hierarchy
3.1H Example (set Id = 0H +
Group name).
4.6C Example (retrieve set Id
using
SETS: G_SET_GET_ID_FROM_N
GSAC access to AME).
set tables
Derives the internal set Id
from the name that appears on
Determini the user interface, e.g. in
ng a Set order then to import the set
ID from (see the function group and
G_SET_GET_ID_FROM_ the Set function module
NAME Name and documentation). To take in
Other account changes in SET
Informatio concept in 4.6C: see examples
n to
G_SET_GET_ALL_VALUES
and G_SET_TREE_IMPORT.
SETS:
GSSM Set-
Manager
See also example reports:

• RGSEX001 - Read-only access with G_SET_TREE_IMPORT


• RGSEX000, RGSEX010, RGSEX020 - Access with modules from the function
group GSSM
• RGSEX030 - Create a set

Tables:

• T800S - FI-SL Set Table (before Release 4.0)

Classification and Characteristics:


Function Function Function module name Function Description
group module
group descriptio descriptio
name n n
Receives configuration
number (and, optionally,
business object and
timestamp of
configuration version).
CUCB_GET_VALUES_FROM_INSTAN
CUCB CBase Returns table of
CE
characteristic values.
Example (get and print
characteristics and their
values for the sales
order item).

See also:

• Main Page.
• ABAP/4 compendium.
• SAP R/3 system fields.
• ABAP/4 functions.
• ABAP/4 obsolete statements and functions.
• ABAP/4 skeletons.
• ABAP in SAP R/3 ver 4.6 - Object Oriented Language.
• Object Oriented ABAP - Features and Restrictions.
• Object Oriented ABAP - Demos.
• ABAP/4 UNIX browser.
• ABAP Utilities.

• Main Page.

You might also like