Show TOC

Using Data Provision Code PatternsLocate this document in the navigation structure


You can use the data provision code pattern Call RFC to save time and effort when you implement a data provider class on the OData Channel. This code pattern is based on the generation tool, Backend Operation Proxy (BOP). To implement the code patterns, you must install the component IW_BEP on your system.

If you want to use the code pattern to execute a Remote Function Call (RFC) from within a data provider class, ensure the following prerequisites are met:

  • Types used on the RFC interface must have a local type representation

  • RFC must be invoked


To generate BOP proceed as follows:

  1. Start ABAP Workbench in transaction SE80.

  2. Display the program, for example, ZHS_TEST in the tree view and choose Edit Display-->Change to switch to editing mode. After you have switched to editing mode, the Pattern push button in the application tool bar is active.

    Figure 1: Pattern Button Active
  3. Place your cursor at the position in the source code where you want the RFC to be called.

  4. Choose the Pattern push button. The Ins. statement dialog box displays.

    Figure 2: Ins. Statement Dialog Box
  5. Select the Other Pattern radio button and enter the technical name of the OData Channel pattern in the corresponding input field, for example/IWBEP/FM_MGW_PATN or use the Input help available for this field to select the technical name.

  6. Choose Continue .

    Figure 3: ODC Code Pattern Selection Screen dialog box
  7. In the ODC Code Pattern Selection Screen dialog box select the Generate Backend Operation Proxy radio button under Data Provision.

  8. Choose Continue.

    The OData Channel : Generate RFC BOP NG screen displays.

    Figure 4: OData Channel : Generate RFC BOP NG Screen
  9. Do the following in the OData Channel : Generate RFC BOP NG screen:

    1. In the RFC Destination field, enter the system alias (system ID and client) in which the RFC is located. You can also use the Input help that is available for this field.

    2. In the RFC Name field, enter the technical name of the RFC, for example, BAPI_FLIGHT_GETLIST. Input help is available for this field, but it can be very performance intensive.

    3. In the BOP Interface Name field, enter the name of the Interface which will be generated when we generate the BOP (when we run the pgm). This interface will contain the types declarations for the parameters of the RFC.

    4. Enter the package name to which the object belongs to in the Target Package field

    5. Enter a valid Transport number.

    6. Now you have two options:

      1. Click Execute to generate the BOP without any customizations.


      2. Select the Customize RFC Call Parameters check box to customize the BOP generation.


        The row(s) for the mandatory parameters in the RFC will be non-editable.

      3. On selecting to customize the rfc call parameters, the RFC Call Parameters window displays.

        Figure 5: RFC Call Parameters Window
      4. Click the tabs Importing, Exporting, Changing and Tables to navigate between them. The selected tab will be highlighted.

      5. Select/Unselect the parameters to be displayed in the RFC call using the check boxes.

      6. Once done with the selections; click Execute or press F8 to generate the BOP.


        A message window displays if the BOP Interface Name already exists. Click Yes to overwrite, and No to stop the generation process and change the BOP Interface name.

      7. On successful BOP generation the code gets generated in the ABAP Editor. Also the message RFC BOP Generated displays in the status bar.

        Figure 6: RFC BOP Generated Message

The Call RFC code pattern generates the source code, which is inserted directly into the data provider class.

More Information

For more information about data provision code patterns for the ABAP Workbench design time, see Data Provision Code Patterns.