SAP SECURITY_SAVE Function Module for FM: Save Class to the DB (Update Task)









SECURITY_SAVE is a standard security save SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for FM: Save Class to the DB (Update Task) 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 security save FM, simply by entering the name SECURITY_SAVE into the relevant SAP transaction such as SE37 or SE38.

Function Group: FVW3
Program Name: SAPLFVW3
Main Program: SAPLFVW3
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1



Function SECURITY_SAVE 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 'SECURITY_SAVE'"FM: Save Class to the DB (Update Task)
EXPORTING
I_SECDB = "New Status
* I_SECDB_OLD = "Previous status
* I_ACCESS_MODE = 'I' "I(nsert) oder U(pdate)

TABLES
I_BONO = "Change Document Structure: Generated by RSSCD000
I_KOPA_OLD = "Change Document Structure: Generated by RSSCD000
I_SHARECAPITAL = "Change Document Structure; Generated by RSSCD000
I_SHARECAPITAL_OLD = "Change Document Structure; Generated by RSSCD000
I_SKOKO = "Change Document Structure: Generated by RSSCD000
I_SKOKO_OLD = "Change Document Structure: Generated by RSSCD000
I_RATING = "Change Document Structure: Generated by RSSCD000
I_RATING_OLD = "Change Document Structure: Generated by RSSCD000
I_POOLDATA = "Change Document Structure: Manually Created
I_POOLDATA_OLD = "Change Document Structure: Manually Created
I_POOLRATING = "Change Document Structure: Manually Created
I_BONO_OLD = "
I_POOLRATING_OLD = "Change Document Structure: Manually Created
I_POOLREMARK = "Change Document Structure: Manually Created
I_POOLREMARK_OLD = "Change Document Structure: Manually Created
I_TIERLEVEL = "Change Document Structure: Manually Created
I_TIERLEVEL_OLD = "Change Document Structure: Manually Created
I_TWX2 = "Change Document Structure: Generated by RSSCD000
I_TWX2_OLD = "Alter Zustand der Sekundärindizes
I_ANAN = "Change Document Structure: Generated by RSSCD000
I_ANAN_OLD = "
I_KOPO = "Change Document Structure: Generated by RSSCD000
I_KOPO_OLD = "
I_KOPA = "Change Document Structure: Generated by RSSCD000

EXCEPTIONS
VWPANLE_WRITE_FAILED = 1 VWPAKTI_WRITE_FAILED = 2 VWPTERM_WRITE_FAILED = 3 VWPANLA_WRITE_FAILED = 4 VTIDERI_WRITE_FAILED = 5 VWPBONO_WRITE_FAILED = 6 VZGPO_WRITE_FAILED = 7 VWPT_FREE_ATTR_WRITE_FAILED = 8
.



IMPORTING Parameters details for SECURITY_SAVE

I_SECDB - New Status

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

I_SECDB_OLD - Previous status

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

I_ACCESS_MODE - I(nsert) oder U(pdate)

Data type: DB_ACCESS_MODE
Default: 'I'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SECURITY_SAVE

I_BONO - Change Document Structure: Generated by RSSCD000

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

I_KOPA_OLD - Change Document Structure: Generated by RSSCD000

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

I_SHARECAPITAL - Change Document Structure; Generated by RSSCD000

Data type: AVWPSHARECAPITAL
Optional: No
Call by Reference: Yes

I_SHARECAPITAL_OLD - Change Document Structure; Generated by RSSCD000

Data type: AVWPSHARECAPITAL
Optional: No
Call by Reference: Yes

I_SKOKO - Change Document Structure: Generated by RSSCD000

Data type: AVZSKOKO
Optional: No
Call by Reference: Yes

I_SKOKO_OLD - Change Document Structure: Generated by RSSCD000

Data type: AVZSKOKO
Optional: No
Call by Reference: Yes

I_RATING - Change Document Structure: Generated by RSSCD000

Data type: AVWPRATING
Optional: No
Call by Reference: Yes

I_RATING_OLD - Change Document Structure: Generated by RSSCD000

