SAP RSPO_SET_JOB_STATE Function Module for
RSPO_SET_JOB_STATE is a standard rspo set job state SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for rspo set job state FM, simply by entering the name RSPO_SET_JOB_STATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SPOO
Program Name: SAPLSPOO
Main Program: SAPLSPOO
Appliation area: S
Release date: 21-Jun-1994
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RSPO_SET_JOB_STATE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'RSPO_SET_JOB_STATE'".
EXPORTING
* INFO = 0 "Additional information on the status
PJIDENT = "Spool ident
PJNUMMER = "Print order number
STATUS = "New status of the order (see rspo.h)
IMPORTING
ARCHSTART = "Archiving the spool order was started
DELETED = "As a result, the spool order was deleted
IMPORTING Parameters details for RSPO_SET_JOB_STATE
INFO - Additional information on the status
Data type: TSP02-PJINFOOptional: Yes
Call by Reference: No ( called with pass by value option)
PJIDENT - Spool ident
Data type: TSP02-PJIDENTOptional: No
Call by Reference: No ( called with pass by value option)
PJNUMMER - Print order number
Data type: TSP02-PJNUMMEROptional: No
Call by Reference: No ( called with pass by value option)
STATUS - New status of the order (see rspo.h)
Data type: TSP02-PJSTATUSOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RSPO_SET_JOB_STATE
ARCHSTART - Archiving the spool order was started
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DELETED - As a result, the spool order was deleted
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RSPO_SET_JOB_STATE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_info | TYPE TSP02-PJINFO, " 0 | |||
| lv_archstart | TYPE TSP02, " | |||
| lv_deleted | TYPE TSP02, " | |||
| lv_pjident | TYPE TSP02-PJIDENT, " | |||
| lv_pjnummer | TYPE TSP02-PJNUMMER, " | |||
| lv_status | TYPE TSP02-PJSTATUS. " |
|   CALL FUNCTION 'RSPO_SET_JOB_STATE' " |
| EXPORTING | ||
| INFO | = lv_info | |
| PJIDENT | = lv_pjident | |
| PJNUMMER | = lv_pjnummer | |
| STATUS | = lv_status | |
| IMPORTING | ||
| ARCHSTART | = lv_archstart | |
| DELETED | = lv_deleted | |
| . " RSPO_SET_JOB_STATE | ||
ABAP code using 7.40 inline data declarations to call FM RSPO_SET_JOB_STATE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single PJINFO FROM TSP02 INTO @DATA(ld_info). | ||||
| "SELECT single PJIDENT FROM TSP02 INTO @DATA(ld_pjident). | ||||
| "SELECT single PJNUMMER FROM TSP02 INTO @DATA(ld_pjnummer). | ||||
| "SELECT single PJSTATUS FROM TSP02 INTO @DATA(ld_status). | ||||
Search for further information about these or an SAP related objects