## 4.2.15.8.1.1.2  Creating an ABAP Class with Interfaces IF\_AP J\_DT\_EXEC\_OBJECT and IF\_APJ\_RT\_EXEC\_OBJECT
Find out how to run business logic in an application job using an ABAP class that implements interfaces IF\_APJ\_DT\_EXEC\_OBJECT and IF\_APJ\_RT\_EXEC\_OBJECT .
##  Note
Note that this is a legacy interface. Don't use it for new developments. If you use this interface, you only have limited options during the editing of the job catalog entry.
If you want to run the business coding of your application in an application job, you can create an ABAP class which implements the interfaces IF\_APJ\_DT\_EXEC\_OBJECT and IF\_APJ\_RT\_EXEC\_OBJECT and put the coding into this class. It's not recommended to use this possibility for new developments, because it offers limited functionality only.
The interface IF\_APJ\_DT\_EXEC\_OBJECT contains the following method:
- GET\_PARAMETERS : This method is called by the application job framework to get all selection parameters. The method returns two internal tables:
- ET\_PARAMETER\_DEF : Determines the parameter list which is used by the job catalog entry that refers to this main class. It also defines how the parameters are displayed and how they behave on the selection screen
- ET\_PARAMETER\_VAL : Determines the default values for these parameters in a newly created job template that refers to the job catalog entry mentioned above
The structure of table ET\_PARAMETER\_DEF has the following fields:
| Field Name     | Definition                                                                                                                                                                                                                                                         |
|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SELNAME        | Nameof the parameter. The length of the name is restricted to 8 characters. It defines the parameter name which is used in the job catalog entry and in the job template                                                                                           |
| KIND           | Defines whether a single value or a value range can be entered on the selection screen for this parameter. Possible values are: • IF_APJ_DT_EXEC_OBJECT=>PARAMETER for a single value parameter • IF_APJ_DT_EXEC_OBJECT=>SELECT_OPTION for a value range parameter |
| DATATYPE       | The data type of the parameter. It must be an elementary data type, like C or CHAR                                                                                                                                                                                 |
| LENGTH         | The output length of the parameter if the data type has no fixed length                                                                                                                                                                                            |
| DECIMALS       | Number of decimals if the data type belongs to a number with decimals                                                                                                                                                                                              |
| COMPONENT_TYPE | Not supported                                                                                                                                                                                                                                                      |
| SECTION_TEXT   | Not used                                                                                                                                                                                                                                                           |
| GROUP_TEXT     | Not used                                                                                                                                                                                                                                                           |
| PARAM_TEXT     | The title of the parameter which is displayed on the selection screen                                                                                                                                                                                              |
| LOWERCASE_IND  | Defines whether lower case characters are allowed for the parameter                                                                                                                                                                                                |
| Field Name      | Definition                                                                                                       |
|-----------------|------------------------------------------------------------------------------------------------------------------|
| HIDDEN_IND      | Defines whether the parameter is hidden on the selection screen                                                  |
| CHANGEABLE_IND  | If set to ABAP_FALSE , the read-only flag is set for this parameter if the parameter is added to a catalog entry |
| MANDATORY_IND   | Defines whether the parameter is mandatory on the selection screen                                               |
| CHECKBOX_IND    | If set, the parameter is displayed as checkbox on the selection screen                                           |
| LIST_IND        | If set, the parameter is displayed as list box on the selection screen                                           |
| RADIO_GROUP_IND | If set, the parameter is displayed as radio button on the selection screen                                       |
| RADIO_GROUP_ID  | Nameof the radio button group if the parameter is a radio button                                                 |
The structure of the table ET\_PARAMETER\_VAL has the following fields:
| Field Name                 | Definition                                                                                                                                                                     |
|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SELNAME                    | Nameof the parameter. It's the same name that was used in table ET_PARAMETER_DEF                                                                                               |
| KIND                       | Defines whether a single value or a value range can be entered on the selection screen for this parameter. It should be the same value that was used in table ET_PARAMETER_DEF |
| SIGN , OPTION , LOW , HIGH | Entry of a ranges table which contains the parameter value, or a parameter value range                                                                                         |
The interface IF\_APJ\_RT\_EXEC\_OBJECT contains the following method:
- EXECUTE : This method is called by the application job framework when the scheduled job is run. It receives the internal table IT\_PARAMETERS as parameter. This internal table contains all parameter values that you entered on the selection screen when you scheduled the job.
The structure of table IT\_PARAMETERS has the following fields:
| Field Name                 | Definition                                                                                                                                                                                        |
|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SELNAME                    | Nameof the parameter. It's the same name that was used in method GET_PARAMETERS                                                                                                                   |
| KIND                       | If you've defined the parameter as a single value parameter in method GET_PARAMETERS , it's set to IF_APJ_DT_EXEC_OBJECT=>PARAMETER . Otherwise, it's set to IF_APJ_DT_EXEC_OBJECT=>SELECT_OPTION |
| SIGN , OPTION , LOW , HIGH | Entry of a ranges table which contains the parameter value, or a parameter value range                                                                                                            |
##  Note
If you've selected several value ranges for a parameter on the selection screen, the table IT\_PARAMETERS contains one entry for each value range.