Implementing BSP Callable Objects

Use

You can implement a Business Server Page (BSP) application and expose it as a callable object with a user interface.

To enable the interaction with the Guided Procedures framework, you must implement a specific data handling mechanism.

Procedure

1. Implement the Design Time Aspects of the Callable Object

The technical description of a BSP callable object includes input, output, and configuration parameters, as well as result states.

  1. Define the input and output parameters of the callable object.

    The input and output parameters are stored in preexisting structures. For each parameter, there is a type label and type data pair that represent metadata for the data type. In addition, there is a value label and value data pair that identify the data stored in the parameter. The input and output structures are managed using the function EUP_STRUCTURE_FACTORY.

  2. Define configuration parameters for the callable objects.

    They are represented as string attributes stored in internal tables.

  1. Create one or more result states for the callable object.

    Result states are also defined as string attributes and stored in a table. At runtime, they show the result of the callable object execution, and can be used for modeling the process flow.

2. Implement the Runtime Logic of the Object

Data is transferred from the GP framework in the SAP Web Application Server Java stack to the ABAP environment using XML representation. To transform XML data to object representation, and vice versa, you use EUP_STRUCTURE_FACTORY.

  1. Retrieve the input data by executing function EUP_GET_BSP_INPUT_DATA.
  1. Set the output parameters and the execution result state.

    The output is packed to XML, and then stored temporarily in the ABAP stack using EUP_STORE_BSP_OUTPUT_DATA. When the Java server receives a notification for the completion of the execution, it reads the output, and it is deleted on the ABAP side.

  1. Complete the object's execution.

    To indicate that the execution of the callable object is completed, you use server-side scripting. You fire a completion event to URN com.sap.eu.gp.co.bsp .

Result

You can activate the BSP application.

Next, you must expose the Web Dynpro component as a callable object in the GP design time. For more information, see Exposing BSPs as Callable Objects .

Example

For an example, see Implementing and Exposing a BSP Callable Object .