Total SAPTotal SAPABAP,ABAP report,Interactive Report,ALV grid,ALV list,IDOC,User Exit,RFC,Smartform,sapscript,ABAP Performance,Remote Function Module RFC ,Function Module,Modularization techniques Articles
CREATE OBJECT
2008-02-10 02:20:00 The ABAP key word CREATE OBJECT generates an object of the class "class". Basic form: CREATE OBJECT obj class. Addition: LANGUAGE langu To address an OLE Automation Server (e.g. EXCEL) from ABAP, the server must be registered with SAP. The transaction SOLE (see Registering External Applications in R/3) allows you to assign an automation server to a class. The CREATE statement generates the initial object of this class and this can be processed further with the related key words. The return code value of SY-SUBRC indicates the result of the generation. The return code value can be as follows: SY-SUBRC = 0: Object successfully generated. SY-SUBRC = 1: SAPGUI communication error. SY-SUBRC = 2: SAPGUI function call error. The frontend ports of SAP?s OLE implementation modules are implemented only under Windows and Apple Macintosh. SY-SUBRC = 3: The OLE-API call resulted in an error - possibly a storage space problem. SY-SUBRC = 4: The object i... More About: Create
Related ABAP Keywords Introduction
2008-02-10 02:19:00 From R/3 Release 3.0, the command set of the ABAP interpreter has been enhanced to include key words that allow the application programmer to process external objects. OLE2 was supported as the first object model. ABAP keywords allow you to control all applications with functionality in the form of an OLE2 Automation Server from an ABAP program:Examples of such applications are the Microsoft products EXCEL or WinWord.For further information about OLE2, refer to OLE2 in the online help (ABAP Editor). More About: Keywords , Introduction , Related
Related ABAP Keywords
2008-02-10 02:19:00 Introduction CREATE OBJECT SET PROPERTY GET PROPERTY CALL METHOD FREE OBJECT More About: Keywords , Related
R/3 As OLE Automation Server
2008-02-10 02:18:00 In contrast to ABAP as an OLE Automation Controller, R/3 also offers some of its functionality as an Automation Server . This means that all function modules which can be called remotely can be called by any OLE Automation Controller. To do this, the server program RFCSRV.EXE must be installed on the frontend.For an introduction to this technique, see the example in the corresponding unit of the Tutorial: Communication Interfaces.
Examples
2008-02-10 02:18:00 Examples and OLE demonstrations are available in WinWord, Excel and Visio. Select Development ® Programming environ. ® OLE2 ® Demo (transaction OLE) in the ABAP Development Workbench.Three OLE servers can be activated using transaction OLE and numerous methods and properties tested by selecting the appropriate pushbuttons: For a simple program example, see the Tutorial: Communication Interfaces. More About: Examples
Using The OLE Object Browser
2008-02-10 02:17:00 The Object Browser provides a list of OLE applications with loaded Typeinfo in English. This information is stored in table INDX. Select Development ® Programming environ. ® OLE2 ® Object Browser (transaction SOLO).You can also create an OLE application interactively within the Object Browser. Then you can invoke its methods or read and write its properties. The results of each call are displayed directly.This information has to be loaded by the customer. There are no initial entries delivered by SAP.
Implementation
2008-02-10 02:17:00 Communication between the applications server and the frontend is via the RFC interface. The SAPGUI contains special OLE functions which you can address from ABAP programs with normal RFC calls (destination ?SAPGUI?).The implementation is realized by means of the ABAP keywords CREATE OBJECT and FREE OBJECT (which call the function modules CREATE_OBJECT and FREE_OBJECT) and C functions which are written as RFC Server programs.In CREATE OBJECT, the ABAP processor reads the relevant entry in the table TOLE and uses the found OLE class-ID to call the function OLE_CREATE_OBJECT at the frontend via RFC. Then the functions that are necessary for generating an OLE object are called from the Windows OLE library and an object handle is returned to the ABAP processor. From an OLE point of view, the SAPGUI represents the actual OLE client.The commands CALL METHOD, GET PROPERTY and SET PROPERTY are bundled on the application server and passed to the SAPGUI function OLE_FLUSH_CALL in the ... More About: Implementation
Loading OLE Type Information into R/3 For Conversion
2008-02-10 02:16:00 You can load the type information from the presentation server into table OLELOAD of the R/3 System (in the ABAP Development Workbench). To do this select Development ® Programming environ. ® OLE2 ® Load Type info (transaction SOLI). The view "TypeInfo Loaded" is displayed with the following information:Application Version CLSID of application CLSID of object library With "Load Typeinfo" a part of the typelib is loaded into SAP?s database.This is only possible if the application in question is loaded on your PC. The ABAP processor can thus perform the necessary type conversions and is not dependent on the language of the OLE application, i.e. an ABAP program can use methods and property names in any language for which type information has been loaded, and can still process applications that have been installed in another language.For all OLE applications used by SAP standard applications, the English version is delivered in the table OLELOAD. If an OLE server has n... More About: Information , Conversion , Loading
Conversion Rules
2008-02-10 02:16:00 When passing parameters, conversion is always via character type:The ABAP-type is converted into CHAR according to ABAP-conventions. Afterwards, the CHAR is converted into OLE by using the corresponding OLE types:ABAP-Type ® CHAR ® OLE typeWithout Typeinfo, or if the OLE type is undefined, it is set according to the ABAP type as follows: ABAP types OLE types I Int P,F Double D Date T Time otherwise Character At present, the maximum length of character variables is restricted to 255.With some objects the semantics of the parameters depends on the OLE type (see the documentation of the server application). More About: Rules , Conversion
Registering External Applications in R/3
2008-02-10 02:15:00 All applications controlled by ABAP must be entered in the table TOLE in the ABAP Development Workbench. In order to maintain table TOLE select Development ® Programming environ. ® OLE2 ® Configuration (transaction SOLE). The key of TOLE (OLE application) is used as object class name in the CREATE-statement. Each entry contains all information needed to generate an OLE object.Table TOLE also indicates whether type information (Typeinfo) exists for an application.The Typeinfo describes all the objects that a particular application can handle, including all its methods, properties and parameters.The view "Maintenance view for OLE applications: Overview" displays information on the OLE application names, the version numbers of the OLE applications and class-IDs in character format. If you want to see more specific information, select Details and the view "Maintenance view for OLE applications: Details" with the following fields is displayed:OLE application The application... More About: Applications , External
Introduction
2008-02-10 02:15:00 Through its Open Object Interface, ABAP supports the OLE2 Automation technique. Desktop applications that provide their functionality in the form of an OLE2 Automation Server (such as Excel or WinWord) can be thus be integrated into R/3. All applications controlled by ABAP must be registered in R/3. The following ABAP key words control the applications:CREATE OBJECTSET PROPERTYGET PROPERTYCALL METHODFREE OBJECT When called from an ABAP program, the SAPGUI acts as OLE client, and the desktop application as the OLE server. More About: Introduction
ABAP As OLE Automation Controller
2008-02-10 02:14:00 The ABAP programming language supports the OLE2 Automation technique. Desktop applications supporting OLE2 can be thus be called from R/3. Overview of Topics Introduction Registering External Applications in R/3 Loading OLE Type Information into R/3 For Conversion Conversion Rules Using The OLE Object Browser Implementation Examples R/3 As OLE Automation Server Related ABAP Keywords More About: Controller
Tasks Performed by the RFC Stub
2008-02-10 02:12:00 The RFC stub generator creates two files for each stub: the stub program saprfcc.c header file saprfcc.h All RFC stub programs perform the same basic functions: define the types needed for passing parameters fill the parameter structures with the individual importing, exporting and tables parameters make the RFC call needed (RfcCall) to call the function modulemake the RFC call needed (RfcReceive) to get return parameter values The saprfcc.h header file contains standard RFC definitions, as well as those needed by the specific function modules. The function module declaration itself contains the macro calls, win_export, win_far, win_loadds, win_pascal. These macros insert code needed only in Windows-based systems; in UNIX systems, the macros resolve to blanks. To see sample stub code, generate an RFC stub function and display the code. More About: Tasks
Tasks Performed by a Stub Caller
2008-02-10 02:12:00 To call an RFC stub successfully, an application program must perform specific tasks. The example programs provided by the RFC Interface Generator show how to program these tasks, and can be created in C or in Visual Basic.You can use these example programs as a basis for developing your own application, or you can write stub callers from scratch. In either case, your program must perform the following specific tasks:call RfcOpen to establish a connection with the SAP System call ItCreate (if you are passing table parameters) to create a control structure for each table to be passed call the actual stub call RfcClose to terminate the connection RFC does not use null-terminated strings (' ' at the end). Parameters are passed with their original length. To see sample caller code, generate an example program and display the code (described in Creating RFC Stubs and Example Programs). More About: Tasks
Compiling and Linking on the Workstation
2008-02-10 02:12:00 You must compile and link the downloaded programs before you can use them:For RFC stubs, compile as a new library or DLL file. For example programs, compile as an ANSI C application program. In general, you have to use an ANSI C compatible C-compiler and you have to set the include and library search path to the installed RFC SDK include and lib directory.At some platforms you also have to link the TCP/IP socket libraries explicitly.Assume.../rfcsdk is the root directory of the unpacked RFC SDK. The following compile/link calls should be done for the program sapinfo.c on different platforms.HP-UX cc -Ae -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a AIX (RS/6000) ccc -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a SINIX (RM600) /opt/C/bin/cc -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a -lsocket -lnsl -lusc(only this compiler is supported.) DEC Alpha AXP cc -std1 -unsigne -DA_OSF -I.../rfcsdk/include -L.../rfcsdk/lib sapinfo.c librfc.a SUN (Su... More About: Linking , Workstation
Calling RFC Stub Programs
2008-02-10 02:11:00 Once you have downloaded the desired RFC stubs to the workstation or PC, you can call them from programs of your own. This section describes how to use these stubs, that is, how to compile them, what they do, and what your program must do in order to call them correctly. If you have generated example programs for the stubs, you can use these as a basis for programming your own application. More About: Programs , Calling
Complete OLE Automation Client Example
2008-02-10 02:10:00 ----------------------------------------- ----------------------------- SAP AG - R/3 Remote Function Call Interface Generation RFC_OLEA_CL_EXP E 30A 22.09.1995 15:22 Complete OLE Auto. client exa. saprfcae.txt ----------------------------------------- ----------------------------- RFC_OLEA_CL_EXP : Complete OLE Auto. client exa. Description The generation form RFC_OLEA_CL_EXP generates a complete ready-to-run RFC client example program written in Visual Basic that uses the SAP Automation Server to perform function calls. This program lets you test your remote function module without manual programming.The example program prompts the user to input exporting parameters before the call and to display importing parameters after the call. Dialogs for setting values in and displaying internal table objects are also provided.The example program works with Microsoft Visual Basic (MSVB). It provides both a graphical user interface using Visual Basic screens and controls and a ... More About: Client
Complete Visual Basic Server Example
2008-02-10 02:10:00 ----------------------------------------- ----------------------------- SAP AG - R/3 Remote Function Call Interface Generation RFC_MSVB_SR_EXP E 30A 22.09.1995 15:22 Complete Vis.Basic server exa. saprfcvr.txt ----------------------------------------- ----------------------------- RFC_MSVB_SR_EXP : Complete Vis.Basic server exa. Description The generation form RFC_MSVB_SR_EXP generates a complete ready-to-run external RFC server example program written in Visual Basic . This program lets you test external functions without manual programming.You can start your external RFC server from the R/3 function library testbed by specifying an appropriate RFC destination.The example program displays importing parameters and prompts the user to raise an exception or to input exporting parameters. Dialogs for displaying and setting values in internal table objects are also provided.The example program works with Microsoft Visual Basic (MSVB). The user interface provides a Visual B... More About: Server
Complete Visual Basic Client Example
2008-02-10 02:10:00 ----------------------------------------- ----------------------------- SAP AG - R/3 Remote Function Call Interface Generation RFC_MSVB_CL_EXP E 30A 22.09.1995 15:22 Complete Vis.Basic client exa. saprfcze.txt ----------------------------------------- ----------------------------- RFC_MSVB_CL_EXP : Complete Vis.Basic client exa. Description The generation form RFC_MSVB_CL_EXP generates a complete ready-to-run RFC client example program written in Visual Basic . This program lets you test your remote function module without manual programming.The example program prompts the user to input exporting parameters before the call and to display importing parameters after the call. Dialogs for setting values in and displaying internal table objects are also provided.The example program works with Microsoft Visual Basic (MSVB). It provides both a graphical user interface using Visual Basic screens and controls and a character user interface that supports automated tests for exa... More About: Client
Complete ANSI C Client Example
2008-02-10 02:09:00 ----------------------------------------- ----------------------------- SAP AG - R/3 Remote Function Call Interface Generation RFC_ANSIC_CL_EXP E 30A 22.09.1995 15:22 Complete ANSI C client example saprfccl.txt ----------------------------------------- ----------------------------- Code has been generated for the following function module ABAP4_CALL_TRANSACTION Executes the ABAP command CALL TRANSACTION. RFC_ANSIC_CL_EXP : Complete ANSI C client example DescriptionThe generation form RFC_ANSIC_CL_EXP generates a complete ready-to-compile RFC client example program written in ANSI C. This program lets you test your remote function module without manual programming.The example program prompts the user to input exporting parameters before the call and to display importing parameters after the call. Dialogs for setting values in and displaying internal table objects are also provided.The example program uses ANSI C statements and standard library routines. The user interfac... More About: Client
Complete ANSI C Server Example
2008-02-10 02:09:00 ----------------------------------------- ----------------------------- SAP AG - R/3 Remote Function Call Interface Generation RFC_ANSIC_SR_EXP E 30A 22.09.1995 15:22 Complete ANSI C server example saprfcsr.txt----------------------------- ----------------------------------------- Code has been generated for the following external function ABAP4_CALL_TRANSACTION Executes the ABAP command CALL TRANSACTION. RFC_ANSIC_SR_EXP : Complete ANSI C server example DescriptionThe generation form RFC_ANSIC_SR_EXP generates a complete ready-to-compile external RFC server example program written in ANSI C. This program lets you test external functions without manual programming.You can start your external RFC server from the R/3 function library testbed by specifying an appropriate RFC destination. Once called the RFC server installs external functions and waits for function calls until you leave the function library.The example program displays importing parameters and prompts the us... More About: Server
Query Directory
2008-02-07 20:41:00 When you have chosen a user group, you see the names and titles of any queries already defined there in the lower part of the screen. Directory of Queries for a User Group If you need more information before selecting a query, you can display a list of queries for your current user group. To do this, proceed as follows:Select Environment ® Directories ® Queries/user group. Place the cursor on the input field for the query name and display a list of possible entries. For each query, the resulting list contains the name, the title and up to three lines of notes. The title and notes are intended to help you find the query your require. You can scroll through this display. You can also place the cursor on a query name and call one of the functions offered in the bottom part of the dialog window for the chosen query.You can use the Delete function only if you have change authorization for queries. Directory of All Queries If you want a list of queries for all user groups, ... More About: Query , Rect
Functional Area Directory
2008-02-07 20:41:00 If you have authorization to change queries, you can display a list of all functional areas which are assigned to the user group you have chosen. You are allowed to create queries based on these functional areas.To display the list, choose Environment ® Directories ® Functional areas. More About: Directory , Area , Rect
User Group Directory
2008-02-07 20:40:00 To display a directory of the user groups to which you are assigned, select Other user group.You then see a list of two-character user group names together with their long text descriptions. The long text is intended to help you choose a user group: You can scroll through this display and choose a user group. The system subsequently returns to the initial screen and displays the chosen user group in the lower part of the screen. You can then choose a query you want to execute or edit. More About: Directory , User , Group , Rect
Choosing a Query for Execution or Maintenance
2008-02-07 20:40:00 The initial screen of the component Maintain Queries looks similar to the one below.If you are not authorized to change queries, the Change and Create functions do not appear on this screen. You can, however, display a query at any time. When you start the component, the system takes a user group to which you are assigned and displays the names and titles of any queries already defined for this user group in the lower part of the screen. By selecting Other user group, you can display the user groups to which you are assigned and choose one for further processing.A range of display and maintenance functions is available to you for manipulating these queries.To select a query for processing by one of these functions, proceed in either of the following ways:Enter the name of the query in the appropriate input field, orSelect the list entry for the query on the lower part of the screen. Then, you can execute the function. All the examples in this manual are based on a flight reservatio... More About: Maintenance , Execution , Query
ABAP Query Authorizations
2008-02-07 20:39:00 End users, system administrators, and translators must all have appropriate authorizations to use ABAP Query . For example, it would not make sense for end-users to have the authorization to maintain functional areas.Also, it can be desirable to set up authorizations within a user group in such a way that some end-users can maintain and execute queries, while others can only execute existing queries.ABAP Query has two means of assigning authorizations to individuals:User groups To be able to use the component Maintain Queries, you must be a member of at least one user group. In all other user groups, maintenance may only be performed after your user name has been explicitly assigned to them. Thus your access is restricted to specific functional areas (logical databases). Authorizations You can also assign authorizations using the authorization object S_QUERY. This authorization object contains a field ACTVT, which can accept the values Change (02), Maintain (23) and Tr...
Classification of Query Users
2008-02-07 20:39:00 The above authorizations allow the following classification of ABAP Query users:End users who can only execute queries These users must be entered in one or more user groups by a system administrator. End users who can maintain queries These users must be entered in one or more user groups by a system administrator. They must also have the authorization S_QUERY_UPD. End users who can maintain queries in some user groups and only execute them in others These users must have authorization S_QUERY_UPD. The system administrator enters them in several user groups. In those user groups where they are not authorized to make changes, the appropriate setting must be chosen during user group maintenance. System administrators System administrators should have the authorization S_QUERY_ALL. However, it is also possible for them only to be authorized to maintain the environment. Translators Translators can be considered as end users with change authorization, i.e. they must have the a... More About: Users
Language Comparison
2008-02-07 20:38:00 Defining queries, functional areas and user groups involves entering a lot of text. Some of this contributes to the internal organization of ABAP Query, while the rest is used in the generated ABAP programs.A language comparison facility exists for all these text elements. This means that, for each text, there is an equivalent text in one (or more) other languages. The texts you see in your SAP R/3 System are usually displayed in the logon language.You perform this language comparison with the component Language Comparison .
Transports
2008-02-07 20:38:00 Global Area Global area objects are created and transported via the Workbench Organizer. Standard Area The components Maintain Functional Areas and Maintain User Groups contain utilities for transporting standard area objects (user groups, functional areas and queries). This enables you, for example, to transfer tested queries to the production system.
Query Areas
More articles from this author:2008-02-07 20:38:00 A query area contains a set of discreet query objects (queries, functional areas, and user groups).You can differentiate between two different query areas, the standard area and the global areaStandard Area The standard query area is primarily designed for ?ad-hoc queries,? that is for queries that are created to fulfill a one-time demand and never used again. Standard area queries are client-specific. They are not connected to the Workbench Organizer. Global Area In the global query area, queries are developed that are used throughout the entire system (that is, they are cross-client). These queries are also intended for transport into other systems. Query objects created in the global area are registered in the Workbench Organizer. They can be created and transported using the normal correction and transport procedure. All query objects delivered by SAP (from Release 4.0) are located in the global area. You can tell which objects have been delivered by SAP and which objects ar... 1, 2, 3, 4 |



