Show TOC

Data Provision Code PatternsLocate this document in the navigation structure

Use

Data provision code patterns are designed specifically for developers implementing data provider classes on the OData Channel. Developers can generate data provision code patterns by using the Generate Backend Operation Proxy option, which is based on the generation tool, Backend Operation Proxy (BOP). You can also use the BOP tool to generate local types for an RFC. The Generate Backend Operation Proxy provides a link to the BOP tool and generates the code to invoke the RFC based on the corresponding BOP generated local types.

This document guides you to generate Backend Operation Proxy:

Prerequisites
  • To use the code patterns, you must install the component IW_BEP in your system.

  • The Backend Operation Proxy Generator is supported only from SAP NetWeaver 7.0 version and above.

Procedure

To Generate Backend Operation Proxy and use the generated source code in your data provider class, proceed as follows:

  1. Start the ABAP Workbench in transaction SE80.

  2. Open a local report, for example, ZHS_TEST and choose the Edit button. After you have switched to editing mode, the Pattern push-button in the application toolbar becomes 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 is displayed. Alternatively you can also press Ctrl+F6. .

  5. Select the Other Pattern radio button and enter the technical name of the OData Channel pattern in the corresponding input field /IWBEP/FM_MGW_PATN. Input help is available for this field.

  6. Choose Continue.

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

  8. Choose Continue.

    After you have specified where you want to implement the generated code in your data provider class and selected the Generate Backend Operation Proxy, you need to provide details for generating the BOP in the OData Channel : Generate RFC BOP NG screen. To generate BOP, proceed as follows:

  9. In the RFC Destination field, enter the RFC Destination. Input help is also available that displays a list of system IDs as possible RFC destinations together with a suitable description from which you can select the relevant entry.

  10. In the RFC Name field, enter the technical name of the RFC, for example, BAPI_FLIGHT_GETLIST. You can use the input help to select from a list of existing RFCs, but this can be very performance intensive due to the potentially high number of possible RFCs available.

  11. In the BOP Interface Name field, enter the technical name of a suitable Backend Operation Proxy (BOP) class that will be generated. This interface will contain the types declarations for the parameters of the Remote-Enabled Function Module.

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

  13. Enter a valid Transport number.

  14. Now you have two options:

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

      OR

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

    Note

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

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

  16. Click the tabs Importing, Exporting, Changing and Tables to navigate between them. The selected tab will be highlighted.

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

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

    Note

    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.

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

Example

The Call RFC code pattern generates source code and inserts it at the position you placed your cursor. Choose Save to save your changes.

More Information

For a step-by-step guide about how to use the data provision code patterns, see Using Data Provision Code Patterns.