Data type: AVWPRATING
Optional: No
Call by Reference: Yes

I_POOLDATA - Change Document Structure: Manually Created

Data type: AVWPPOOLDATA
Optional: No
Call by Reference: Yes

I_POOLDATA_OLD - Change Document Structure: Manually Created

Data type: AVWPPOOLDATA
Optional: No
Call by Reference: Yes

I_POOLRATING - Change Document Structure: Manually Created

Data type: AVWPPOOLRATING
Optional: No
Call by Reference: Yes

I_BONO_OLD -

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

I_POOLRATING_OLD - Change Document Structure: Manually Created

Data type: AVWPPOOLRATING
Optional: No
Call by Reference: Yes

I_POOLREMARK - Change Document Structure: Manually Created

Data type: AVWPPOOLREMARKS
Optional: No
Call by Reference: Yes

I_POOLREMARK_OLD - Change Document Structure: Manually Created

Data type: AVWPPOOLREMARKS
Optional: No
Call by Reference: Yes

I_TIERLEVEL - Change Document Structure: Manually Created

Data type: AVVTIERLEVEL
Optional: No
Call by Reference: Yes

I_TIERLEVEL_OLD - Change Document Structure: Manually Created

Data type: AVVTIERLEVEL
Optional: No
Call by Reference: Yes

I_TWX2 - Change Document Structure: Generated by RSSCD000

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

I_TWX2_OLD - Alter Zustand der Sekundärindizes

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

I_ANAN - Change Document Structure: Generated by RSSCD000

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

I_ANAN_OLD -

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

I_KOPO - Change Document Structure: Generated by RSSCD000

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

I_KOPO_OLD -

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

I_KOPA - Change Document Structure: Generated by RSSCD000

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

EXCEPTIONS details

VWPANLE_WRITE_FAILED - VWPANLE konnte nicht geschrieben werden

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

VWPAKTI_WRITE_FAILED - VWPAKTI konnte nicht geschrieben werden

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

VWPTERM_WRITE_FAILED - VWPTERM konnte nicht geschrieben werden

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

VWPANLA_WRITE_FAILED - VWPANLA konnte nicht geschrieben werden

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

VTIDERI_WRITE_FAILED - VTIDERI konnte nicht geschrieben werden

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

VWPBONO_WRITE_FAILED - VWPBONO konnte nicht geschrieben werden

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

VZGPO_WRITE_FAILED - VZGPO konnte nicht geschrieben werden

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

