SAP Reports / Programs | Basis Components | Business Management | SAP Business Workflow(BC-BMT-WFM) SAP BC

SAPWFPR1 SAP ABAP Report - Start WF Process in the Background







SAPWFPR1 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter SAPWFPR1 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

WF05 - Workflow: Queue


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT SAPWFPR1. "Basic submit
SUBMIT SAPWFPR1 AND RETURN. "Return to original report after report execution complete
SUBMIT SAPWFPR1 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: MAXRETRY = Max.no.of repetitions
Selection Text: SECRETRY = Repetition time (seconds)
Title: Start WF Process in the Background
Text Symbol: 001 = Queue is empty
Text Symbol: 002 = Pr.
Text Symbol: 003 = Rep.
Text Symbol: 004 = Process no.
Text Symbol: 005 = Date
Text Symbol: 006 = Time
Text Symbol: 007 = Agent


INCLUDES used within this REPORT SAPWFPR1

INCLUDE RSWFCEXC.
INCLUDE RSWFCFCD.


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

HOLIDAY_CHECK_AND_GET_INFO CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO' EXPORTING DATE = SY-DATUM HOLIDAY_CALENDAR_ID = TWFQU-HFCID IMPORTING HOLIDAY_FOUND = HOLIDAY_FOUND TABLES HOLIDAY_ATTRIBUTES = HOLIDAY_ATTRIBUTES EXCEPTIONS OTHERS = 4.

ENQUEUE_E_TABLE CALL FUNCTION 'ENQUEUE_E_TABLE' EXPORTING TABNAME = RSTABLE-TABNAME VARKEY = RSTABLE-VARKEY EXCEPTIONS OTHERS = 4.

DEQUEUE_E_TABLE CALL FUNCTION 'DEQUEUE_E_TABLE' EXPORTING TABNAME = RSTABLE-TABNAME VARKEY = RSTABLE-VARKEY.

WF_PROCESS CALL FUNCTION 'WF_PROCESS' EXPORTING PROCESS_ID = PROCESS_ID EXCEPTIONS OTHERS = 4.

WF_DYNP_PROCESS_EDIT CALL FUNCTION 'WF_DYNP_PROCESS_EDIT' EXPORTING PROCESS_ID = PROCESS_ID.

SHOW_JOBSTATE CALL FUNCTION 'SHOW_JOBSTATE' EXPORTING JOBCOUNT = JOBCOUNT JOBNAME = JOBNAME IMPORTING ABORTED = STATUS-ABORTED FINISHED = STATUS-FINISHED PRELIMINARY = STATUS-PRELIMINARY READY = STATUS-READY RUNNING = STATUS-RUNNING SCHEDULED = STATUS-SCHEDULED EXCEPTIONS OTHERS = 4.

HOLIDAY_CHECK_AND_GET_INFO CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO' EXPORTING DATE = SY-DATUM HOLIDAY_CALENDAR_ID = TWFQU-HFCID TABLES HOLIDAY_ATTRIBUTES = HOLIDAY_ATTRIBUTES EXCEPTIONS HOLIDAY_CALENDAR_NOT_FOUND = 1 OTHERS = 2.

JOB_OPEN CALL FUNCTION 'JOB_OPEN' EXPORTING JOBNAME = TWFQU-JOBPERIOD IMPORTING JOBCOUNT = TWFQU-JOBCPERIOD EXCEPTIONS OTHERS = 4.

JOB_SUBMIT CALL FUNCTION 'JOB_SUBMIT' EXPORTING AUTHCKNAM = TWFQU-AUTHCKNAM JOBCOUNT = TWFQU-JOBCPERIOD JOBNAME = TWFQU-JOBPERIOD REPORT = 'SAPWFPR1' EXCEPTIONS OTHERS = 4.

JOB_CLOSE CALL FUNCTION 'JOB_CLOSE' EXPORTING JOBCOUNT = TWFQU-JOBCPERIOD JOBNAME = TWFQU-JOBPERIOD SDLSTRTDT = SDLSTRTDT SDLSTRTTM = SDLSTRTTM EXCEPTIONS OTHERS = 4.

JOB_OPEN CALL FUNCTION 'JOB_OPEN' EXPORTING JOBNAME = TWFQU-JOBDAILY IMPORTING JOBCOUNT = TWFQU-JOBCDAILY EXCEPTIONS OTHERS = 4.

JOB_SUBMIT CALL FUNCTION 'JOB_SUBMIT' EXPORTING AUTHCKNAM = TWFQU-AUTHCKNAM JOBCOUNT = TWFQU-JOBCDAILY JOBNAME = TWFQU-JOBDAILY REPORT = 'SAPWFPR1' EXCEPTIONS OTHERS = 4.

JOB_CLOSE CALL FUNCTION 'JOB_CLOSE' EXPORTING JOBCOUNT = TWFQU-JOBCDAILY JOBNAME = TWFQU-JOBDAILY SDLSTRTDT = SDLSTRTDT SDLSTRTTM = TWFQU-DAILYSTART PRDDAYS = PRDDAYS EXCEPTIONS OTHERS = 4.

BP_JOB_SELECT CALL FUNCTION 'BP_JOB_SELECT' EXPORTING JOBSELECT_DIALOG = BTC_NO JOBSEL_PARAM_IN = JOBSELECT TABLES JOBSELECT_JOBLIST = JOBDATA EXCEPTIONS INVALID_DIALOG_TYPE = 01 " BTC_NO is a valid constant JOBNAME_MISSING = 02 " jobname is given NO_JOBS_FOUND = 03 " feasible situation SELECTION_CANCELED = 04 " can only happen in dialog USERNAME_MISSING = 05. " username given as wildcard

BP_JOB_DELETE CALL FUNCTION 'BP_JOB_DELETE' EXPORTING JOBNAME = JOBDATA-JOBNAME JOBCOUNT = JOBDATA-JOBCOUNT FORCEDMODE = 'X' EXCEPTIONS CANT_DELETE_EVENT_ENTRY = 01 CANT_DELETE_JOB = 02 CANT_DELETE_JOBLOG = 03 CANT_DELETE_STEPS = 04 CANT_DELETE_TIME_ENTRY = 05 CANT_DERELEASE_SUCCESSOR = 06 CANT_ENQ_PREDECESSOR = 07 CANT_ENQ_SUCCESSOR = 08 CANT_ENQ_TBTCO_ENTRY = 09 CANT_UPDATE_PREDECESSOR = 10 CANT_UPDATE_SUCCESSOR = 11 COMMIT_FAILED = 12 JOBCOUNT_MISSING = 13 JOBNAME_MISSING = 14 JOB_DOES_NOT_EXIST = 15 JOB_IS_ALREADY_RUNNING = 16 NO_DELETE_AUTHORITY = 17 OTHERS = 99.

SO_OBJECT_SEND CALL FUNCTION 'SO_OBJECT_SEND' EXPORTING OBJECT_HD_CHANGE = OBJECT_HD OBJECT_TYPE = 'RAW' IMPORTING OBJECT_ID_NEW = WARNING_MAIL SENT_TO_ALL = SENT_ALL TABLES OBJCONT = OBJCONT OBJHEAD = OBJHEAD OBJPARA = OBJPARA OBJPARB = OBJPARB RECEIVERS = RECEIVERS EXCEPTIONS OTHERS = 4.

SO_DEQUEUE_UPDATE_LOCKS CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.







The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name SAPWFPR1 or its description.