Programme SAP DTINTMPL - Template for Developing Programs with Various Data Sources

Description
Program DTINTMPL is a template that makes it easier for you to designprograms for processing data from various sources. Currently, this datais from the database of the database server to which it belongs, andfrom archives that are managed by this database server. (Refer todocumentation on the SAP system Archive Development Kit ADK.)
The technology described here essentially manages a central dialog boxwhich enables you to enter the source of data you require. This makes iteasier for the program author to preassign selection options andfacilitates communication with the end user. Another considerableadvantage is that the selection of data sources is presented in the sameto the end user in a number of programs.
This mechanism is not intended for retrieving and processing data.

Precondition
You must make a copy of this program before you start to modify it.Never use this program for a detailed specification of your application.

Using the Templates
Copy the template to a program of your choice and amend or change thepassages in the program with the English comment, name or content '...Your ...'. A few lines or texts are also assigned in the language ofyour country.
You should not control lines with the comment 'DTIN ...'. The onlyexception is the event INITIALIZATION, in which you can specify theappearance of the selection dialog box by using the variables describedbelow.

Dialog Box Design by the Program Developer
The following variables are available to developers to adjust dataselection dialog boxes:

  • XEXPERT is a checkbox that you can use to display the selection screen
  • in expert mode (value 'X' for expert mode). In this mode, the selectionof data sources appears on the program's selection screen.
    • XRADIO defines whether one source type (database, archive) must be
    • chosen (value 'X' for one source, that is, either database or archive)or whether combinations are possible. If XRADIO is activated, radiobuttons are used in the selection dialog box. If not, checkboxes areused.
      • XUSEDB is the variable whose value defines the use of the database in
      • the program run (value 'X' if you want to use the database). XCHUSEDBstates whether the user can activate or deactivate the database.XDSUSEDB defines whether the dialog box should display the database use.The ability to change database use only makes sense, of course, if youcan see it!
        • XUSEAR specifies whether you want to use the archive in the program run
        • (value 'X' if the archive should be used). XCHUSEAR states whether theuser can activate or deactivate the archive. XDSUSEAR defines whetherthe dialog box should display the value of archive use. The ability tochange archive use only makes sense, of course, if you can see it!
          • If XUSEAR is activated, ARCHOBJ specifies the archiving object whose
          • archive should be used (see ADK, for example, 'FI_DOCUMNT' for financialaccounting documentation). XCHAROBJ states whether the user may changethe archiving object, and XDSAROBJ defines whether the current archivingobject should be displayed in the dialog box. The ability to change thearchiving object only makes sense, of course, if you can see it!
            You should also maintain the following selection texts:
            • DTINMSSG: Label of the display field of the selected data source on the
            • program's selection screen (only visible in expert mode).
              • ARCHMSSG: Label of the display field of the selected archive on the
              • program's selection screen (only visible in expert mode).
                Furthermore, you can use some preassigned user commands to call actionsusing pushbuttons or menu entries:
                • 'DTIN': Call the selection dialog box for the selected data source.

                • 'EXP+': Activates expert mode

                • 'EXP-': Deactivates expert mode.

                • 'EXP/': Switches expert mode, that is, activates or deactivates the
                • mode, depending on the current status.

                  Assessment of the Data Source in the Program Run
                  In the program run, that is, during data processing, you should assessthe variables described above as follows:

                  • XUSEDB: Import and process the data from the database according to the
                  • application-specific selections.
                    • XUSEAR: Import and process the data from the archives using the ADK
                    • function according to the application-specific selections. You can findthe required ADK archiving object in ARCHOBJ and a listing of thearchives to be imported in ARCH_SEL.

                      Preassignment of the data source by SUBMIT
                      You can call programs that correspond to this template using a SUBMITand freely assign the variables XUSEDB, XUSEAR, ARCHOBJ and ARCH_SEL.

                      Example
                      Simply copy the program and control the variables described above totest their effect.