VWPT_FREE_ATTR_WRITE_FAILED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SECURITY_SAVE 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:
lt_i_bono  TYPE STANDARD TABLE OF AVWPBONO, "   
lv_i_secdb  TYPE SECURITY_DB, "   
lv_vwpanle_write_failed  TYPE SECURITY_DB, "   
lt_i_kopa_old  TYPE STANDARD TABLE OF AVZZKOPA, "   
lt_i_sharecapital  TYPE STANDARD TABLE OF AVWPSHARECAPITAL, "   
lt_i_sharecapital_old  TYPE STANDARD TABLE OF AVWPSHARECAPITAL, "   
lt_i_skoko  TYPE STANDARD TABLE OF AVZSKOKO, "   
lt_i_skoko_old  TYPE STANDARD TABLE OF AVZSKOKO, "   
lt_i_rating  TYPE STANDARD TABLE OF AVWPRATING, "   
lt_i_rating_old  TYPE STANDARD TABLE OF AVWPRATING, "   
lt_i_pooldata  TYPE STANDARD TABLE OF AVWPPOOLDATA, "   
lt_i_pooldata_old  TYPE STANDARD TABLE OF AVWPPOOLDATA, "   
lt_i_poolrating  TYPE STANDARD TABLE OF AVWPPOOLRATING, "   
lt_i_bono_old  TYPE STANDARD TABLE OF AVWPBONO, "   
lv_i_secdb_old  TYPE SECURITY_DB, "   
lv_vwpakti_write_failed  TYPE SECURITY_DB, "   
lt_i_poolrating_old  TYPE STANDARD TABLE OF AVWPPOOLRATING, "   
lt_i_poolremark  TYPE STANDARD TABLE OF AVWPPOOLREMARKS, "   
lt_i_poolremark_old  TYPE STANDARD TABLE OF AVWPPOOLREMARKS, "   
lt_i_tierlevel  TYPE STANDARD TABLE OF AVVTIERLEVEL, "   
lt_i_tierlevel_old  TYPE STANDARD TABLE OF AVVTIERLEVEL, "   
lt_i_twx2  TYPE STANDARD TABLE OF ATWX2, "   
lv_i_access_mode  TYPE DB_ACCESS_MODE, "   'I'
lv_vwpterm_write_failed  TYPE DB_ACCESS_MODE, "   
lt_i_twx2_old  TYPE STANDARD TABLE OF ATWX2, "   
lv_vwpanla_write_failed  TYPE ATWX2, "   
lt_i_anan  TYPE STANDARD TABLE OF AVWPANAN, "   
lv_vtideri_write_failed  TYPE AVWPANAN, "   
lt_i_anan_old  TYPE STANDARD TABLE OF AVWPANAN, "   
lv_vwpbono_write_failed  TYPE AVWPANAN, "   
lt_i_kopo  TYPE STANDARD TABLE OF AVZZKOPO, "   
lv_vzgpo_write_failed  TYPE AVZZKOPO, "   
lt_i_kopo_old  TYPE STANDARD TABLE OF AVZZKOPO, "   
lv_vwpt_free_attr_write_failed  TYPE AVZZKOPO, "   
lt_i_kopa  TYPE STANDARD TABLE OF AVZZKOPA. "   

  CALL FUNCTION 'SECURITY_SAVE'  "FM: Save Class to the DB (Update Task)
    EXPORTING
         I_SECDB = lv_i_secdb
         I_SECDB_OLD = lv_i_secdb_old
         I_ACCESS_MODE = lv_i_access_mode
    TABLES
         I_BONO = lt_i_bono
         I_KOPA_OLD = lt_i_kopa_old
         I_SHARECAPITAL = lt_i_sharecapital
         I_SHARECAPITAL_OLD = lt_i_sharecapital_old
         I_SKOKO = lt_i_skoko
         I_SKOKO_OLD = lt_i_skoko_old
         I_RATING = lt_i_rating
         I_RATING_OLD = lt_i_rating_old
         I_POOLDATA = lt_i_pooldata
         I_POOLDATA_OLD = lt_i_pooldata_old
         I_POOLRATING = lt_i_poolrating
         I_BONO_OLD = lt_i_bono_old
         I_POOLRATING_OLD = lt_i_poolrating_old
         I_POOLREMARK = lt_i_poolremark
         I_POOLREMARK_OLD = lt_i_poolremark_old
         I_TIERLEVEL = lt_i_tierlevel
         I_TIERLEVEL_OLD = lt_i_tierlevel_old
         I_TWX2 = lt_i_twx2
         I_TWX2_OLD = lt_i_twx2_old
         I_ANAN = lt_i_anan
         I_ANAN_OLD = lt_i_anan_old
         I_KOPO = lt_i_kopo
         I_KOPO_OLD = lt_i_kopo_old
         I_KOPA = lt_i_kopa
    EXCEPTIONS
        VWPANLE_WRITE_FAILED = 1
        VWPAKTI_WRITE_FAILED = 2
        VWPTERM_WRITE_FAILED = 3
        VWPANLA_WRITE_FAILED = 4
        VTIDERI_WRITE_FAILED = 5
        VWPBONO_WRITE_FAILED = 6
        VZGPO_WRITE_FAILED = 7
        VWPT_FREE_ATTR_WRITE_FAILED = 8
. " SECURITY_SAVE




ABAP code using 7.40 inline data declarations to call FM SECURITY_SAVE

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_i_access_mode) = 'I'.
 
 
 
 
 
 
 
 
 
 
 
 
 


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!