Show TOC Start of Content Area

Procedure documentation Querying Business Objects  Locate the document in its SAP Library structure

You can specify a business object, or business object and operation, and find out the following:

All default implementations: OBN determines for which operations the current user has at least one valid implementation, and then returns the default implementation for each.

Default implementation for the business object: OBN determines for which operations the current user has at least one valid implementation, then determines from among these operations the default operation, and then returns the default implementation for this operation.

All implementations for a specific operation: OBN returns all the valid implementations for the specified operation for the business object.

All operations for the business object: OBN returns all operations for the business object for which the current user has at least one implementation.

You can also check if the current user has any valid implementations for a particular business object, or business object and operation. This is useful if you are creating an OBN link and want to determine if the link is valid for the current user so that you can disable the link, if necessary.

Procedure

To query OBN for business objects and operations, get a resolving container:

IOBNResolvingContainer obnResolvingContatiner = null;

try {

    // Create OBN metadata for specified business object, operation

    IOBNMetadata obnMetadata = OBNFactory.getInstance()
        .createOBNMetadata(BO, systemAlias, operation, user);

        

    // Get the OBN service

    IOBNService obnService = (IOBNService)PortalRuntime
        .getRuntimeResources().getService(IOBNService.KEY);

 

    // Get a resolving containers for the specified OBN metadata

    obnResolvingContatiner = obnService
        .getOBNResolvingContainer(user, obnMetadata);

}

catch(OBNException e) {}

Once you have a IOBNResolvingContainer object, you can execute various methods to find out information about the business object and operation specified in the IOBNMetadata object.

The following checks if there is a valid implementation for the specified OBN metadata for the current user:

booleanisAnyImplementationForOBNLink = false;

try {

    isAnyImplementationForOBNLink = obnResolvingContatiner
        .hasImplementations();

}

catch(OBNException e) {}

 

 

 

 

End of Content Area