Sappress Function Modules in Abap
Sappress Function Modules in Abap
Tanmaya Gupta
Bonn Boston
850.book Seite 5 Dienstag, 8. Oktober 2013 5:16 17
Contents at a Glance
Contents
Acknowledgments ........................................................................................... 33
Introduction .................................................................................................... 35
7
850.book Seite 8 Dienstag, 8. Oktober 2013 5:16 17
Contents
26 TH_POPUP ............................................................................................ 74
27 TH_REMOTE_TRANSACTION ................................................................ 75
28 TH_SERVER_LIST ................................................................................... 76
29 TH_STOP_WP ........................................................................................ 77
30 TH_USER_INFO ..................................................................................... 78
31 TH_USER_LIST ....................................................................................... 79
32 TRFC_RECEIVER_INFO .......................................................................... 80
33 USER_EXISTS ......................................................................................... 81
8
850.book Seite 9 Dienstag, 8. Oktober 2013 5:16 17
Contents
9
850.book Seite 10 Dienstag, 8. Oktober 2013 5:16 17
Contents
10
850.book Seite 11 Dienstag, 8. Oktober 2013 5:16 17
Contents
11
850.book Seite 12 Dienstag, 8. Oktober 2013 5:16 17
Contents
12
850.book Seite 13 Dienstag, 8. Oktober 2013 5:16 17
Contents
13
850.book Seite 14 Dienstag, 8. Oktober 2013 5:16 17
Contents
14
850.book Seite 15 Dienstag, 8. Oktober 2013 5:16 17
Contents
15
850.book Seite 16 Dienstag, 8. Oktober 2013 5:16 17
Contents
16
850.book Seite 17 Dienstag, 8. Oktober 2013 5:16 17
Contents
17
850.book Seite 18 Dienstag, 8. Oktober 2013 5:16 17
Contents
Part VII: Frontend Services and Microsoft Office Integration ....... 421
332 ALSM_EXCEL_TO_INTERNAL_TABLE ..................................................... 423
333 EXCEL_OLE_STANDARD_DAT ............................................................... 423
334 EXECUTE_WINWORD ........................................................................... 425
335 FILE_GET_NAME ................................................................................... 425
336 FILENAME_GET ..................................................................................... 428
337 GUI_DOWNLOAD ................................................................................. 428
338 GUI_HAS_ACTIVEX ................................................................................ 433
339 GUI_IS_AVAILABLE ............................................................................... 434
340 GUI_IS_ITS ............................................................................................ 434
341 GUI_UPLOAD ........................................................................................ 434
342 KCD_EXCEL_OLE_TO_INT_CONVERT .................................................... 437
343 KD_GET_FILENAME_ON_F4 .................................................................. 438
344 MS_EXCEL_OLE_STANDARD_DAT ........................................................ 439
345 RH_START_EXCEL_WITH_DATA ............................................................ 440
346 RS_SEND_MAIL_FOR_SPOOLLIST ......................................................... 442
347 SAP_CONVERT_TO_XLS_FORMAT ........................................................ 443
348 SO_ATTACHMENT_INSERT_API1 .......................................................... 443
349 SO_ATTACHMENT_READ_API1 ............................................................. 445
350 SO_DLI_INSERT_API1 ............................................................................ 446
351 SO_DLI_READ_API1 .............................................................................. 447
352 SO_DOCUMENT_INSERT_API1 ............................................................. 449
353 SO_DOCUMENT_READ_API1 ................................................................ 450
354 SO_DOCUMENT_SEND_API1 ................................................................ 452
355 SO_NEW_DOCUMENT_ATT_SEND_API1 .............................................. 454
356 SO_NEW_DOCUMENT_SEND_API1 ...................................................... 456
18
850.book Seite 19 Dienstag, 8. Oktober 2013 5:16 17
Contents
19
850.book Seite 20 Dienstag, 8. Oktober 2013 5:16 17
Contents
20
850.book Seite 21 Dienstag, 8. Oktober 2013 5:16 17
Contents
21
850.book Seite 22 Dienstag, 8. Oktober 2013 5:16 17
Contents
22
850.book Seite 23 Dienstag, 8. Oktober 2013 5:16 17
Contents
23
850.book Seite 24 Dienstag, 8. Oktober 2013 5:16 17
Contents
24
850.book Seite 25 Dienstag, 8. Oktober 2013 5:16 17
Contents
25
850.book Seite 26 Dienstag, 8. Oktober 2013 5:16 17
Contents
26
850.book Seite 27 Dienstag, 8. Oktober 2013 5:16 17
Contents
27
850.book Seite 28 Dienstag, 8. Oktober 2013 5:16 17
Contents
28
850.book Seite 29 Dienstag, 8. Oktober 2013 5:16 17
Contents
29
850.book Seite 30 Dienstag, 8. Oktober 2013 5:16 17
Contents
30
850.book Seite 31 Dienstag, 8. Oktober 2013 5:16 17
Contents
31
850.book Seite 35 Dienstag, 8. Oktober 2013 5:16 17
Introduction
Function modules (or FMs, as we’ll often refer to them throughout the book) are
templates that can be used and re-used within ABAP code in order to perform spe-
cific tasks. Instead of writing code to perform a certain functionality every time
that functionality is needed, programmers can simply call a function module tem-
plate within the logic. Then the programmer needs only to fill out the template
with the details that are specific to his particular program, and the functionality is
executed.
The most efficient programmers are those who have a commanding knowledge of
function modules, which can save the time of writing unnecessary custom code.
However, with about 7,000 function modules provided and released by SAP, un-
derstanding all of these FMs isn’t an easy task.
This book is your guide to the most commonly used FMs in direct programming
activities. We’ve also included common FMs that are related to SAP functionality
but are used in the background. For example, a user may receive an error, and the
error root cause is the FM executed in the background. Additionally, SAP uses FMs
in its standard delivered transactions. A user might want to redesign and custom-
ize those functionalities with some additional options and might need to use an
FM.
During our research for the book, we created, analyzed, and worked on a list of
thousands of released FMs, as well as some very common but not released FMs.
Based on our research, this book names and describes the most commonly used
FMs from that list of thousands, which we identified by searching where-used lists
35
850.book Seite 36 Dienstag, 8. Oktober 2013 5:16 17
Introduction
for each FM, as well as extensive help and Google searches. Our goal was to pro-
vide an invaluable reference for all those who work in ABAP development.
Note
Although you can use unreleased FMs in your programming, SAP offers no guarantee
that it will support these FMs in the future or that these FMs are correct. You can go to
a FM’s ATTRIBUTE tab via Transaction SE37 to see if the FM is released.
This book has been structured to be as user- and reader-friendly as possible. Each
FM is first explained in general terms and then defined with an example to help
you understand when, where, and why you can use that FM. Some of the FMs will
also contain figures to show how you can use the FM and what results you can ex-
pect from the FM call.
Part I
Part I focuses on the FMs associated with systems. “System” here refers to SAP ERP
or SAP NetWeaver systems. This part deals with more of the Basis-related opera-
tions such as calling a new transaction, calling SAP NetWeaver from legacy sys-
tems, such as Java or Visual Basic (VB), or calling from an FTP server or a remote
location. This part also provides you with the FMs related to IP addresses, user au-
thorizations, login and logoff of the user in the system, calling a transaction in an-
other window, and so on.
36
850.book Seite 37 Dienstag, 8. Oktober 2013 5:16 17
Introduction
Part II
This part focuses on the ABAP Data Dictionary. This is the central repository of
ABAP, which describes and manages all of the data definitions used in the ABAP
system and the database. ABAP Data Dictionary supports the definition of user-de-
fined types, such as data elements, structures, and table types. These types are used
in the ABAP processors and programs. It also defines the structure of database ob-
jects, such as tables, views, and indexes. These database objects are automatically
created in the underlying database with the definition of the ABAP Data Dictionary
when the objects are activated. It also provides editing tools such as search help
and lock objects.
Part III
This part includes FMs that are related to conversions of values from one format
to another, such as from character to float, from one SI unit to another, from spool
to PDF, and so on. FMs related to date, time, unit of measure, round off, and so
on are also covered in this part. This part also includes CONVERSION_EXIT FMs,
which are used to convert the SAP internal format to the user output format and
vice versa.
Part IV
This part includes FMs related to Batch Data Communication (BDC), ABAP List
Viewer (ALV), report programming, and screen programming. Report and screen
(dialog or module pool) programming are the main crux of the ABAP language. Re-
ports are the executable programs that mainly deal with reporting; that is, fetching
the data from the database, processing it, and displaying the results. Results are dis-
played by ALV. This part defines various FMs such as those for calling an ALV, cre-
ating a field catalog for ALV, calling the BDC, reading and displaying the screen
values, and so on.
Part V
This part focuses on FMs related to form printing. SAP’s first form technology was
SAPscript. In release 4.6, SAP introduced Smart Forms, which eased the creation
of form output by allowing modeling of logic and output using graphical tools. In
release 6.40, SAP introduced SAP Interactive Forms by Adobe, where the graphical
editor was much easier to use, provided many more functionalities, and rendered
output exactly as designed in the editor (PDF). This part contains the FMs used to
call the Smart Forms or Adobe Interactive Forms; reading, saving, and updating
the SAPscript texts; and so on.
37
850.book Seite 38 Dienstag, 8. Oktober 2013 5:16 17
Introduction
Part VI
This part contains various functions such as archives, number ranges, texts, and
strings that you’ll use while developing your programs. You’ll use archives to store
the old data and information (which isn’t in use) in your secondary storage so that
you free the current memory for usage while still being able to refer to the infor-
mation whenever required.
Database records of the commercial objects such as purchase documents, sales doc-
uments, addresses, and so on are uniquely identified by a number or an ID. Num-
ber ranges assign the next available numbers to these commercial object database
records and help provide unique identification. This part also contains FMs for text
and string operations such as splitting the text based on some separator, concate-
nating strings, and so on.
Part VII
This part contains the FMs related to frontend services and Microsoft Office inte-
gration. Frontend services contain the FMs related to SAP GUI frontends such as
GUI_DOWNLOAD, which downloads the FMs to your computer, and GUI_UP-
LOAD, which uploads the FMs.
Office integration deals with the FMs related to Microsoft Office features such as
opening the file in Word and Excel.
Part VIII
An Intermediate Document (IDoc) is the data container used to transfer data be-
tween two systems. Application Link Enabling (ALE) and Electronic Data Inter-
change (EDI) are used for exchanging business data between different systems.
Data is distributed through ALE when you want to communicate from one SAP
system to one or more other (mostly SAP) systems. ALE transfers the data in IDoc
format and uses the tRFC (transactional RFC) method for data transfer. EDI, on the
other hand, is generally used if you want to transfer business application docu-
ment with the external partner system like vendor or customer. This part focuses
on the ALE, EDI, and IDoc FMs; that is, FMs used to send IDoc data from one sys-
tem to another.
Part IX
This part contains the FMs related to SAP users and their authorizations to execute
transactions. Users are maintained in Transaction SU01 (User Master), and data are
saved in user-specific tables, whose names generally start with “USR” such as
38
850.book Seite 39 Dienstag, 8. Oktober 2013 5:16 17
Introduction
USR01, USR02, USR03, and so on. This part contains the FMs that are used to set
user details such as an address, print the address in Smart Forms, and so on. This
part also contains the FM to check whether the user has relevant authorizations to
execute any transaction, to execute any ABAP Data Dictionary table or view, or to
access any file.
Part X
This part contains the FMs related to spools and jobs. A spool request is the docu-
ment for which a print function has been selected and not yet been printed. The
spool system uses the spool request to store the print data temporarily and access
it. An output request is created for the spool request document that outputs the
print data of the spool request to a particular output device (e.g., printer).
SAP background processing automates routine tasks and helps you optimize your
organization’s SAP computing resources. Background processing tells the SAP sys-
tem to run programs for you. It also lets you move long-running or resource-inten-
sive program runs to times when the system load is low. You can delegate the task
of running reports or programs to the system. Background processing isn’t tied up
with the user interaction and dialog screens. This part covers FMs used for creating
a spool request, finding the spool request, opening the job, submitting the job for
background processing, closing the job, and so on.
Part XI
This part deals with communication with the user via messages or popups. Mes-
sage texts (standard or custom) are generally used to provide information, warn-
ing, success, or error details to the user.
This part contains the FMs for creating a message, sending and collecting the mes-
sages for the message handler, and taking user confirmation in popup screens.
Popup screens are used to show the time and date, to display help, and so on.
Part XII
The Transport Management System plays an important role in the development
and customizing environment. All of the development is locked under the task of
the transport in the development system, which is moved to the quality system
and finally to the production system. The Transport Management System admin-
isters and controls the new development, and records the version of the changes
made for a particular program. This part focuses on FMs used in the Transport
Management System.
39
00b_Intro_Type.fm Seite 40 Donnerstag, 10. Oktober 2013 11:18 11
Introduction
Part XIII
Application logs are used for logging application events. This process is similar to
using a system log where system event information is recorded. The advantage of
an application log is that it’s a system-wide standardized process and is convenient
to analyze. Several application logs can be written at the same time by an applica-
tion. This part defines the FMs related to application logs.
Part XIV
Business Application Programming Interfaces (BAPIs) define the API methods for
SAP business objects. These business object types and their BAPIs are described
and stored in the Business Object Repository (BOR). BAPIs are always remote func-
tion call (RFC) enabled, so they can also be called from external application systems
and other programs. BAPIs are also related to SAP components such as Sales and
Distribution (SD), Materials Management (MM), Production Planning (PP), Quali-
ty Management (QM), Warehouse Management (WM), and so on. This part con-
tains all of the commonly used BAPIs.
Part XV
This part contains miscellaneous FMs that are important and commonly used but
can’t be categorized into any of the preceding parts. Many component-specific
FMs that aren’t BAPIs are covered in this part.
I Import
Import parameters are the parameters or values that you pass on to the FM to ex-
ecute it correctly when you’re in an ABAP program. Some of the import parame-
ters are mandatory, and the rest are optional. Some import parameters are defined
with the default values; that is, if you don’t pass any value, then the default values
are automatically passed.
40
850.book Seite 41 Dienstag, 8. Oktober 2013 5:16 17
Introduction
X Export
Export parameters contain the results returned from the FM execution.
C Changing
Changing parameters indicate those parameters whose value is changed in the FM.
These parameters can be considered as import and export parameters; for exam-
ple, an input value is passed in the FM. The value is used, and a new value after
execution of the FM is returned in the same parameter.
T Tables
Table parameters contain the internal table that you want to pass in the FM. Table
parameters are also like changing parameters, in that some of the values can be
changed after the execution of the FM.
E Exceptions
Exceptions are the errors or some exemptions that might have occurred during FM
execution. They generally return the messages that define what problem has oc-
curred. Exceptions should be handled in the program that is calling the FM, and
the message explaining the exception should be displayed to the user.
41
850.book Seite 485 Dienstag, 8. Oktober 2013 5:16 17
Part IX
Users and Authorizations
This part of the book contains the function modules (FMs) related to users who are
using SAP and their authorizations to execute transactions. Users are maintained
in Transaction SU01 (User Master), and data are saved in user-specific tables,
whose names generally start with “USR” such as USR01, USR02, USR03 and so on.
This part contains the FMs that are used to set user details, such as an address;
printing the address in Smart Forms; and so on. This part also contains the FM to
check whether the user has relevant authorizations to execute any transaction, to
execute any ABAP Data Dictionary table or view, or to access any file.
850.book Seite 487 Dienstag, 8. Oktober 2013 5:16 17
ADDR_DIALOG 384
384 ADDR_DIALOG
This FM displays the dialog box in which you
can maintain the complete address of a user,
X Export
I Import E Exceptions
ADDRESS_NOT_EXIST
CHECK_ADDRESS
Address does not exist or is invalid.
If this parameter is set to X, the address con-
tents are checked. The default value is X.
Type: SZAD_FIELD-FLAG. GROUP_NOT_VALID
487
850.book Seite 488 Dienstag, 8. Oktober 2013 5:16 17
385 ADDR_DIALOG_PREPARE
This FM sets parameters for address mainte-
FIELD_SELECTION_FOR_NATION
nance or filtering conditions for field selec-
tion, which reduces the parameters of address Field for the selection control structure.
dialog screen. This FM should be called before Type: ADDR1_FSEL-FISEL.
calling the address maintenance dialog (from
FM ADDR_DIALOG [FM 384]) to set up appli-
USE_FS_FOR_NATION
cation-specific parameters for the address dia-
log. These address settings are valid until the Checkbox field. Type: SZAD_FIELD-FLAG.
end of the LUW or until the FM is called again
and overwrites them.
KEYWORDS
Example: If you want to change the title bar of
the address dialog screen, exclude/include any Dynamic key word structure. Type: ADDR1_
pushbutton, or apply some other condition, KEYW.
you can pass these parameters in this FM,
which parameterizes the address dialog TITLEBAR
screen. Next, when you call FM ADDR_DIA-
Address maintenance screen title bar. Type:
LOG (FM 384), it displays the changes you
SY-TITLE.
made to parameterize the address dialog box.
CHANGE_DEFAULT_COMM_TYPES
I Import
Activate/deactivate communication types.
Type: ADDR_COMM.
FIELD_SELECTION
488
850.book Seite 489 Dienstag, 8. Oktober 2013 5:16 17
ADDR_GET 386
USE_PSEUDO_REQUIRED_FIELDS E Exceptions
T
This address dialog box appears
Tables when FM ADDR_DIALOG executes.
EXCLUDED_FUNCTIONS
INCLUDED_FUNCTIONS
ERROR_TABLE
386 ADDR_GET
This FM reads the address of an entity in the
SAP system without the dialog box screen. If
I Import
489
850.book Seite 490 Dienstag, 8. Oktober 2013 5:16 17
READ_TEXTS T Tables
VERSIONS
490
850.book Seite 491 Dienstag, 8. Oktober 2013 5:16 17
ADDR_GET_COMPLETE 387
E Exceptions VERSION_NOT_EXIST
387 ADDR_GET_COMPLETE
This FM provides you with all of the details
ARCHIVE_HANDLE
for the given address number or address han-
dle, including all of the communication types Read address from archive. Type: SY-TABIX.
and notes about the address or communica-
tion type. All of the valid communication
IV_CURRENT_COMM_DATA
types are defined in table TSAC(T).
Example: To get the complete address of the This parameter determines the current sta-
plant on your selection screen along with the tus of communication data The default value
communication details for that address, you is X. Type: AD_COMCURR.
can pass the parameter to and call this FM.
X Export
I Import
ADDR1_COMPLETE
ADDRNUMBER
The complete address object (including com-
Address number for which you want the munication) is returned in this parameter.
complete information. This parameter is a Type: SZADR_ADDR1_COMPLETE.
key of the database table. Type: ADDR1_
E
SEL-ADDRNUMBER.
Exceptions
ADDRHANDLE
PARAMETER_ERROR
Address handle for which you want the com-
plete information. This is a temporary key Incorrect parameter values.
for the address. Type: ADDR1_SEL-
ADDRHANDLE. ADDRESS_NOT_EXIST
491
850.book Seite 492 Dienstag, 8. Oktober 2013 5:16 17
INTERNAL_ERROR WRONG_ACCESS_TO_ARCHIVE
388 ADDR_INSERT
This FM inserts an address without a dialog. read, and structure SADR is returned filled,
This FM creates an address in the local memo- in addition to ADDR1_VAL.
ry of the function group SZA0. These FMs are If no conversion has occurred, table SADR is
also used in this process: read, the SADR structure is returned, and
왘 ADDR_NUMBER_GET (FM 391) structure ADDR1_DATA from SADR is also
filled. Type: ADRG-ADDR_GROUP.
왘 ADDR_MEMORY_SAVE (FM 390)
왘 ADDR_MEMORY_CLEAR (FM 389)
ADDRESS_HANDLE
Example: To create a normal address, you can
Address handle for which you want the com-
pass the relevant import parameter into and
plete information. This is a temporary key
call this FM, which inserts the address in local
for the address. Type: SZAD_FIELD-
memory.
HANDLE.
I Import DATE_FROM
If an address group whose addresses have al- If this parameter is set to X, the address con-
ready been converted is passed, ADRC is tents are checked. The default value is X.
Type: SZAD_FIELD-FLAG.
492
850.book Seite 493 Dienstag, 8. Oktober 2013 5:16 17
ADDR_MEMORY_CLEAR 389
X Export E Exceptions
ADDRESS_DATA ADDRESS_EXISTS
Parameter with address data. Type: ADDR1_ Address already exists in the handle.
DATA.
PARAMETER_ERROR
RETURNCODE
Incorrect parameter values.
Return code of the address. if the value of
the return code isn’t equal to (Space), at INTERNAL_ERROR
least one message is stored in the table
ERROR_TABLE. Type: SZAD_FIELD- Serious internal error (MESSAGE A...).
RETURNCODE.
T Tables
ERROR_TABLE
389 ADDR_MEMORY_CLEAR
This FM deletes the local memory contents. parameter FORCE if you want unsaved data to
All address data changes made since the first be cleared as well or just execute the FM with-
call of any FM or the last local memory save out passing any parameters. After this FM is
are discarded. This FM should be called after executed, the local memory is cleared (refer to
extensive read operations or when returning FM ADDR_INSERT [FM 388]).
to the application.
493
850.book Seite 494 Dienstag, 8. Oktober 2013 5:16 17
E Exceptions INTERNAL_ERROR
390 ADDR_MEMORY_SAVE
This FM saves all of the address data from the
local memory to the database. All address data
E Exceptions
I Import INTERNAL_ERROR
REFERENCE_MISSING
Reference is missing.
391 ADDR_NUMBER_GET
This FM assigns an address number; that is, Example: You’re creating a new address and
converts a temporary address number (ad- need to assign the address number to the ad-
dress handle) into a permanent address num- dress information. This address number is a
ber, which is saved in the database key. unique number that identifies the address.
You can pass the relevant parameters in this
494
850.book Seite 495 Dienstag, 8. Oktober 2013 5:16 17
ADDR_NUMBER_GET 391
E071K_TAB
GENERATE_TRANSPORT_ENTRIES
All transport entries that belong to the ad-
If this parameter is set to X, entries are gen- dress. Type: E071K.
erated for the transport request. Type:
SZAD_FIELD-FLAG.
495
09_Type_MC.fm Seite 496 Donnerstag, 10. Oktober 2013 11:19 11
E Exceptions INTERNAL_ERROR
392 ADDRESS_INTO_PRINTFORM
This FM formats an address for printing in the
ADDRESS_2
correct postal form with the required number
of lines from the input. This FM also returns a Address data transfer structure for type 2.
short address; that is, the name and city one- Type: ADRS2.
line short address for the data carrier. Many
country-specific formats are supported that
ADDRESS_3
correspond to the postal regulations of recipi-
ent countries. Address data transfer structure for type 3.
Example: If your application isn’t using the Type: ADRS3.
Business Address Services (BAS) for addresses,
but you still want to have country-specific ADDRESS_TYPE
addresses displayed in your form, you can do
pass the relevant parameters into and call this There are three address types:
FM. When you call this FM, you’ll receive the 왘 For address type 1: The normal address
country-specific address that can be used for (company or organization) structure used
printing the address. in most SAP applications.
왘 For address type 2: Address of a person.
I Import
왘 For address type 3: Work address, which
is usually the address of a contact person
in a company.
ADRSWA_IN
The default address type (Space) is treated as
Address data/control parameter. This pa- type 1 and is required for the upward com-
rameter is only used in address type (Space). patibility of the FM.
Type: ADRS. The interface parameters ADRSWA_IN and
ADRSWA_OUT are only used in address
ADDRESS_1 type (Space). Type: SZAD_FIELD-ADDR_
TYPE.
Address data transfer structure for type 1.
Type: ADRS1.
496
850.book Seite 497 Dienstag, 8. Oktober 2013 5:16 17
ADDRESS_INTO_PRINTFORM 392
ADDRESS_NUMBER NUMBER_OF_LINES
Address number (data is read directly). The Max. line length for the formatting (for type
address fields (Name, Street, City, etc.) for 1, 2, and 3). The default value is 10. Type:
formatting can either be passed in the appro- ADRS-ANZZL.
priate structure (ADDRESS1/2/3 or
ADRSWA_IN) or be read from the BAS data- STREET_HAS_PRIORITY
base tables, if this address is there, using the
address key. To read the database tables, the If this parameter is set to X, Street has prior-
keys are: ity over PO Box. Type: SZAD_FIELD-
왘 For address type 1: ADDRESS_NUMBER STREETPRIO.
PERSON_HANDLE NO_UPPER_CASE_FOR_CITY
Person handle for which you want the com- International post guidelines specify that the
plete information. Type: SZAD_FIELD- city and country in foreign addresses are
HANDLE. output in uppercase.
If this parameter is set to X, there is no con-
SENDER_COUNTRY version to uppercase. If (Space), country
and city are converted to uppercase. Type:
Sender country (for type 1, 2, and 3). Type: SZAD_FIELD-FLAG.
SZAD_FIELD-SEND_CNTRY.
IV_NATION
RECEIVER_LANGUAGE
International version for formatting. Type:
Recipient language (for type 1, 2, and 3). ADRC-NATION.
Type: T002-SPRAS.
497
850.book Seite 498 Dienstag, 8. Oktober 2013 5:16 17
IV_NATION_SPACE ADDRESS_PRINTFORM
Flag: Use international version space in all Formatted address (type 1, 2, and 3). Type:
cases. Type: T_BOOLE. ADRS_PRINT.
IV_PERSON_ABOVE_ORGANIZATION ADDRESS_SHORT_FORM
Print person above organization. Type: Short form of the formatted address (type 1,
T_BOOLE. 2, and 3). Type: SZAD_FIELD-ADDR_
SHORT.
IS_BUPA_TIME_DEPENDENCY
ADDRESS_SHORT_FORM_S
Transfer structure for time dependency.
Type: ADBUPA_TD. Short form, including street (type 1, 2, and
3). Type: SZAD_FIELD-ADDR_SHORT.
IV_LANGU_CREA
ADDRESS_DATA_CARRIER
Language key. Type: T002-SPRAS.
Data carrier address (type 1, 2, and 3). Type:
IV_DISPLAY_COUNTRY_IN_SHRTFORM SZAD_FIELD-ADDR_DC.
498
850.book Seite 499 Dienstag, 8. Oktober 2013 5:16 17
ADDRESS_SHOW_PRINTFORM 393
ADDRESS_PRINTFORM_TABLE ADDRESS_SHORT_FORM_WO_NAME
Formatted address in table form. The for- Short form street and city (type 1, 2, and 3).
matted address is returned in an internal ta- Type: SZAD_FIELD-ADDR_SHORT.
ble. LINE_TYPE specifies the line type
(name, city, street, etc.) per line. Type: EV_NATION
SZADR_PRINTFORM_TABLE.
Actual version used if IV_NATION was
transmitted. Type: ADRC-NATION.
393 ADDRESS_SHOW_PRINTFORM
This FM displays the formatted address in a 왘 For address type 1: Normal address (com-
popup. pany or organization) structure used in
most SAP applications.
Example: To display the print preview of an
address according to the postal guidelines of a 왘 For address type 2: Address of a person.
country, call this FM and fill in the parame- 왘 For address type 3: Work address, which
ters, and the address appears in a popup. is usually the address of a contact person
in a company.
The default address type (Space) is treated as
I Import type 1 and is required for the upward com-
patibility of the FM.
ADDRESS_1 The interface parameters ADRSWA_IN and
ADRSWA_OUT are only used in address
Address data transfer structure for type 1.
type (Space). Type: SZAD_FIELD-ADDR_
Type: ADRS1.
TYPE.
ADDRESS_2
ADDRESS_NUMBER
Address data transfer structure for type 2.
Address number (data is read directly). The
Type: ADRS2.
address fields (Name, Street, City, etc.) for
formatting can either be passed in the appro-
ADDRESS_3
priate structure (ADDRESS1/2/3 or
ADRSWA_IN) or be read from the BAS data-
Address data transfer structure for type 3.
base tables, if this address is there, using the
Type: ADRS3.
address key. To read the database tables, the
keys are:
ADDRESS_TYPE
왘 For address type 1: ADDRESS_NUMBER
There are three address types: 왘 For address type 2: ADDRESS_NUMBER
and PERSON_NUMBER
499
850.book Seite 500 Dienstag, 8. Oktober 2013 5:16 17
PERSON_NUMBER LANGUAGE_FOR_COUNTRY_NAME
Person number (data are read directly). This parameter specifies the country output
Type: ADRP-PERSNUMBER. language for a foreign address. Otherwise,
the sender country language is used. Type:
PERSON_HANDLE T002-SPRAS.
500
850.book Seite 501 Dienstag, 8. Oktober 2013 5:16 17
AUTHORITY_CHECK_DATASET 394
ADDRESS_DATA_CARRIER ADDRESS_NOT_FOUND
Data carrier address (type 1, 2, and 3). Type: This parameter has the value X if the address
SZAD_FIELD-ADDR_DC. isn’t found in the BAS database table when
the address number is entered. Type: SZAD_
NUMBER_OF_USED_LINES FIELD-FLAG.
394 AUTHORITY_CHECK_DATASET
This FM allows you to check authorizations to specified, the system assumes the current
access files with the key words OPEN program. Type: AUTHB-PROGRAM.
DATASET, READ DATASET, TRANSFER, and
DELETE DATASET. The authorization check is ACTIVITY
performed using the authorization object S_
DATASET. Access type. Possible values are:
Example: You want to access the file ABC. Be- 왘 READ: Read file.
fore opening the file, first you need to check if 왘 WRITE: Change file.
you’re authorized to access the file. You can 왘 READ_WITH_FILTER: Read file with filter
pass the parameters into and call FM function.
AUTHORITY_CHECK_DATASET. You’ll get an
왘 WRITE_WITH_FILTER: Change file with
exception if you’re not authorized to access
filter function.
the file.
왘 DELETE: Delete file.
Type: C.
I Import
FILENAME
PROGRAM
File name for authorization. Type: AUTHB-
ABAP program from which authorization FILENAME.
needs to be checked. If no program name is
501
850.book Seite 502 Dienstag, 8. Oktober 2013 5:16 17
E Exceptions ACTIVITY_UNKNOWN
395 AUTHORITY_CHECK_TCODE
This FM checks whether you’re authorized to
execute a transaction code. The authorization
I Import
396 SUSR_USER_AUTH_FOR_OBJ_GET
This FM displays authorizations for a specified The user requires authorization for object S_
object belonging to a user. User authorizations TCODE with the value SU01 in field TCD to be
are displayed in an internal table. It’s also pos- able to do this. You can pass the parameters
sible to restrict the authorizations to specified into and call FM SUSR_USER_AUTH_FOR_
authorization objects. OBJ_GET. The value is returned in the table
parameter VALUES if you have authorization.
Example: You want to know whether you
have authorization to start Transaction SU01.
502
850.book Seite 503 Dienstag, 8. Oktober 2013 5:16 17
SUSR_USER_AUTH_FOR_OBJ_GET 396
I Import T Tables
NEW_BUFFERING VALUES
This parameter is used as an indicator for Authorization values are returned in this ta-
various authorization programs. Type: ble. Type: USVALUES.
XUFLAG.
MANDANT E Exceptions
503
850.book Seite 945 Dienstag, 8. Oktober 2013 5:16 17
Index
A Accounting (Cont.)
post/reverse manual cost allocation, 675
ABAP update business transaction, 669
download keyword document information, 46 validate business transactions, 668
download spool list details, 531 Accounting period
spool list, 535 determine first/last day, 218
statement MESSAGE, 561 ActiveX
ABAP Data Dictionary GUI supported controls, 433
create field catalog, 276 Activity allocation document
create/activate table, 92 post, 659
field catalog for ALV, 269 Actual data
FIELDS, 570 post to SAP, 718
key word, 569 ADD_TIME_TO_DATE, 147, 232
read data element, 86 ADDR_DIALOG, 487
read domain, 85 ADDR_DIALOG_PREPARE, 488
read table, 92 ADDR_GET, 489
read type, 87, 89 ADDR_GET_COMPLETE, 491
read view, 95 ADDR_INSERT, 492
save inbound IDoc in DB tables, 480 ADDR_MEMORY_CLEAR, 493
specifying fields, 569 ADDR_MEMORY_SAVE, 494
transaction tables, 297 ADDR_NUMBER_GET, 494
validate/check table field values, 574 Address
write table information, 94 change, 688
ABAP Data Dictionary type convert address handle into a permanent
get runtime information, 89 address number, 494
ABAP field create in local memory SZA0, 492
read from container, 937 data save from local memory to DB, 494
write in container, 937 delete for business partner, 693
ABAP memory dialog, 488
retrieve list, 267 discarded data changes, 493
ABAP program display dialog box to maintain address, 487
get list of global data, 913 display formatted address in a popup, 499
return list of all global data, 913 format for printing, 496
ABAP source code get complete details for a given address
rearrange, 54 number/handle, 491
ABAP Workbench, 306 insert address without a dialog, 492
TADIR, 613 maintenance, 488
ABAP_DOCU_DOWNLOAD, 46 number, 494
ABAP4_CALL_TRANSACTION, 45 read address without dialog, 489
Account balance read for business partner, 691
return from key date, 683 return short address for data carrier, 496
Accounting set parameters for address maintenance, 488
billing document, 660
945
850.book Seite 946 Dienstag, 8. Oktober 2013 5:16 17
Index
946
850.book Seite 947 Dienstag, 8. Oktober 2013 5:16 17
Index
947
850.book Seite 948 Dienstag, 8. Oktober 2013 5:16 17
Index
948
850.book Seite 949 Dienstag, 8. Oktober 2013 5:16 17
Index
949
850.book Seite 950 Dienstag, 8. Oktober 2013 5:16 17
Index
950
850.book Seite 951 Dienstag, 8. Oktober 2013 5:16 17
Index
951
850.book Seite 952 Dienstag, 8. Oktober 2013 5:16 17
Index
952
850.book Seite 953 Dienstag, 8. Oktober 2013 5:16 17
Index
953
850.book Seite 954 Dienstag, 8. Oktober 2013 5:16 17
Index
D Data object
read for archiving object, 402
Data read records sequentially, 387
download to PC in Excel format, 439 write in archive file, 404
format for Excel, 423 write to archive, 393
import from Excel to SAP internal table, 437 write/reload to new archive file, 395
import to SAP from Excel, 423 Data record
maintain across tables, 142 pass to data object, 400
read from archive info system, 406 put in current data object, 401
transfer from legacy to SAP, 250 read from current data object, 390
transfer to PC from Excel, 423 Database
Data archiving delete log, 634
create new archive file, 398 find logs, 637
customize settings for archiving program, 383 load log entries, 635
delete data in archive database, 393 Database table
delete table data, 383 return all fields and information, 912
end data archiving, 383 DataProvider object, 253, 255
get current handle information, 384 create, 255
get next data object, 386 send table info to client, 253
get next record, 387 transfer from client to ABAP/4 program, 255
immediately retrieve data, 386 Date
open archives that are to be read, 397 calculate, 210
open for write, 398 calculate difference, 153
pass data record to data object, 400 check validity, 185
put data record in current data object, 401 check, subtract days/months/years from date,
read data from RECORD_STRUCTURE, 390 223
read data object records sequentially, 387 convert external to internal, 162
return delete program values, 383 convert external to internal format, 159
return handle from archive file for further convert from external to internal format, 186
processing, 402 convert internal to external, 159
return values from RECORD_STRUCTURE, convert internal to external format, 161, 163
390 determine new, 217
transfer statistical data, 392 factory calendar, 187
write data object in archive file, 404 Date check
write statistical data to standard log, 405 add/subtract calendar days, 209
write, delete, read and reload programs, 392 calculate an employment period, 210
write, delete, reload, and read programs, 389, calculate duration of days between two
405 points, 209
write/reload data objects in a new archive file, calculate future calendar date, 189
395 calculate input parameter date, 188
writing new data object, 393 calculate past/future calendar date, 189
Data conversion calculate the difference between two dates,
internal table data to Excel format, 443 208
Data element calculate working date through date/number
definition, 86 of working days, 243
read, 86 check time validity, 237
954
850.book Seite 955 Dienstag, 8. Oktober 2013 5:16 17
Index
955
850.book Seite 956 Dienstag, 8. Oktober 2013 5:16 17
Index
956
850.book Seite 957 Dienstag, 8. Oktober 2013 5:16 17
Index
957
850.book Seite 958 Dienstag, 8. Oktober 2013 5:16 17
Index
958
850.book Seite 959 Dienstag, 8. Oktober 2013 5:16 17
Index
959
850.book Seite 960 Dienstag, 8. Oktober 2013 5:16 17
Index
960
850.book Seite 961 Dienstag, 8. Oktober 2013 5:16 17
Index
961
850.book Seite 962 Dienstag, 8. Oktober 2013 5:16 17
Index
Job (Cont.) L
create for background processing from
external, 869 Language
delete, 507 determine code/character, 228
delete job log, 507 field, 158
find background requests, 507 save externally, 212
get status of background processing system, Language dependent status
870 convert to 40 char line, 935
identify, 525 Language import parameter
insert a background task in background return device type, 370
request, 526 LANGUAGE_CODE_ISO_TO_SAP, 212
read header table, 509 LANGUAGE_CODE_SAP_TO_ISO, 213
read specified log and store, 512 Language-dependent abbreviation, 929
read step list table, 509 convert to internal format, 934
release authorization, 521 LAST_DAY_IN_PERIOD_GET , 213
return status, 544 Layout set, 358
select through specified criteria, 510 LDATE
Job log convert internal to external date format, 161
read specified job, 512 Linear congruence method, 919
show log for specified job, 513 Lines
store in internal table, 512 transfer between tables, 361
Job scheduling transfer to internal table, 358
open without dialog, 525 List
Job step append block list data to blocked ALV, 272
submit to job, 526 assign TOP-OF-PAGE to the ALV display, 275
JOB_CLOSE, 521 change current information of, 283
JOB_OPEN, 525 change the current information of ALV list,
JOB_SUBMIT, 526 289
convert saved list object to ASCI, 268
K create a hierarchical, sequential list of two
tables, 283
K_WERKS_OF_BUKRS_FIND, 914 current field catalog, 282
KCD_EXCEL_OLE_TO_INT_CONVERT, 437 current information, 282
KD_GET_FILENAME_ON_F4, 438 current layout, 282
Key current scroll state, 282
check, 606 delete last saved from memory, 267
Key date view filter criteria, 282
create, 748 get the current information of ALV list, 286
Key word output internal tables in ALV list format, 286
DELETE DATASET, 501 save/convert to HTML, 324
OPEN DATASET, 501 sort sequence, 282
READ DATASET, 501 List import
TRANSFER, 501 prepare from memory, 267
List object
convert to ASCI format, 268
display Saved, 324
962
850.book Seite 963 Dienstag, 8. Oktober 2013 5:16 17
Index
963
850.book Seite 964 Dienstag, 8. Oktober 2013 5:16 17
Index
964
850.book Seite 965 Dienstag, 8. Oktober 2013 5:16 17
Index
965
850.book Seite 966 Dienstag, 8. Oktober 2013 5:16 17
Index
966
850.book Seite 967 Dienstag, 8. Oktober 2013 5:16 17
Index
967
850.book Seite 968 Dienstag, 8. Oktober 2013 5:16 17
Index
Program (Cont.) Q
read status/job log, 512
return all includes, 920 QF05_RANDOM, 919
return includes used, 913 QF05_RANDOM_INTEGER, 920
RSARCH07, 396 Quant data
RSSCA1T0, 160 return, 868
RSSLG150, 622 Quantity
RSSPO430, 575 convert to different UOM, 150
RSSPO450, 572 convert UOM, 214
SBAL_DEMO_03, 650 Question and response, 563
SBAL_DEMO_04_POPUP, 641 Quotation
SBAL_DEMO_04_SINGLE_LOG, 643 create for customer, 813
SBAL_DEMO_04_STANDARD, 643
SBAL_DEMO_05, 635 R
SBOOKA, 399
SBOOKD, 383 Ranges
schedule for background processing, 514 fill/display internal table, 252
submit, 318 Ranges format
Progress indicator convert to expression, 266
display, 318 RAW format, 236
Project definition READ_EXCHANGE_RATE, 219
set/reset status, 871 READ_FORM_ELEMENTS, 358
Purchase order READ_FORM_LINES, 358
cancel/revoke, 801 READ_TEXT, 169, 359
change, 786 READ_TEXT_INLINE, 361
create, 791 Receipt quantity
release/approve order, 799 determine, 751
return detailed information, 795 Receiver
return list of items, 798 determine for synchronous BAPI, 468
Purchase requisition determine for synchronous BAPI from ALE,
change, 802 466
change with authorizations, 819 generate, 467
create, 804, 815 RECORD_TAB
create with authorizations, 820 reserve space in parameter, 115
delete/close, 822 REFER_TEXT, 363
release/approve by item, 822 Registered application servers
Purchase requisition item provide list to caller, 76
release/approve, 822 Remote function
Purchasing contract starting new task from non-SAP systems, 45
create, 712 RENAME_TEXT, 364
get details, 715 Report
make changes to, 709 assign variant values to parameter/selection
options, 306
return current selection to
SELECTION_TABLE, 301
968
850.book Seite 969 Dienstag, 8. Oktober 2013 5:16 17
Index
969
850.book Seite 970 Dienstag, 8. Oktober 2013 5:16 17
Index
970
850.book Seite 971 Dienstag, 8. Oktober 2013 5:16 17
Index
971
850.book Seite 972 Dienstag, 8. Oktober 2013 5:16 17
Index
972
850.book Seite 973 Dienstag, 8. Oktober 2013 5:16 17
Index
973
850.book Seite 974 Dienstag, 8. Oktober 2013 5:16 17
Index
974
850.book Seite 975 Dienstag, 8. Oktober 2013 5:16 17
Index
975
850.book Seite 976 Dienstag, 8. Oktober 2013 5:16 17
Index
V VIEWCLUSTER_MAINTENANCE_CALL, 142
VRM_DELETE_VALUES, 322
Validate business transactions, 668 VRM_SET_VALUES, 322, 323
Valuation area
return details, 914 W
Value
assign to SAPscript, 376 Warehouse
convert measurement, 237 detailed quant data, 868
supply to an standard selection field, 304 WDKAL_DATE_ADD_FKDAYS , 243
Variable Web browser
evaluate, 200 call with URL, 875
store content, 545 Week
Variant calculate based on date, 188
change parameters, 313 first day of, 244
check existence for report, 316 return day for given language, 244
create for selection screen, 299 return day number, 192
delete, 315 WEEK_GET_FIRST_DAY, 244
return value for existing, 314 WEEKDAY_GET, 244
select options, 313 Weekend
selection dialog box, 293 process further logic, 192
Variant value Where-used list
assign to parameter, 306 find, 306
Vendor find for BOM, 896
create/change details, 866 find material in BOM, 900
get detailed data, 867 Winword file
mark for deletion, 867 open from presentation server, 425
View WLB3_GET_NUMBER_OF_WORKDAYS, 245
defined parameter details, 131 Word wrap, 413
get information to change data, 131 Work area
maintenance control block table, 131 clear text header/line table, 350
read, 95 initialize text header/line table, 350
View cluster maintenance read text, 361
call, 142 Work process
View structure get details, 73
lock/unlock data, 130 stop/delete session, 77
VIEW_AUTHORITY_CHECK, 128 Working date, 243
VIEW_ENQUEUE, 130 Working day, 245
VIEW_GET_DDIC_INFO, 131 Wrapper function module, 454
VIEW_MAINTENANCE, 132 WRITE_FORM, 377
VIEW_MAINTENANCE_CALL, 134 WRITE_FORM_LINES, 379
VIEW_MAINTENANCE_LOW_LEVEL, 137 WRITE_LIST, 324
VIEW_MAINTENANCE_SINGLE_ENTRY, WRITE_MESSAGE, 589
140 WWW_LIST_TO_HTML, 324
VIEW_SET_PF_STATUS, 322
976
850.book Seite 977 Dienstag, 8. Oktober 2013 5:16 17
Index
X XString format
convert to binary, 227
XMSG, 593 XXL
XPRA, 593 transfer data list, 460
display messages from memory, 593 transfer meta information, 460
log output, 593 use FM as APIs in ABAP/4, 460, 462
read and display data, 593 XXL_FULL_API, 460
use Transaction SE38 to write to memory, XXL_SIMPLE_API, 462
593
977