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 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 interfacesIF_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 |
---|---|
|
Name of 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 |
|
Defines whether a single value or a value range can be entered on the selection screen for this parameter. Possible values are:
|
|
The data type of the parameter. It must be an elementary data type, like |
|
The output length of the parameter if the data type has no fixed length |
|
Number of decimals if the data type belongs to a number with decimals |
|
Not supported |
|
Not used |
|
Not used |
|
The title of the parameter which is displayed on the selection screen |
|
Defines whether lower case characters are allowed for the parameter |
|
Defines whether the parameter is hidden on the selection screen |
|
If set to |
|
Defines whether the parameter is mandatory on the selection screen |
|
If set, the parameter is displayed as checkbox on the selection screen |
|
If set, the parameter is displayed as list box on the selection screen |
|
If set, the parameter is displayed as radio button on the selection screen |
|
Name of 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 |
---|---|
|
Name of the parameter. It's the same name that was used in table |
|
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 |
|
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 tableIT_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 |
---|---|
|
Name of the parameter. It's the same name that was used in method |
|
If you've defined the parameter as a single value parameter in method |
|
Entry of a ranges table which contains the parameter value, or a parameter value range |
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.