|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.mw.jco.JCO.BasicRepository
com.sap.mw.jco.JCO.Repository
Implementation of the SAP system repository. The repository queries a remote SAP system(s) for function interfaces and/or structure definitions.
In order to retrieve the necessary information from the SAP system's data dictionary, the repository needs to call a number of RFMs for which the access rights have to be granted (Authorization Object: S_RFC, ACTVT: 16, FUGR).
| R/3 Release | Function Groups |
|---|---|
| since 3.1H | RFC1, SG00, SRFC, SUNI, SYST |
| since 4.0A | RFC1, SDIF, SG00, SRFC, SYST, SYSU, SUNI |
| since 4.6A | RFC1, SDIF, SG00, SRFC, SYST, SYSU |
| since 4.6D | RFC1, SDIFRUNTIME, SG00, SRFC, SYST, SYSU |
Note: The Repository class is designed to cache the once queried metadata and fetch the missing metadata on the fly. Since the repository calls are very expensive and each repository uses up a significant amount of heap memory, it is essential to reuse the available repository instances. The repository instances synchronize the access from different threads and therefore can be used in concurrent environments. We recommend always to create repositories with a pool of connection especially in concurrent environments. It lets you to avoid bottlenecks and makes the repository instance resistant against a failure on a connection.
Note: SAP recommends to use the logon data of a technical user only with necessary permissions for repository connections.
| Field Summary | |
protected static char[] |
ABAP_EXIDS
|
protected static String[] |
ABAP_TYPES
|
protected JCO.Client |
client
Client |
protected static JCO.MetaData |
ddtypelist_v5
|
protected static JCO.MetaData |
ddtypelist_v6u
|
protected static JCO.MetaData |
dfies_v4
|
protected static JCO.MetaData |
dfies_v5
|
protected static JCO.MetaData |
dfies_v6u
|
protected static JCO.MetaData |
fields_v2
|
protected static JCO.MetaData |
fields_v3
|
protected static JCO.MetaData |
funint_v2
|
protected static JCO.MetaData |
funint_v3
|
protected static JCO.MetaData |
funint_v4
|
protected static JCO.MetaData |
funint_v5
|
protected static JCO.MetaData |
funint_v6u
|
protected String[] |
pool_names
The manager that provides client connections |
protected int |
repository_version
The version of the remote dictionary |
protected static JCO.MetaData |
rsexc_v3
|
protected static JCO.MetaData |
rsimp_v3
|
protected static JCO.MetaData |
rstbl_v3
|
protected static JCO.MetaData |
x030l_v4
|
protected static JCO.MetaData |
x030l_v5
|
protected static JCO.MetaData |
x030l_v6u
|
| Fields inherited from class com.sap.mw.jco.JCO.BasicRepository |
function_cache, name, next_repository, structure_cache |
| Constructor Summary | |
JCO.Repository(String name,
JCO.Client client)
Creates a new SAP system repository |
|
JCO.Repository(String name,
String pool_name)
Creates a new SAP system repository |
|
JCO.Repository(String name,
String[] pool_names)
Creates a new SAP system repository |
|
| Method Summary | |
protected void |
execute(JCO.Client client,
JCO.Function function)
Executes a function and applies proper synchronization |
IMetaData |
getFunctionInterface(String function_name)
Returns the meta data for the specified function |
String[] |
getPoolNames()
Returns the array of pool names |
IMetaData |
getStructureDefinition(String structure_name)
Returns the meta data for the specified structure. |
protected int |
getVersion(JCO.Client client)
Checks and returns the repository version. |
IMetaData |
queryFunctionInterface(JCO.Client client,
String name)
Queries the function meta data for the passed function name. |
protected IMetaData |
queryFunctionInterface(String function_name,
String pool_name)
Queries the function interface from a remote SAP system. |
protected void |
queryFunctionInterfaceEpilog(JCO.Client client,
JCO.MetaData meta_data,
JCO.Table funint)
Hook for derived classes which might want to do further processing |
IMetaData |
queryStructureDefinition(JCO.Client client,
String name)
Queries the meta data for the structure with the specified name. |
protected IMetaData |
queryStructureDefinition(String structure_name,
String pool_name)
Queries the structure definition from a remote SAP system. |
protected void |
queryStructureInterfaceEpilog(JCO.Client client,
JCO.MetaData meta_data,
JCO.Table fields)
Hook for derived classes which might want to do further processing |
IMetaData |
queryTableDefinition(JCO.Client client,
String name)
Queries the meta data for the table with the specified the name. |
void |
setName(String name)
Sets the repository name |
void |
setPoolNames(String[] pool_names)
Sets the array of pool names |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sap.mw.jco.IRepository |
addFunctionInterfaceToCache, addStructureDefinitionToCache, getCachedFunctionInterfaces, getCachedStructureDefinitions, getFunctionTemplate, getName, getNextRepository, getTableDefinition, load, removeFunctionInterfaceFromCache, removeStructureDefinitionFromCache, save, setNextRepository |
| Field Detail |
protected static final JCO.MetaData funint_v2
protected static final JCO.MetaData fields_v2
protected static final JCO.MetaData funint_v3
protected static final JCO.MetaData fields_v3
protected static final JCO.MetaData rsexc_v3
protected static final JCO.MetaData rsimp_v3
protected static final JCO.MetaData rstbl_v3
protected static final JCO.MetaData funint_v4
protected static final JCO.MetaData x030l_v4
protected static final JCO.MetaData dfies_v4
protected static final JCO.MetaData funint_v5
protected static final JCO.MetaData dfies_v5
protected static final JCO.MetaData x030l_v5
protected static final JCO.MetaData ddtypelist_v5
protected static final JCO.MetaData funint_v6u
protected static final JCO.MetaData dfies_v6u
protected static final JCO.MetaData x030l_v6u
protected static final JCO.MetaData ddtypelist_v6u
protected static final String[] ABAP_TYPES
protected static final char[] ABAP_EXIDS
protected String[] pool_names
protected int repository_version
protected JCO.Client client
| Constructor Detail |
public JCO.Repository(String name,
String pool_name)
name - the name of the repositorypool_name - the name of the pool
public JCO.Repository(String name,
String[] pool_names)
name - the name of the repositorypool_names - the array of pool names
public JCO.Repository(String name,
JCO.Client client)
name - the name of the repositoryclient - the client to use| Method Detail |
public void setName(String name)
name - the name of the repositorypublic String[] getPoolNames()
public void setPoolNames(String[] pool_names)
pool_names - the new array of pool namesprotected final int getVersion(JCO.Client client)
client - the connection to the remote system which supplies the repository information
protected void execute(JCO.Client client,
JCO.Function function)
client - the client to be used for executing the functionfunction - the function to execute
protected IMetaData queryFunctionInterface(String function_name,
String pool_name)
function_name - the name of the functionpool_name - the name of the connection pool to be used to query the interface from.
JCO.Exception - if an error occurred during the retrieval
of the function interface.
protected IMetaData queryStructureDefinition(String structure_name,
String pool_name)
structure_name - the name of the structurepool_name - the name of the connection pool to be used to query the structure information from.
JCO.Exception - if an error occurred during the retrieval
of the data structure definition.public IMetaData getFunctionInterface(String function_name)
getFunctionInterface in interface IRepositorygetFunctionInterface in class JCO.BasicRepositoryfunction_name - the name of the function for which the meta data
is being returned.
JCO.Exception - if an error occurred during the retrieval
of the function interface.public IMetaData getStructureDefinition(String structure_name)
getStructureDefinition in interface IRepositorygetStructureDefinition in class JCO.BasicRepositorystructure_name - the name of the structure for which the meta data
is being returned.
JCO.Exception - if an error occurred during the retrieval
of the data structure definition.
public final IMetaData queryFunctionInterface(JCO.Client client,
String name)
client - the client connection to the remote SAP system.name - the name of the function for which the meta data should be returned.
JCO.Exception - if either the function interface could not be found
or another error occurred during the query.
protected void queryFunctionInterfaceEpilog(JCO.Client client,
JCO.MetaData meta_data,
JCO.Table funint)
client - the JCO client which can be used to retrieve additional datameta_data - the meta data assembled so farfunint - the table of raw meta data as returned from RFC_GET_FUNCTION_INTERFACE.
Note:the composition of funint depends on the release of the SAP system
public final IMetaData queryStructureDefinition(JCO.Client client,
String name)
client - the client connection to the remote SAP system.name - the name of the structure for which the meta data should be returned.
JCO.Exception - if either the data structure definition could not
be found or another error occurred during the query.
protected void queryStructureInterfaceEpilog(JCO.Client client,
JCO.MetaData meta_data,
JCO.Table fields)
client - the JCO client which can be used to retrieve additional datameta_data - the meta data assembled so farfields - the table of raw meta data as returned from RFC_GET_STRUCTURE_DEFINITION
for DDIF_FIELDINFO_GET
Note:the composition of the fields table depends on the release of the SAP system
public final IMetaData queryTableDefinition(JCO.Client client,
String name)
client - the client connection to the remote SAP system.name - the table name for which the meta data should be returned.
JCO.Exception - if either the table definition could not
be found or another error occurred during the query.
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||