Show TOC Entering content frame

Object documentation Supply Function Locate the document in its SAP Library structure

Definition

A supply function is a script associated with a business anchor hierarchy that is written to relate business anchors when no business relation exists between the data sources associated with these anchors. The supply function creates a dependency between the two data sources, using the properties of the parent data source to query the database and to supply the child data source with the appropriate data.

Example

You want to relate the customer and opportunity anchors by creating a business anchor hierarchy between them.

This graphic is explained in the accompanying text Customer business anchor (data source is the customer business object)

This graphic is explained in the accompanying text This graphic is explained in the accompanying text Opportunity business anchor (data source is the opportunity business object)

When no business relation between the customer and opportunity business objects exists, you need to write a supply function for the opportunity business anchor.

Use

You write a supply function to link the two data sources and retrieve the required data at runtime. A supply function establishes a relationship between two data sources in the business anchor hierarchy when no relationship exists between them in the database.

Structure

There are two types of supply functions:

·        The local supply function can be used only within the interaction component containing the business anchor hierarchy. The supply function code is generated exclusively for this interaction component and is included in the interaction component’s class file. It cannot access the variables of any other interaction component.

Example

The supply function written for a tile is local to a tile and when you generate the code, it is included in the tile class file.

·        The global supply function can be used by all tile sets and tiles belonging to the user interface hierarchy defined by this business component. The code generated for a global supply function code is included in the code for the parent business component.

Caution

Using a global supply function, you can access variables of other interaction components. This is not recommended because an interaction component can be accessed by other applications.

See also:

 

Writing a Supply Function

Leaving content frame