Fonction SAP BAPI_XMI_LOGON - Log onto an external management tool

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
EXTCOMPANY BAPIXMLOGR-EXTCOMPANY C 16 Manufacturer of the tool you should log onto
EXTPRODUCT BAPIXMLOGR-EXTPRODUCT C 16 Name of the tool to be logged on
INTERFACE BAPIXMLOGR-INTERFACE C 3 X Interface onto which you should log on
VERSION BAPIXMLOGR-VERSION C 10 X Version of the interface

Paramètre Reférence Type Long. Description
RETURN BAPIRET2 u 548
SESSIONID BAPIXMLOGR-SESSIONID C 24 Unique XMI session identification

Functionality
Using this method you can log onto one of the SAP CCMS systemadministration interfaces. This logon is a prerequisite for using theCCMS interface functions.
Logging onto the interface ensures that all accesses to the systemadministration functions are logged. Using the CCMS XMI sessioninterface, you can also upload language-specific messages from externalproducts.
You can also log onto the XMI interface without having to open asession with other CCMS system administration interfaces.

Background information: XMI Sessions
External system administration tools can process their tasks using oneor more CCMS interfaces. For this reason, the external tool sets up anRFC connection with the R/3 System. Within this RFC connection, thetool must connect separately to each individual interface with which itis to work.
The RFC connection is responsible for authenticating and authorizingthe R/3 System, since a "normal" R/3 logon process runs here. For theduration of the RFC connection, the external tool is therefore loggedonto the R/3 System as a user. During this time, the external programcan connect with one or several interfaces, or break the connection.These system management API connections can be arranged in any sequenceand may also overlap. This means that for the duration of an RFCconnection there are several SMAPI connections.
The XMI controls these SMAPI connections and their lifespan. The toolauthenticates itself with each interface again and receives anidentification code in return. These session IDs are always the samefor the duration of an RFC connection.
So that external tools do not have to know in advance which interfacesare implemented in a concrete R/3 version in which API version, the XMIcontains functions that inform you of the R/3 version. The XMI istherefore the central contact for querying the current version and theavailable interfaces.
There is the special case that an XMI session is not opened for an APIbut is used exclusively to execute XMI functions. You can use this notonly to query the version of an API but also to load thelanguage-specific messages.
During a session, each interface contains global variables thatcharacterize the status of the SMAPI connection between a tool and aninterface. If several external tools log onto a CCMS interface, thenstatus information is created for each interface "incarnation" (evenfor different RFC connections).

Notes
Before you call this function module for the first time, the externalmanagement system must first log onto the R/3 System with an R/3 username and password (C function RfcOpen).

Further information
XMI documentation (SAPnet/CCMS)

Description
INCLUDE BAPI_TABLE

Value range
MSG_LOGON_DENIED: The logon was refused because the R/3 user that theexternal management system used to log on with does not haveauthorization to work with the external management system. See also theonline documentation on authorization object S_XMI_PROD.
MSG_INVALID_PARAMETERS: EXTCOMPANY and EXTPRODUCT are different withinan RFC session. Only a product from one manufacturer may operate withinan RFC session.
MSG_UNKNOWN_INTERFACE: The interface that the external product expectsis not supported. The specified ID was invalid.
MSG_UNKNOWN_VERSION: The version that the external product requires isnot supported.
MSG_ALREADY_LOGGED_ON: The external product has already logged onto theinterface specified. Within an RFC session, the external product onlyneeds to log onto an interface once.
MSG_PROBLEM_DETECTED: A problem occured in an XMI function module thatis not directly connected to the XMI functions. The problem wasprobably caused by a function module that was called. To analyze theproblem, examine the R/3 System log.
MSG_CANT_LOG_ACTION: The action had to be terminated because the R/3XMI logging mechanism reported an error.

Description
This parameter contains a unique identification for the new sessionwith a CCMS system administration interface.

Description
Enter here the manufacturer of the product that wants to log onto aCCMS system administration interface.
The entry is recorded in the messages for the XMI session log and alsoforms the namespace for messages uploaded by the external product forthe XMI log.
Note: If you log onto several CCMS interfaces during one RFC session,you must constantly specify the same manufacturer name.

Description
Enter here the name of the product that is to log onto a CCMS systemadministration interface.
The entry is used for documentary purposes. No authorization check orother program function takes place at this time.
Note: If you log onto several CCMS interfaces during one RFC session,you must always specify the same product name.

Description
Enter here the identification code of the interface that is to be used(such as XMB). If you do not set this parameter, you can only use themethods belonging to object XMISESSION.

Value range
The CCMS system administration interface identification codes are:

  • XBR (DB backup)

  • XBP (Background processing)

  • XMB (Basic functions)

  • XOM (Output management)

  • XDB (DB administration)
  • Description
    Optional: Enter here the version of the CCMS system administrationinterface that expects the external product from the R/3 System (forexample 1.1). You can find this version in the interface documentationprovided to you by SAP.