Method and system for querying a database
AssigneeSap SE
InventorsVishal Gaurav, Dietmar Storz, Manoj Gupta, Erik Luengen
Life of this patent
Estimating the term…
Abstract
A method and system for querying a database are provided. A user interface element for a dynamic field is created wherein the user interface element comprises a name field and a value field. A generic query structure is provided wherein the generic query structure comprises an attribute pair. The attribute pair has a field name attribute and a field value attribute. The name field is bound to the field name attribute and a first entry from the name field is passed to the field name attribute. The value field is then bound to field value attribute and a second entry from the value field is passed to the field value attribute.
Claims17
A computer implemented method for creating a user interface element to query a database, the method comprising:
- from a query specifying user interface, receiving a user selection of a condition type for querying a business object associated with the condition type;
- in response to the user selection, identifying an instance of query by group code that is adapted to search for metadata associated with the condition type;
- executing the identified instance of the query by group code to retrieve the metadata associated with the condition type;
- based upon the retrieved metadata, adapting the query specifying user interface to create a query specifying user interface element to query for the objects associated with the condition type, by adding at least one static key and at least one a dynamic key;
- based upon the adapted query specifying user interface element, generating a generic query structure of a query by type code associated with the condition type, the generic query structure including a static field value attribute and a dynamic attribute pair, the dynamic attribute pair having a dynamic field name attribute and a dynamic field value attribute;
- binding the user interface element to the generic query structure of the query by type code, by binding the static key of the user interface element to the static field value attribute of the generic query structure, and binding the dynamic key of the user interface element to the dynamic attribute pair of the generic query structure;
- and
- passing a value entered in the static value field of the static key to the static field value attribute of the generic query structure, passing a value of the dynamic name field of the dynamic key to the dynamic field name attribute of the generic query structure, passing a value entered in the dynamic value field of the dynamic key to the dynamic value field attribute of the generic query structure, and based upon the values entered in the static key and the dynamic key of the user, building a query for querying the business object.
A computing device operable for creating a query specific user interface to query a database, comprising:
- a query specifying user interface receiving a selection of a condition type for querying a business object associated with the condition type;
- a component controller identifying an instance of a query by group code that is adapted to search metadata associated with the condition type, and executing the identified instance of the query by group code to retrieve the metadata associated with the selected condition type;
- a user interface rendering module adapting the query specifying user interface to create a query specifying user interface element based upon the metadata retrieved by the component controller, the user interface element including at least one static key and at least one dynamic key;
- a memory coupled to the user interface rendering module, the memory storing a business repository, the business repository generating a generic query structure of a query by type code associated with the condition type, the generic query structure including a static field value attribute and a dynamic attribute pair, the dynamic attribute pair having a dynamic field name attribute and a dynamic field value attribute;
- and
- a query controller coupled to the memory and the user interface rendering module, the query controller binding the user interface element to the generic query of the query by type code, by binding the static key of the user interface element to the static field value attribute of the generic query structure, binding the dynamic key of the user interface element to the dynamic attribute pair of the generic query structure and passing a value entered in the static value field of the static key to the static field value attribute of the generic query structure, passing a value of the dynamic name field of the dynamic key to the dynamic field name attribute of the generic query structure, passing a value entered in the dynamic value field of the dynamic key to the dynamic value field attribute of the generic query structure, and based upon the values entered in the static key and the dynamic key of the user, building a query for querying the business object.
An article of manufacture comprising, a machine-accessible storage medium that provides instructions that, when executed by a machine, cause the machine to perform operations comprising:
- from a query specifying user interface, receiving a user selection of a condition type for querying a business object associated with the condition type;
- in response to the user selection, identifying an instance of query by group code that is adapted to search for metadata associated with the condition type;
- executing the identified instance of the query by group code to retrieve the metadata associated with the condition type;
- based upon the retrieved metadata, adapting the query specifying user interface to create a query specifying user interface element to query for the objects associated with the condition type, by adding at least one static key and at least one a dynamic key;
- based upon the adapted query specifying user interface element, generating a generic query structure of a query by type code associated with the condition type, the generic query structure including a static field value attribute and a dynamic attribute pair, the dynamic attribute pair having a dynamic field name attribute and a dynamic field value attribute;
- binding the user interface element to the generic query structure of the query by type code, by binding the static key of the user interface element to the static field value attribute of the generic query structure, and binding the dynamic key of the user interface element to the dynamic attribute pair of the generic query structure;
- and
- passing a value entered in the static value field of the static key to the static field value attribute of the generic query structure, passing a value of the dynamic name field of the dynamic key to the dynamic field name attribute of the generic query structure, passing a value entered in the dynamic value field of the dynamic key to the dynamic value field attribute of the generic query structure, and based upon the values entered in the static key and the dynamic key of the user, building a query for querying the business object.
Dependencies are inferred from the claim text.