SAP RS_CROSSREFERENCE Function Module for Program cross-reference
RS_CROSSREFERENCE is a standard rs crossreference SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Program cross-reference processing and below is the pattern details for this FM, 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 rs crossreference FM, simply by entering the name RS_CROSSREFERENCE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SEUW
Program Name: SAPLSEUW
Main Program: SAPLSEUW
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RS_CROSSREFERENCE 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 'RS_CROSSREFERENCE'"Program cross-reference.
EXPORTING
* DDEVICE = 'PRINTER' "Output medium 'PRINTER' or 'SCREEN'
* DIALOG = 'X' "'X' if user dialog required
* PROGRAMM = ' ' "Program name
* WITH_INCLUDES = ' ' "All includes in analysis 'X'
* WITH_PRINT_ON = 'X' "
* WITH_PRINT_OFF = 'X' "
CHANGING
* PRIPARAMS = ' ' "
EXCEPTIONS
CANCELED = 1 OBJECT_NO_EXIST = 2 PROGRAM_NO_EXIST = 3 PROGRAM_SPACE = 4 NO_AUTHORITY = 5
IMPORTING Parameters details for RS_CROSSREFERENCE
DDEVICE - Output medium 'PRINTER' or 'SCREEN'
Data type:Default: 'PRINTER'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DIALOG - 'X' if user dialog required
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROGRAMM - Program name
Data type: RSPRINT-PROGNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_INCLUDES - All includes in analysis 'X'
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_PRINT_ON -
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_PRINT_OFF -
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for RS_CROSSREFERENCE
PRIPARAMS -
Data type: PRI_PARAMSDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CANCELED - Printer output canceled by user
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NO_EXIST - Sub-object not contained in program
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROGRAM_NO_EXIST - Not a valid program name
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROGRAM_SPACE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_AUTHORITY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RS_CROSSREFERENCE 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_ddevice | TYPE STRING, " 'PRINTER' | |||
| lv_canceled | TYPE STRING, " | |||
| lv_priparams | TYPE PRI_PARAMS, " ' ' | |||
| lv_dialog | TYPE PRI_PARAMS, " 'X' | |||
| lv_object_no_exist | TYPE PRI_PARAMS, " | |||
| lv_programm | TYPE RSPRINT-PROGNAME, " SPACE | |||
| lv_program_no_exist | TYPE RSPRINT, " | |||
| lv_program_space | TYPE RSPRINT, " | |||
| lv_with_includes | TYPE RSPRINT, " SPACE | |||
| lv_no_authority | TYPE RSPRINT, " | |||
| lv_with_print_on | TYPE RSPRINT, " 'X' | |||
| lv_with_print_off | TYPE RSPRINT. " 'X' |
|   CALL FUNCTION 'RS_CROSSREFERENCE' "Program cross-reference |
| EXPORTING | ||
| DDEVICE | = lv_ddevice | |
| DIALOG | = lv_dialog | |
| PROGRAMM | = lv_programm | |
| WITH_INCLUDES | = lv_with_includes | |
| WITH_PRINT_ON | = lv_with_print_on | |
| WITH_PRINT_OFF | = lv_with_print_off | |
| CHANGING | ||
| PRIPARAMS | = lv_priparams | |
| EXCEPTIONS | ||
| CANCELED = 1 | ||
| OBJECT_NO_EXIST = 2 | ||
| PROGRAM_NO_EXIST = 3 | ||
| PROGRAM_SPACE = 4 | ||
| NO_AUTHORITY = 5 | ||
| . " RS_CROSSREFERENCE | ||
ABAP code using 7.40 inline data declarations to call FM RS_CROSSREFERENCE
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.| DATA(ld_ddevice) | = 'PRINTER'. | |||
| DATA(ld_priparams) | = ' '. | |||
| DATA(ld_dialog) | = 'X'. | |||
| "SELECT single PROGNAME FROM RSPRINT INTO @DATA(ld_programm). | ||||
| DATA(ld_programm) | = ' '. | |||
| DATA(ld_with_includes) | = ' '. | |||
| DATA(ld_with_print_on) | = 'X'. | |||
| DATA(ld_with_print_off) | = 'X'. | |||
Search for further information about these or an SAP related objects