Start of Content Area

Syntax documentation API of bgRFC Type t and bgRFC Type q  Locate the document in its SAP Library structure

The API mainly consists of interfaces and classes. Most of the classes are not directly addressed by the application programs, but through the corresponding interfaces. The user of the bgRFC type t and type q does not have to know all the classes and interfaces. Additional requirements will make the model more complex.

Note In addition to these classes, there is also an extension of the ABAP language element CALL FUNCTION.

 

ExampleIntroductory Example for Using the Outbound Scenario bgRFC API

The anchor point for the new API is the destination. This means that a resource for the required destination has to be requested first. This is done via the global class CL_BGRFC_DESTINATION_OUTBOUND and its class method CREATE.

Class for Requesting Destinations

This graphic is explained in the accompanying text

 

If the destination was correctly defined, the caller receives a pointer to the interface IF_BGRFC_DESTINATION_OUTBOUND . The object, which can be accessed through the interface, is valid for the entire program runtime.

Interface for Requesting a Unit

This graphic is explained in the accompanying text

 

The most important components of this interface are the Create methods. Using these methods, you can request a resource for a RFC unit. The result you get is an object reference to an object with an appropriate interface. The object is valid for the duration of an application LUW. After the application has triggered a COMMIT WORK (intentionally or unintentionally), automatic processing methods will eventually invalidate the object. The object is removed automatically by the Garbage Collector, as long as no reference to this object exists.

Interface for Manipulating an RFC Unit

This graphic is explained in the accompanying text

 

The unit resource can be manipulated via the interface IF_QRFC_UNIT_OUTBOUND, for example to register additional queues. This interface contains the interface IF_BGRFC_UNIT that is necessary for calling the function module. The following sections give you a detailed description of the function module call. The following flowchart shows as a summary the sequence of events in a program that uses the new RFC API.

ExampleCreating Units

This graphic is explained in the accompanying text

 

Result

As you can see, only a few function calls are required to use qRFC. The following sections describe the new API in more detail.

 

End of Content Area