SAP Function Modules

FKK_DB_SECURITY_FOR_DOCUMENT SAP Function module - INTERNAL: Search for Cash Security Deposit using Request Document







FKK_DB_SECURITY_FOR_DOCUMENT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name FKK_DB_SECURITY_FOR_DOCUMENT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: FKK_SEC_DB
Released Date: 02.11.1998
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM FKK_DB_SECURITY_FOR_DOCUMENT - FKK DB SECURITY FOR DOCUMENT





CALL FUNCTION 'FKK_DB_SECURITY_FOR_DOCUMENT' "INTERNAL: Search for Cash Security Deposit using Request Document
* EXPORTING
*   x_opbel =                   " fkk_sec-opbel  Cash Security Deposit Request Document
  IMPORTING
    y_security =                " fkk_sec-security  Security Deposit Numbers
    y_sec =                     " fkk_sec       General Security Deposit Parameters
* TABLES
*   tx_iropbel =                " iropbel       Table of Request Document Numbers
*   ty_security =               " fkk_sec       Cash Security Deposits
*   ty_sec =                    " fkk_sec
  EXCEPTIONS
    NOT_FOUND = 1               "               No Security Deposit Found for the Document
    .  "  FKK_DB_SECURITY_FOR_DOCUMENT

ABAP code example for Function Module FKK_DB_SECURITY_FOR_DOCUMENT





The ABAP code below is a full code listing to execute function module FKK_DB_SECURITY_FOR_DOCUMENT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_y_security  TYPE FKK_SEC-SECURITY ,
ld_y_sec  TYPE FKK_SEC ,
it_tx_iropbel  TYPE STANDARD TABLE OF IROPBEL,"TABLES PARAM
wa_tx_iropbel  LIKE LINE OF it_tx_iropbel ,
it_ty_security  TYPE STANDARD TABLE OF FKK_SEC,"TABLES PARAM
wa_ty_security  LIKE LINE OF it_ty_security ,
it_ty_sec  TYPE STANDARD TABLE OF FKK_SEC,"TABLES PARAM
wa_ty_sec  LIKE LINE OF it_ty_sec .


SELECT single OPBEL
FROM FKK_SEC
INTO @DATA(ld_x_opbel).


"populate fields of struture and append to itab
append wa_tx_iropbel to it_tx_iropbel.

"populate fields of struture and append to itab
append wa_ty_security to it_ty_security.

"populate fields of struture and append to itab
append wa_ty_sec to it_ty_sec. . CALL FUNCTION 'FKK_DB_SECURITY_FOR_DOCUMENT' * EXPORTING * x_opbel = ld_x_opbel IMPORTING y_security = ld_y_security y_sec = ld_y_sec * TABLES * tx_iropbel = it_tx_iropbel * ty_security = it_ty_security * ty_sec = it_ty_sec EXCEPTIONS NOT_FOUND = 1 . " FKK_DB_SECURITY_FOR_DOCUMENT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_y_security  TYPE FKK_SEC-SECURITY ,
ld_x_opbel  TYPE FKK_SEC-OPBEL ,
it_tx_iropbel  TYPE STANDARD TABLE OF IROPBEL ,
wa_tx_iropbel  LIKE LINE OF it_tx_iropbel,
ld_y_sec  TYPE FKK_SEC ,
it_ty_security  TYPE STANDARD TABLE OF FKK_SEC ,
wa_ty_security  LIKE LINE OF it_ty_security,
it_ty_sec  TYPE STANDARD TABLE OF FKK_SEC ,
wa_ty_sec  LIKE LINE OF it_ty_sec.


SELECT single OPBEL
FROM FKK_SEC
INTO ld_x_opbel.


"populate fields of struture and append to itab
append wa_tx_iropbel to it_tx_iropbel.

"populate fields of struture and append to itab
append wa_ty_security to it_ty_security.

"populate fields of struture and append to itab
append wa_ty_sec to it_ty_sec.

SAP Documentation for FM FKK_DB_SECURITY_FOR_DOCUMENT


This function module is used to find a cash security deposit from the request document. ...See here for full SAP fm documentation








Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name FKK_DB_SECURITY_FOR_DOCUMENT or its description.