This program generates queries i.e. ABAP reports without calculations. Method used for description of query is based on two main ideas:
· The first one is that the only creative part of a query is an ABAP SELECT statement. All remaining is a routine. So, it is necessary to describe this statement and than to generate automatically: SELECT-OPTIONS/PARAMETERS, using a content of a WHERE clause; TABLES statement, using a FROM clause; the description of output internal table, using the SELECT clause and so on. A FROM clause – describes a join.
· The second idea is, to extrapolate relational operations onto internal tables (ITABS): they may be parts of selections/projections/joins nearly as well as DB tables.
Based on these two ideas the resulting (generated) report is represented as a sequence of selections/projections/joins with resulting internal tables. First one includes only DB table(s), including pool/cluster tables and projection views, in spite of the fact that it is restricted by ABAP. Each next may consist of DB tables and previously defined ITABs.
This is implemented by providing with two screens in the generator: 1st one for creation of the sequence of ITABS and the 2nd for picking up DB tables and ITABS and constructing of a SELECT statement from their fields.
So, the tool is very natural to an ABAP programmer, because all that you must know is how to describe, well known SELECT statement. Also you may think in terms of relational operations concentrating the efforts on the essence of the task of data extraction.
the next page shows one join of two tables. There are also some not shown features such as joins by substring of DB-table field. Well, I will expand this description on demand. Try pressing on pushbuttons and hotspots and something will come in!
As first exercise try input such sequence of DB-tables: into INPUT ON fields (pressing each time F2 instead of ENTER): VBRK, VBRP, VBAP, VBAK.
File aBAPERobjects.xls contains brief description of all objects included into the transports.
Works on 4.6C.
Appendix I. SELECT statement creation screen.
This picture shows the screen (interactive listing) on which the SELECT statement is described.
· It allows addition of a source table: INPUT ON field to the left from "BKPF". Type here table name, press F2 and the table will be added as a component of SELECT. The generator will attempt to join this new table to the last one in FROM clause. In many cases it is satisfactorily, but can be changed manually.
· To place any field from DB table list to any part of the SELECT it is necessary to click once on those field and then on the place in SELECT stmt after which it has to be placed. Similarly fields can be rearrange inside one clause.
· To delete a field/table from SELECT click on it, new buttons will appear on the panel: "Delete line", "Escape picking" and possibly "Delete table".
Here is the definition of illegal from the ABAP point of view join of BSEG and BKPF. The generator implicitly will implement it in two steps: 1) SELECT from BSEG, with automatic addition of BSEG~GJAHR, necessary for joining the resulting ITAB with BKPF, and 2) SELECT From BKPF For All Entries in ITAB WHERE… Of course you have to understand, that for efficiency you must provide as much selections for BSEG as possible.
Good one
ReplyDelete