SAP SPRX_DOC_DISPLAY Function Module for Document Display
SPRX_DOC_DISPLAY is a standard sprx doc display SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Document Display 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 sprx doc display FM, simply by entering the name SPRX_DOC_DISPLAY into the relevant SAP transaction such as SE37 or SE38.
Function Group: SPRX_DOC_DISPLAY
Program Name: SAPLSPRX_DOC_DISPLAY
Main Program: SAPLSPRX_DOC_DISPLAY
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SPRX_DOC_DISPLAY 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 'SPRX_DOC_DISPLAY'"Document Display.
EXPORTING
P_DOCUMENT = "
* P_TITLE = "
* P_DEFAULT_FILENAME = "
* P_DEFAULT_EXTENSION = 'XML' "
* P_CONTENT_TYPE = "
* SCREEN_START_COLUMN = 1 "
* SCREEN_START_LINE = 1 "
* SCREEN_END_COLUMN = 0 "
* SCREEN_END_LINE = 0 "
IMPORTING
P_NEW_DOCUMENT = "
P_DOCUMENT_SAVED = "
IMPORTING Parameters details for SPRX_DOC_DISPLAY
P_DOCUMENT -
Data type: XSTRINGOptional: No
Call by Reference: Yes
P_TITLE -
Data type: CSEQUENCEOptional: Yes
Call by Reference: Yes
P_DEFAULT_FILENAME -
Data type: CSEQUENCEOptional: Yes
Call by Reference: Yes
P_DEFAULT_EXTENSION -
Data type: CSEQUENCEDefault: 'XML'
Optional: Yes
Call by Reference: Yes
P_CONTENT_TYPE -
Data type: CSEQUENCEOptional: Yes
Call by Reference: Yes
SCREEN_START_COLUMN -
Data type: IDefault: 1
Optional: Yes
Call by Reference: Yes
SCREEN_START_LINE -
Data type: IDefault: 1
Optional: Yes
Call by Reference: Yes
SCREEN_END_COLUMN -
Data type: IOptional: Yes
Call by Reference: Yes
SCREEN_END_LINE -
Data type: IOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for SPRX_DOC_DISPLAY
P_NEW_DOCUMENT -
Data type: XSTRINGOptional: No
Call by Reference: Yes
P_DOCUMENT_SAVED -
Data type: ABAP_BOOLOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for SPRX_DOC_DISPLAY 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_p_document | TYPE XSTRING, " | |||
| lv_p_new_document | TYPE XSTRING, " | |||
| lv_p_title | TYPE CSEQUENCE, " | |||
| lv_p_document_saved | TYPE ABAP_BOOL, " | |||
| lv_p_default_filename | TYPE CSEQUENCE, " | |||
| lv_p_default_extension | TYPE CSEQUENCE, " 'XML' | |||
| lv_p_content_type | TYPE CSEQUENCE, " | |||
| lv_screen_start_column | TYPE I, " 1 | |||
| lv_screen_start_line | TYPE I, " 1 | |||
| lv_screen_end_column | TYPE I, " 0 | |||
| lv_screen_end_line | TYPE I. " 0 |
|   CALL FUNCTION 'SPRX_DOC_DISPLAY' "Document Display |
| EXPORTING | ||
| P_DOCUMENT | = lv_p_document | |
| P_TITLE | = lv_p_title | |
| P_DEFAULT_FILENAME | = lv_p_default_filename | |
| P_DEFAULT_EXTENSION | = lv_p_default_extension | |
| P_CONTENT_TYPE | = lv_p_content_type | |
| SCREEN_START_COLUMN | = lv_screen_start_column | |
| SCREEN_START_LINE | = lv_screen_start_line | |
| SCREEN_END_COLUMN | = lv_screen_end_column | |
| SCREEN_END_LINE | = lv_screen_end_line | |
| IMPORTING | ||
| P_NEW_DOCUMENT | = lv_p_new_document | |
| P_DOCUMENT_SAVED | = lv_p_document_saved | |
| . " SPRX_DOC_DISPLAY | ||
ABAP code using 7.40 inline data declarations to call FM SPRX_DOC_DISPLAY
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_p_default_extension) | = 'XML'. | |||
| DATA(ld_screen_start_column) | = 1. | |||
| DATA(ld_screen_start_line) | = 1. | |||
Search for further information about these or an SAP related objects