BASIS
Function module
Used the same way in S/4HANA
BP_JOB_CREATE Create Background Job (With or Without Dialog)
Creates a background job with its header and step list in one call and can optionally show SM36-like dialog screens. It is used in custom tools that offer the user a job definition screen or to create jobs whose steps are fully prepared. Pass JOB_CR_DIALOG = 'N' for use without dialog; for simple scenarios the JOB_OPEN/JOB_SUBMIT/JOB_CLOSE trio is more common.
- Function group
- BTCH
- Remote-enabled (RFC)
- No
- Type
- Function module
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| JOB_CR_DIALOG | BTCH0000-CHAR1 | Dialog mode | Yes |
| JOB_CR_HEAD_INP | TBTCJOB | Job header (input) | Yes |
| STARTDTTYP | BTCSTDTTYP | Start condition type | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| JOB_CR_HEAD_OUT | TBTCJOB | Created job header |
| JOB_CR_STDT_OUT | TBTCSTRT | Start condition |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| JOB_CR_STEPLIST | TBTCSTEP | Job steps | Yes |
Exceptions
- CANT_CREATE_JOB — Job could not be created
- INVALID_DIALOG_TYPE — Invalid dialog type
- INVALID_JOB_DATA — Invalid job data
- JOB_CREATE_CANCELED — Creation canceled
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BP_JOB_CREATE'
EXPORTING
job_cr_dialog = lv_job_cr_dialog
job_cr_head_inp = lv_job_cr_head_inp
IMPORTING
job_cr_head_out = lv_job_cr_head_out
job_cr_stdt_out = lv_job_cr_stdt_out
TABLES
job_cr_steplist = lt_job_cr_steplist
EXCEPTIONS
cant_create_job = 1
invalid_dialog_type = 2
invalid_job_data = 3
job_create_canceled = 4
OTHERS = 5.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.