SAP DD_PROTREFERENCE_WRITE Function Module for Writing a reference log









DD_PROTREFERENCE_WRITE is a standard dd protreference write SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Writing a reference log 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 protreference write FM, simply by entering the name DD_PROTREFERENCE_WRITE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SDP1
Program Name: SAPLSDP1
Main Program:
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function DD_PROTREFERENCE_WRITE 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_PROTREFERENCE_WRITE'"Writing a reference log
EXPORTING
ACTTYPE = "Action type (A= Activation...)
TOP_LINE = "First line for screen display
TRKORR = "Transfer order
DATE = "
DIRTYPE = "Directory category (T= transport,
MAXSEVER = "Maximum severity of error messages
PROTNAME = "Log name
PROTTYPE = "Log category (D=DB, F=File)
REFPROTNAME = "Name of reference log
SHOW_LEVEL = "Log level to be displayed
SYSNAME = "System name

IMPORTING
INSERT_OK = "Inserting log successful
.



IMPORTING Parameters details for DD_PROTREFERENCE_WRITE

ACTTYPE - Action type (A= Activation...)

Data type: SPROT_P-ACTTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

TOP_LINE - First line for screen display

Data type: SPROT_P-TOP_LINE
Optional: No
Call by Reference: No ( called with pass by value option)

TRKORR - Transfer order

Data type: SPROT_P-TRKORR
Optional: No
Call by Reference: No ( called with pass by value option)

DATE -

Data type: SPROT_P-DATE
Optional: No
Call by Reference: No ( called with pass by value option)

DIRTYPE - Directory category (T= transport,

Data type: SPROT_P-DIRTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

MAXSEVER - Maximum severity of error messages

Data type: DDPRH-MAXSEVER
Optional: No
Call by Reference: No ( called with pass by value option)

PROTNAME - Log name

Data type: DDPRH-PROTNAME
Optional: No
Call by Reference: No ( called with pass by value option)

PROTTYPE - Log category (D=DB, F=File)

Data type: SPROT_P-PROTTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

REFPROTNAME - Name of reference log

Data type: SPROT_P-PROTNAME
Optional: No
Call by Reference: No ( called with pass by value option)

SHOW_LEVEL - Log level to be displayed

Data type: SPROT_P-SHOW_LEVEL
Optional: No
Call by Reference: No ( called with pass by value option)

SYSNAME - System name

Data type: TCESYST-SYSNAME
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for DD_PROTREFERENCE_WRITE

INSERT_OK - Inserting log successful

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for DD_PROTREFERENCE_WRITE 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_acttype  TYPE SPROT_P-ACTTYPE, "   
lv_insert_ok  TYPE SPROT_P, "   
lv_top_line  TYPE SPROT_P-TOP_LINE, "   
lv_trkorr  TYPE SPROT_P-TRKORR, "   
lv_date  TYPE SPROT_P-DATE, "   
lv_dirtype  TYPE SPROT_P-DIRTYPE, "   
lv_maxsever  TYPE DDPRH-MAXSEVER, "   
lv_protname  TYPE DDPRH-PROTNAME, "   
lv_prottype  TYPE SPROT_P-PROTTYPE, "   
lv_refprotname  TYPE SPROT_P-PROTNAME, "   
lv_show_level  TYPE SPROT_P-SHOW_LEVEL, "   
lv_sysname  TYPE TCESYST-SYSNAME. "   

  CALL FUNCTION 'DD_PROTREFERENCE_WRITE'  "Writing a reference log
    EXPORTING
         ACTTYPE = lv_acttype
         TOP_LINE = lv_top_line
         TRKORR = lv_trkorr
         DATE = lv_date
         DIRTYPE = lv_dirtype
         MAXSEVER = lv_maxsever
         PROTNAME = lv_protname
         PROTTYPE = lv_prottype
         REFPROTNAME = lv_refprotname
         SHOW_LEVEL = lv_show_level
         SYSNAME = lv_sysname
    IMPORTING
         INSERT_OK = lv_insert_ok
. " DD_PROTREFERENCE_WRITE




ABAP code using 7.40 inline data declarations to call FM DD_PROTREFERENCE_WRITE

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 ACTTYPE FROM SPROT_P INTO @DATA(ld_acttype).
 
 
"SELECT single TOP_LINE FROM SPROT_P INTO @DATA(ld_top_line).
 
"SELECT single TRKORR FROM SPROT_P INTO @DATA(ld_trkorr).
 
"SELECT single DATE FROM SPROT_P INTO @DATA(ld_date).
 
"SELECT single DIRTYPE FROM SPROT_P INTO @DATA(ld_dirtype).
 
"SELECT single MAXSEVER FROM DDPRH INTO @DATA(ld_maxsever).
 
"SELECT single PROTNAME FROM DDPRH INTO @DATA(ld_protname).
 
"SELECT single PROTTYPE FROM SPROT_P INTO @DATA(ld_prottype).
 
"SELECT single PROTNAME FROM SPROT_P INTO @DATA(ld_refprotname).
 
"SELECT single SHOW_LEVEL FROM SPROT_P INTO @DATA(ld_show_level).
 
"SELECT single SYSNAME FROM TCESYST INTO @DATA(ld_sysname).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!