SAP DD_VIEW_ACT Function Module for DDinternal: view activation program









DD_VIEW_ACT is a standard dd view act SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for DDinternal: view activation program 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 view act FM, simply by entering the name DD_VIEW_ACT into the relevant SAP transaction such as SE37 or SE38.

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



Function DD_VIEW_ACT 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_VIEW_ACT'"DDinternal: view activation program
EXPORTING
VIEWNAME = "View name
* GET_STATE = 'M' "Read status A or M
ACT_MODE = "Activation mode (see F2)
* AUTH_CHK = 'X' "Execute internal authority check
PRID = "Log ID
* PROTNAME = ' ' "Log name alternative to PRID

IMPORTING
RC = "Return code: 0:o.k. 4: warning 8: error
DBACT = "Necessary/performed database action

EXCEPTIONS
VIEW_NOT_FOUND = 1 PARAMETER_ERROR = 2 ACTOK_FAILURE = 3
.



IMPORTING Parameters details for DD_VIEW_ACT

VIEWNAME - View name

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

GET_STATE - Read status A or M

Data type: DDREFSTRUC-STATE
Default: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACT_MODE - Activation mode (see F2)

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

AUTH_CHK - Execute internal authority check

Data type: DDREFSTRUC-BOOL
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PRID - Log ID

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

PROTNAME - Log name alternative to PRID

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

EXPORTING Parameters details for DD_VIEW_ACT

RC - Return code: 0:o.k. 4: warning 8: error

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

DBACT - Necessary/performed database action

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

EXCEPTIONS details

VIEW_NOT_FOUND - View could not be read

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

PARAMETER_ERROR - Incorrect parameter

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

ACTOK_FAILURE - Activation only permitted with TACOB

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

Copy and paste ABAP code example for DD_VIEW_ACT 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_rc  TYPE SY-SUBRC, "   
lv_viewname  TYPE DD25L-VIEWNAME, "   
lv_view_not_found  TYPE DD25L, "   
lv_dbact  TYPE TBATG-FCT, "   
lv_get_state  TYPE DDREFSTRUC-STATE, "   'M'
lv_parameter_error  TYPE DDREFSTRUC, "   
lv_act_mode  TYPE DDREFSTRUC-MODE, "   
lv_actok_failure  TYPE DDREFSTRUC, "   
lv_auth_chk  TYPE DDREFSTRUC-BOOL, "   'X'
lv_prid  TYPE SY-TABIX, "   
lv_protname  TYPE DDPRH-PROTNAME. "   SPACE

  CALL FUNCTION 'DD_VIEW_ACT'  "DDinternal: view activation program
    EXPORTING
         VIEWNAME = lv_viewname
         GET_STATE = lv_get_state
         ACT_MODE = lv_act_mode
         AUTH_CHK = lv_auth_chk
         PRID = lv_prid
         PROTNAME = lv_protname
    IMPORTING
         RC = lv_rc
         DBACT = lv_dbact
    EXCEPTIONS
        VIEW_NOT_FOUND = 1
        PARAMETER_ERROR = 2
        ACTOK_FAILURE = 3
. " DD_VIEW_ACT




ABAP code using 7.40 inline data declarations to call FM DD_VIEW_ACT

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 SUBRC FROM SY INTO @DATA(ld_rc).
 
"SELECT single VIEWNAME FROM DD25L INTO @DATA(ld_viewname).
 
 
"SELECT single FCT FROM TBATG INTO @DATA(ld_dbact).
 
"SELECT single STATE FROM DDREFSTRUC INTO @DATA(ld_get_state).
DATA(ld_get_state) = 'M'.
 
 
"SELECT single MODE FROM DDREFSTRUC INTO @DATA(ld_act_mode).
 
 
"SELECT single BOOL FROM DDREFSTRUC INTO @DATA(ld_auth_chk).
DATA(ld_auth_chk) = 'X'.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_prid).
 
"SELECT single PROTNAME FROM DDPRH INTO @DATA(ld_protname).
DATA(ld_protname) = ' '.
 


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!