SAP Program INST_CUST_TEMPLATE - Sample Report

Title
Example of an Installation Report

Purpose
The report is an example for all installation reports that should bestarted as part of a Smart Implementation.

Integration
The report can be started as part of the installation process bySAPINST.
Alternatively, you can start it from the SAP System by callingtransaction INST_CUSTOM.

Prerequisites
To be able to run, the report must be entered in the tableINSTCNTL for the relevant release. In addition to the reportname, the corresponding check routine and an authorization object mustalso be entered. The sequence number indicates the point in the reportchain at which the report should be started.
The report must contain the includes

  • INST_INCLUDE3

  • INST_CONSTANTS (or INST_CONSTANTS_BACKGROUND if the
  • report is running in the background)
    • INST_FUNC_MODULES and

    • INST_GENERAL_RULES (or INST_GENERAL_RULES_BACKGROUND if
    • the report is running in the background)
      • At the START-OF-SELECTION point, first there must be a

      • PERFORM INSTALLATION_PROLOG (orINSTALLATION_PROLOG_BACKGROUND if the report is running in thebackground)
        • and at the END-OF-SELECTION point, there must be a

        • PERFORM INSTALLATION_EPILOG (orINSTALLATION_EPILOG_BACKGROUND if the report is running in thebackground).

          Selection

          • All entries required for executing the report must be transferred via
          • selection parameters. Every parameter must be assigned areference entry in the table INSTPARA. The name of the parametermust correspond to a key in the table INSTPARA.
            • All parameters must be hidden using the supplement NO-DISPLAY.
            • Output
              After the basic customizing settings have been made, the

              • RESULT_RC field returns the return code

              • S = SUCCESS
                E = ERROR
                W = WAITING
                A short message appears in the
                • RESULT_TEXT field.

                • If required, information about scheduled jobs is returned via theinternal table
                  • RESULT_TAB . For this, the following fields must be filled out:

                  • RESULT_TAB-JOBNAME and
                    RESULT_TAB-JOBCOUNT.

                    Activities
                    The activities depend on which basic settings are performed by thereport.

                    • Standard activities

                    • In INSTALLATION_PROLOG, the status of the report in the tableINSTCNTL is set to Active (Restart or
                      Repeat).
                      In INSTALLATION_EPILOG, the status is set to Completed (
                      Terminated or Waiting for jobs). The status Waitingfor jobs is set if the report is scheduling more reports in thebackground. The scheduled jobs are described in the table INSTCNTLJ
                      . The job scheduled last must execute the programINST_BACKGROUND_END. The INST_BACKGROUND_END checks thatall the previous jobs were successful.
                      • Standard activities for reports that run in the background

                      • In INSTALLATION_PROLOG_BACKGROUND, a standard exit is defined.
                        In INSTALLATION_EPILOG_BACKGROUND, the entry belonging to thejob is deleted from the table INSTCNTLJ if the report wassuccessfully executed.

                        Example

                        • Example report

                        • INST_CUST_TEMPLATE
                          • Corresponding check routine

                          • INST_CHECK_TEMPLATE
                            • Example report for job scheduling

                            • INST_CLIENT_COPY
                              • Example report for a report that runs in the background

                              • INST_CLIENT_COPYCLX