SAP DD_PR_OPEN Function Module for Open an output channel (Create an administration block).
DD_PR_OPEN is a standard dd pr open SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Open an output channel (Create an administration block). 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 dd pr open FM, simply by entering the name DD_PR_OPEN into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDPW
Program Name: SAPLSDPW
Main Program: SAPLSDPW
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function DD_PR_OPEN 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 'DD_PR_OPEN'"Open an output channel (Create an administration block)..
EXPORTING
* DEVICE = 'D' "'D': Display, 'T': Table, 'F': File
* FORMAT = 'T' "U(nformatted), S(PROT): for transport
* LANG1 = 'D' "Language, default SYST-LANGU
* LANG2 = 'E' "Replacement language, default 'E'
* MAXBUF = 100 "Size of channel buffer
* MODUS = 'N' "N(ew), A(ppend)
* NAME = SYST-UNAME "Name of output channel
* OSPATH = '/tmp/' "Operating system path name
* TRACE = ' ' "
IMPORTING
ID = "Identifier via which channel addressed
EXCEPTIONS
CANNOT_OPEN = 1 ILLEGAL_VALUE = 2
IMPORTING Parameters details for DD_PR_OPEN
DEVICE - 'D': Display, 'T': Table, 'F': File
Data type: SPRWR-DEVICEDefault: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FORMAT - U(nformatted), S(PROT): for transport
Data type:Default: 'T'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANG1 - Language, default SYST-LANGU
Data type: SPRWR-LANG1Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANG2 - Replacement language, default 'E'
Data type: SPRWR-LANG2Default: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MAXBUF - Size of channel buffer
Data type: SY-TABIXDefault: 100
Optional: Yes
Call by Reference: No ( called with pass by value option)
MODUS - N(ew), A(ppend)
Data type: SPRWR-MODUSDefault: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NAME - Name of output channel
Data type:Default: SYST-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
OSPATH - Operating system path name
Data type:Default: '/tmp/'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TRACE -
Data type: DDREFSTRUC-BOOLDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DD_PR_OPEN
ID - Identifier via which channel addressed
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CANNOT_OPEN - Output channel could not be opened
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_VALUE - A parameter contains an invalid value
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DD_PR_OPEN 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_id | TYPE SY-TABIX, " | |||
| lv_device | TYPE SPRWR-DEVICE, " 'D' | |||
| lv_cannot_open | TYPE SPRWR, " | |||
| lv_format | TYPE SPRWR, " 'T' | |||
| lv_illegal_value | TYPE SPRWR, " | |||
| lv_lang1 | TYPE SPRWR-LANG1, " 'D' | |||
| lv_lang2 | TYPE SPRWR-LANG2, " 'E' | |||
| lv_maxbuf | TYPE SY-TABIX, " 100 | |||
| lv_modus | TYPE SPRWR-MODUS, " 'N' | |||
| lv_name | TYPE SPRWR, " SYST-UNAME | |||
| lv_ospath | TYPE SPRWR, " '/tmp/' | |||
| lv_trace | TYPE DDREFSTRUC-BOOL. " ' ' |
|   CALL FUNCTION 'DD_PR_OPEN' "Open an output channel (Create an administration block). |
| EXPORTING | ||
| DEVICE | = lv_device | |
| FORMAT | = lv_format | |
| LANG1 | = lv_lang1 | |
| LANG2 | = lv_lang2 | |
| MAXBUF | = lv_maxbuf | |
| MODUS | = lv_modus | |
| NAME | = lv_name | |
| OSPATH | = lv_ospath | |
| TRACE | = lv_trace | |
| IMPORTING | ||
| ID | = lv_id | |
| EXCEPTIONS | ||
| CANNOT_OPEN = 1 | ||
| ILLEGAL_VALUE = 2 | ||
| . " DD_PR_OPEN | ||
ABAP code using 7.40 inline data declarations to call FM DD_PR_OPEN
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 TABIX FROM SY INTO @DATA(ld_id). | ||||
| "SELECT single DEVICE FROM SPRWR INTO @DATA(ld_device). | ||||
| DATA(ld_device) | = 'D'. | |||
| DATA(ld_format) | = 'T'. | |||
| "SELECT single LANG1 FROM SPRWR INTO @DATA(ld_lang1). | ||||
| DATA(ld_lang1) | = 'D'. | |||
| "SELECT single LANG2 FROM SPRWR INTO @DATA(ld_lang2). | ||||
| DATA(ld_lang2) | = 'E'. | |||
| "SELECT single TABIX FROM SY INTO @DATA(ld_maxbuf). | ||||
| DATA(ld_maxbuf) | = 100. | |||
| "SELECT single MODUS FROM SPRWR INTO @DATA(ld_modus). | ||||
| DATA(ld_modus) | = 'N'. | |||
| DATA(ld_name) | = SYST-UNAME. | |||
| DATA(ld_ospath) | = '/tmp/'. | |||
| "SELECT single BOOL FROM DDREFSTRUC INTO @DATA(ld_trace). | ||||
| DATA(ld_trace) | = ' '. | |||
Search for further information about these or an SAP related objects