SAP SECURITY_WRITE_RIGHTS Function Module for Write Rights for a Security
SECURITY_WRITE_RIGHTS is a standard security write rights SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Write Rights for a Security 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 write rights FM, simply by entering the name SECURITY_WRITE_RIGHTS 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:

Function SECURITY_WRITE_RIGHTS 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_WRITE_RIGHTS'"Write Rights for a Security.
EXPORTING
I_SECURITY_NUMBER = "Wertpapierkennnumer
I_TEMP_SEC_NUMBER = "Old/Temp. security number (if internal number range)
* I_DRAWN_SECURITY_NUMBER = "Security number for the drawn security
I_PRODUCT_CATEGORY = "Product category (in german: Produkt Typ)
I_CUM_EX_INDICATOR = "Cum/ex indicator
I_OLD_CUM_EX_INDICATOR = "Old Kennzeichen CUM / EX
I_RIGHTS_COMPLEX = "Complex table with the rights belonging to the security
I_OLD_RIGHTS_COMPLEX = "Complex table with the old rights belonging to the security
I_NEW = "'X' => neues Wertpapier (used for evt. automatic generation of Drawing)
I_SHORT_TEXT = "Kurzbezeichnung (used for evt. automatic generation of Drawing)
I_ISSUE_START = "Datum Emissionsbeginn (used for evt. automatic generation of Drawing)
IMPORTING Parameters details for SECURITY_WRITE_RIGHTS
I_SECURITY_NUMBER - Wertpapierkennnumer
Data type: TERSINTERFACE-RANLOptional: No
Call by Reference: Yes
I_TEMP_SEC_NUMBER - Old/Temp. security number (if internal number range)
Data type: TERSINTERFACE-RANLOptional: No
Call by Reference: Yes
I_DRAWN_SECURITY_NUMBER - Security number for the drawn security
Data type: TERSINTERFACE-RANLOptional: Yes
Call by Reference: Yes
I_PRODUCT_CATEGORY - Product category (in german: Produkt Typ)
Data type: SANLFOptional: No
Call by Reference: Yes
I_CUM_EX_INDICATOR - Cum/ex indicator
Data type: SCUEXOptional: No
Call by Reference: Yes
I_OLD_CUM_EX_INDICATOR - Old Kennzeichen CUM / EX
Data type: SCUEXOptional: No
Call by Reference: Yes
I_RIGHTS_COMPLEX - Complex table with the rights belonging to the security
Data type: RIGHTS_COMPLEXOptional: No
Call by Reference: Yes
I_OLD_RIGHTS_COMPLEX - Complex table with the old rights belonging to the security
Data type: RIGHTS_COMPLEXOptional: No
Call by Reference: Yes
I_NEW - 'X' => neues Wertpapier (used for evt. automatic generation of Drawing)
Data type: CHAR1Optional: No
Call by Reference: Yes
I_SHORT_TEXT - Kurzbezeichnung (used for evt. automatic generation of Drawing)
Data type: XALKZOptional: No
Call by Reference: Yes
I_ISSUE_START - Datum Emissionsbeginn (used for evt. automatic generation of Drawing)
Data type: DEBEGOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for SECURITY_WRITE_RIGHTS 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_i_security_number | TYPE TERSINTERFACE-RANL, " | |||
| lv_i_temp_sec_number | TYPE TERSINTERFACE-RANL, " | |||
| lv_i_drawn_security_number | TYPE TERSINTERFACE-RANL, " | |||
| lv_i_product_category | TYPE SANLF, " | |||
| lv_i_cum_ex_indicator | TYPE SCUEX, " | |||
| lv_i_old_cum_ex_indicator | TYPE SCUEX, " | |||
| lv_i_rights_complex | TYPE RIGHTS_COMPLEX, " | |||
| lv_i_old_rights_complex | TYPE RIGHTS_COMPLEX, " | |||
| lv_i_new | TYPE CHAR1, " | |||
| lv_i_short_text | TYPE XALKZ, " | |||
| lv_i_issue_start | TYPE DEBEG. " |
|   CALL FUNCTION 'SECURITY_WRITE_RIGHTS' "Write Rights for a Security |
| EXPORTING | ||
| I_SECURITY_NUMBER | = lv_i_security_number | |
| I_TEMP_SEC_NUMBER | = lv_i_temp_sec_number | |
| I_DRAWN_SECURITY_NUMBER | = lv_i_drawn_security_number | |
| I_PRODUCT_CATEGORY | = lv_i_product_category | |
| I_CUM_EX_INDICATOR | = lv_i_cum_ex_indicator | |
| I_OLD_CUM_EX_INDICATOR | = lv_i_old_cum_ex_indicator | |
| I_RIGHTS_COMPLEX | = lv_i_rights_complex | |
| I_OLD_RIGHTS_COMPLEX | = lv_i_old_rights_complex | |
| I_NEW | = lv_i_new | |
| I_SHORT_TEXT | = lv_i_short_text | |
| I_ISSUE_START | = lv_i_issue_start | |
| . " SECURITY_WRITE_RIGHTS | ||
ABAP code using 7.40 inline data declarations to call FM SECURITY_WRITE_RIGHTS
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 RANL FROM TERSINTERFACE INTO @DATA(ld_i_security_number). | ||||
| "SELECT single RANL FROM TERSINTERFACE INTO @DATA(ld_i_temp_sec_number). | ||||
| "SELECT single RANL FROM TERSINTERFACE INTO @DATA(ld_i_drawn_security_number). | ||||
Search for further information about these or an SAP related objects