Hierarchy
⤷ CRM (Application Component) Customer Relationship Management
⤷ CRM_APPLICATION (Package) All CRM Components Without Special Structure Packages
⤷ NMED (Package) R/3MED: Medical documentation GSD
Basic Data
Data Element | N2_FQUERY |
Short Description | Query Function Module |
Data Type
Category of Dictionary Type | D | Domain |
Type of Object Referenced | No Information | |
Domain / Name of Reference Type | CHAR30 | |
Data Type | CHAR | Character String |
Length | 30 | |
Decimal Places | 0 | |
Output Length | 30 | |
Value Table |
Further Characteristics
Search Help: Name | ||
Search Help: Parameters | ||
Parameter ID | ||
Default Component name | ||
Change document | ||
No Input History | ||
Basic direction is set to LTR | ||
No BIDI Filtering |
Field Label
Length | Field Label | |
Short | 5 | Query |
Medium | 15 | Query-Function |
Long | 23 | Query Function Module |
Heading | 30 | Query Function Module |
Documentation
Definition
The Query function module is used within an external data module for finding and selecting external data. It must allocate a reference key, if necessary, and serves to make the contents of the data selected in the shared memory available. With the connection, the data contents are then transferred when the function modules ToText and ToTab in the dialog application are called.
If relevant, the function module must determine whether a search must be executed. If the Query function is called a second time with the same DOKID (and possibly with the same query parameter) and a new search is requested using the option Find new (new search) but not clearly by the caller, it should be assumed that the data in the memory of the external data module is still current and no new search has to be executed. In this case, the function will be ended immediately. In any other case, a search will be executed. For the user, this means that the search dialog window will not continually appear refreshed if, for example, several doc. elements from the same source document or information from the same external entity (or multiple fields from the same diagnosis) are to be made available.
The search method must have a fixed code in the external data module. For executing the search, the Query function also supplies search and selection screens, if necessary, and evaluates Fixed parameters transferred into QUERYPARAMSTR. The records hit must be read into the memory of the external data module by the query.
If the external data module can also be used as a Reference module and the key data are not already contained in the document master record, then the Query module must determine a Reference key and return it to the dialog application and make the key data available in an internal table. This table must logically have the same structure as the actual Reference table into which the external data module can permanently store the reference. The query has to return the key for the unique reference identification into the parameter REFKEY to the dialog application, with which these can be stored in the document tables.
Interface parameter
- importing
- VALUE(DOK_ID) LIKE N2REFHDR-REFDOK
- VALUE(QUERYPARAMSTR) LIKE N2FDBS-PARAMSTR
- VALUE(FNEWQUERY) LIKE N2FDBS-STRUCT OPTIONAL
- VALUE(QUERYTITEL) LIKE N2FDBS-PARAMSTR OPTIONAL
- VALUE(SS_MODE) LIKE SY-TCODE OPTIONAL (ab SchnittstVers 1)
- changing
- VALUE(REFKEY) LIKE N2REFHDR-REFKEY
- exceptions
- QUERYFAILED
- NO_LOCK
- NO_AUTHORITY
- NO_INSERT
FNEWQUERY is then transferred to the Query function module, if a new search for external data is to be executed every time a function module is called, and if the memory of the external data module is already full. The option Find new (new search) can generally also be set when an external data module is created, as well as when the external data supply for a documentation element (in the abstract or the concrete design) is integrated. The second of these has priority.
In the parameter QUERYTITEL, a title line is transferred from the partial document when it is called This contains information specifying for which documentation element the research will be performed. If necessary, this can be displayed by the query routine.
History
Last changed by/on | SAP | 20050301 |
SAP Release Created in |