SAP Reports / Programs | Basis Components | ABAP Runtime Environment | UI Services, Screen, Batch Input(BC-ABA-SC) SAP BC

RSQAPI20 SAP ABAP Report - Sample Program: How to Process a QUEUE







RSQAPI20 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 RSQAPI20 into the relevant SAP transactions such as SE38 or SE80


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 RSQAPI20. "Basic submit
SUBMIT RSQAPI20 AND RETURN. "Return to original report after report execution complete
SUBMIT RSQAPI20 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Title: Sample Program: How to Process a QUEUE
Text Symbol: 101 = Queue processing
Text Symbol: 102 = Queue processing
Text Symbol: 103 = Error in processing or during transfer of queue data
Text Symbol: 110 = Queue : &
Text Symbol: 112 = Error : &
Text Symbol: 122 = Long text


INCLUDES used within this REPORT RSQAPI20

No INCLUDES are used within this REPORT code!


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:

SCP_GET_CODEPAGE_NUMBER * CALL FUNCTION 'SCP_GET_CODEPAGE_NUMBER' * IMPORTING APPL_CODEPAGE = MY_CP.

SCP_GET_CODEPAGE_KIND CALL FUNCTION 'SCP_GET_CODEPAGE_KIND' IMPORTING CPKIND = CPKIND.

GET_JOB_RUNTIME_INFO CALL FUNCTION 'GET_JOB_RUNTIME_INFO' IMPORTING EVENTID = EVENT_ID "always SAP_QEVENT EVENTPARM = EVENT_PARM "Queue Name EXCEPTIONS OTHERS = 99.

QUEUE_OPEN CALL FUNCTION 'QUEUE_OPEN' EXPORTING NAME = QUEUE OPENMODE = Q_READ IMPORTING DESTINATION = DESTSYS DATATYPE = DATATYPE CLIENT = CLIENT PROGRAM = PROGRAM FORM = FORM USERID = USERID PASSWORD = PASSWORD CREATOR = CREATOR "PF: use creator for mail ERASE = QERASE.

QUEUE_GET CALL FUNCTION 'QUEUE_GET' EXPORTING NAME = QUEUE OPENMODE = Q_READ UNIT = UNIT POS = POS IMPORTING STATE = MSTATE LENGTH = LENGTH BUFFER = BUFFER UNIT = UNIT POS = POS EXCEPTIONS EOQ = 1 OTHERS = 99.

QUEUE_DELETE CALL FUNCTION 'QUEUE_DELETE' " delete processed unit EXPORTING NAME = QUEUE UNIT = UNIT.

QUEUE_SCHEDULE CALL FUNCTION 'QUEUE_SCHEDULE' EXPORTING PROGRAM = PROG NAME = QUEUE START = MODE DATE = STARTDATE TIME = STARTTIME EXCEPTIONS SCHEDULE_PROBLEM = 1 OTHERS = 99.

QUEUE_CLOSE CALL FUNCTION 'QUEUE_CLOSE' EXPORTING NAME = QUEUE OPENMODE = Q_READ QSTATE = QSTAT QERASE = QERASE.

RFC_REMOTE_FILE CALL FUNCTION 'RFC_REMOTE_FILE' DESTINATION DESTSYS EXPORTING FILE = QUEUE WRITE = 'X' TABLES FILEDATA = FTAB EXCEPTIONS SYSTEM_FAILURE = 1 MESSAGE MSG COMMUNICATION_FAILURE = 2 MESSAGE MSG OTHERS = 99.

SO_OBJECT_SEND CALL FUNCTION 'SO_OBJECT_SEND' EXPORTING FOLDER_ID = X_FOLDER_ID FORWARDER = X_FORWARDER OBJECT_FL_CHANGE = X_OBJECT_FL_CHANGE OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE OBJECT_ID = X_OBJECT_ID OBJECT_TYPE = X_OBJECT_TYPE OUTBOX_FLAG = X_OUTBOX_FLAG OWNER = X_OWNER STORE_FLAG = X_STORE_FLAG * IMPORTING * OBJECT_ID_NEW = X_OBJECT_ID_NEW * SENT_TO_ALL = X_SENT_TO_ALL TABLES OBJCONT = X_OBJCONT OBJHEAD = X_OBJHEAD OBJPARA = X_OBJPARA OBJPARB = X_OBJPARB RECEIVERS = X_RECEIVERS EXCEPTIONS ACTIVE_USER_NOT_EXIST = 1 COMPONENT_NOT_AVAILABLE = 2 FOLDER_NO_AUTHORIZATION = 3 FOLDER_NOT_EXIST = 4 FORWARDER_NOT_EXIST = 5 OBJECT_NO_AUTHORIZATION = 6 OBJECT_NOT_EXIST = 7 OBJECT_NOT_SENT = 8 OBJECT_TYPE_NOT_EXIST = 9 OPERATION_NO_AUTHORIZATION = 10 OWNER_NOT_EXIST = 11 PARAMETER_ERROR = 12 SUBSTITUTE_NOT_ACTIVE = 13 SUBSTITUTE_NOT_DEFINED = 14 USER_NOT_EXIST = 15 OTHERS = 99.

DOCU_GET CALL FUNCTION 'DOCU_GET' EXPORTING ID = DOC_ID_NA LANGU = SY-LANGU OBJECT = DOC_OBJECT IMPORTING HEAD = THEAD * (old) DOKUTYP = 'E' TABLES LINE = LDOCU EXCEPTIONS NO_DOCU_ON_SCREEN = 1 NO_DOCU_SELF_DEF = 2 NO_DOCU_TEMP = 3 RET_CODE = 4.

INIT_TEXT CALL FUNCTION 'INIT_TEXT' EXPORTING ID = *THEAD-TDID LANGUAGE = SY-LANGU NAME = *THEAD-TDNAME OBJECT = *THEAD-TDOBJECT IMPORTING HEADER = THEAD TABLES LINES = LDOCU EXCEPTIONS ID = 1 LANGUAGE = 2 NAME = 3 OBJECT = 4.



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 RSQAPI20 or its description.