Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Windows Dynamic Data Exchange : Structuring a DDE conversation in ABL : Conversation hierarchy
 
Conversation hierarchy
Any DDE conversation is structured in a hierarchy that consists of an application name that identifies the DDE server, a topic name within the application, and one or more data item names within the topic. The application and topic name together with a DDE frame uniquely identifies the conversation, which ABL also assigns a unique channel number.
The application name is a name defined by the server that is unique to other DDE server applications. This is usually the filename of the executable without the extension (for example, EXCEL for Microsoft Excel). The topic name identifies a category used to group server data items. If the data items are in a file accessed by the server, the topic name might be the filename (for example, a worksheet name such as Sheet1 in Excel). The data item names identify the data items that the server defines for the topic. These names generally follow a convention defined by and used in the server application itself (for example, the row and column coordinates of a worksheet cell, such as R3C12 in Excel). Once the OpenEdge client opens a conversation, it might exchange values with any server data item associated with the topic of conversation.
The following figure shows the conversational relationship between a OpenEdge client and two DDE servers, Excel and a Visual Basic application. In this example, there are three open conversations—two with Excel and one with the Visual Basic application.
Figure 51. ABL DDE conversations
During a conversation, ABL can send and receive data between an ABL field or variable and a server data item, or send the value of an ABL expression to a server data item. Typically, you cannot access a server expression from ABL unless the expression is directly associated with a data item—for example, a worksheet expression that defines the value of a cell in Excel. In this case, while ABL can receive the value of the cell expression from the data item (cell), it cannot send a new value to that cell, since its value is determined by the server expression. However, DDE server applications, such as Excel, usually allow clients to completely redefine server topics and data items by executing server commands using the DDE. (The i-ddeex1.p procedure at the end of this chapter demonstrates this capability.)