SAP LOAN_TEST Function Module for Preparation of Loan Structures for Transfer to FI









LOAN_TEST is a standard loan test SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Preparation of Loan Structures for Transfer to FI 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 loan test FM, simply by entering the name LOAN_TEST into the relevant SAP transaction such as SE37 or SE38.

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



Function LOAN_TEST 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 'LOAN_TEST'"Preparation of Loan Structures for Transfer to FI
EXPORTING
* BATCH_KZ = ' ' "
* MAPPE = ' ' "Name of Batch Input Session
* MAXLINE = ' ' "Max. Belegzeilen fuer BTCI, ' ' max = beliebig
* MONAT = ' ' "
* PRIMANOTA = ' ' "
* PROTOCOL = 'X' "Kennzeichen, ob ein Buchungsprotokoll erstellt w
* PROT_TEXT = ' ' "Kopf-Text für Protokolle (z.B masch. Sollstell.)
* SAMMELKZ = ' ' "Kennzeichne fuer Sammelbuchungen
* SELKZ = ' ' "X = Pruefung (tza37, tzc37) erfolgt, ' ' = nicht
* START_DAY = 00 "
* START_TIME = 00 "
BKTXT = "Document Text
* STATUS_EXT = ' ' "
* S_PRIMANOTA = ' ' "
* WIE_KZ = ' ' "
BLDAT = "Document Date
* BTCI = 'X' "Kennzeichen, ob Fibu aktiv sein soll.
BUDAT = "Posting Date
* CALLT = ' ' "X = Call Transaction ' ' = BTCI
* CODE = ' ' "
* FTPOST_KZ = ' ' "
* KONT_REF = ' ' "

IMPORTING
FLG_OK = "

TABLES
BEKI = "Ist-Kopfdaten
BEPI = "Ist-Belegdaten
ERROR = "
FEHLER = "Fehlertabelle aus der Vorselektion (tza37,tzc37)
IBEPP = "(i) Plan-Belegdaten (e) Statistische Plandaten
PAY_BSEG = "
T_FTPOST = "
T_VDAUSZ = "
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLFVDB_001 User Exit for Premium Reserve Fund
EXIT_SAPLFVDB_002 User Exit for Account Determination

IMPORTING Parameters details for LOAN_TEST

BATCH_KZ -

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

MAPPE - Name of Batch Input Session

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

MAXLINE - Max. Belegzeilen fuer BTCI, ' ' max = beliebig

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

MONAT -

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

PRIMANOTA -

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

PROTOCOL - Kennzeichen, ob ein Buchungsprotokoll erstellt w

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

PROT_TEXT - Kopf-Text für Protokolle (z.B masch. Sollstell.)

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

SAMMELKZ - Kennzeichne fuer Sammelbuchungen

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

SELKZ - X = Pruefung (tza37, tzc37) erfolgt, ' ' = nicht

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

START_DAY -

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

START_TIME -

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

BKTXT - Document Text

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

STATUS_EXT -

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

S_PRIMANOTA -

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

WIE_KZ -

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

BLDAT - Document Date

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

BTCI - Kennzeichen, ob Fibu aktiv sein soll.

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

BUDAT - Posting Date

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

CALLT - X = Call Transaction ' ' = BTCI

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

CODE -

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

FTPOST_KZ -

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

KONT_REF -

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

EXPORTING Parameters details for LOAN_TEST

FLG_OK -

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

TABLES Parameters details for LOAN_TEST

BEKI - Ist-Kopfdaten

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

BEPI - Ist-Belegdaten

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

ERROR -

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

FEHLER - Fehlertabelle aus der Vorselektion (tza37,tzc37)

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

IBEPP - (i) Plan-Belegdaten (e) Statistische Plandaten

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

PAY_BSEG -

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

T_FTPOST -

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

T_VDAUSZ -

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

Copy and paste ABAP code example for LOAN_TEST 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_beki  TYPE STANDARD TABLE OF VDBEKI, "   
lv_flg_ok  TYPE VDBEKI, "   
lv_batch_kz  TYPE VDBEKI, "   SPACE
lv_mappe  TYPE BSSPARA-MAPPE, "   SPACE
lv_maxline  TYPE BSSPARA, "   SPACE
lv_monat  TYPE BKPF-MONAT, "   SPACE
lv_primanota  TYPE VDBEPP-RPNNR, "   SPACE
lv_protocol  TYPE VDBEPP, "   'X'
lv_prot_text  TYPE VDBEPP, "   SPACE
lv_sammelkz  TYPE VDBEPP, "   SPACE
lv_selkz  TYPE VDBEPP, "   SPACE
lv_start_day  TYPE VDBEPP, "   00
lv_start_time  TYPE VDBEPP, "   00
lt_bepi  TYPE STANDARD TABLE OF VDBEPI, "   
lv_bktxt  TYPE VDBEPI, "   
lv_status_ext  TYPE VDBEPI, "   SPACE
lv_s_primanota  TYPE VDPNS-RPNSUP, "   SPACE
lv_wie_kz  TYPE VDPNS, "   SPACE
lv_bldat  TYPE BSSBKPF-BLDAT, "   
lt_error  TYPE STANDARD TABLE OF SPROT_U, "   
lv_btci  TYPE SPROT_U, "   'X'
lt_fehler  TYPE STANDARD TABLE OF SPROT_U, "   
lv_budat  TYPE BSSBKPF-BUDAT, "   
lt_ibepp  TYPE STANDARD TABLE OF VDBEPP, "   
lv_callt  TYPE VDBEPP, "   SPACE
lt_pay_bseg  TYPE STANDARD TABLE OF BSSBSEG, "   
lv_code  TYPE SY-TCODE, "   SPACE
lt_t_ftpost  TYPE STANDARD TABLE OF FTPOST, "   
lt_t_vdausz  TYPE STANDARD TABLE OF VDAUSZ, "   
lv_ftpost_kz  TYPE VDAUSZ, "   SPACE
lv_kont_ref  TYPE VDAUSZ. "   SPACE

  CALL FUNCTION 'LOAN_TEST'  "Preparation of Loan Structures for Transfer to FI
    EXPORTING
         BATCH_KZ = lv_batch_kz
         MAPPE = lv_mappe
         MAXLINE = lv_maxline
         MONAT = lv_monat
         PRIMANOTA = lv_primanota
         PROTOCOL = lv_protocol
         PROT_TEXT = lv_prot_text
         SAMMELKZ = lv_sammelkz
         SELKZ = lv_selkz
         START_DAY = lv_start_day
         START_TIME = lv_start_time
         BKTXT = lv_bktxt
         STATUS_EXT = lv_status_ext
         S_PRIMANOTA = lv_s_primanota
         WIE_KZ = lv_wie_kz
         BLDAT = lv_bldat
         BTCI = lv_btci
         BUDAT = lv_budat
         CALLT = lv_callt
         CODE = lv_code
         FTPOST_KZ = lv_ftpost_kz
         KONT_REF = lv_kont_ref
    IMPORTING
         FLG_OK = lv_flg_ok
    TABLES
         BEKI = lt_beki
         BEPI = lt_bepi
         ERROR = lt_error
         FEHLER = lt_fehler
         IBEPP = lt_ibepp
         PAY_BSEG = lt_pay_bseg
         T_FTPOST = lt_t_ftpost
         T_VDAUSZ = lt_t_vdausz
. " LOAN_TEST




ABAP code using 7.40 inline data declarations to call FM LOAN_TEST

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_batch_kz) = ' '.
 
"SELECT single MAPPE FROM BSSPARA INTO @DATA(ld_mappe).
DATA(ld_mappe) = ' '.
 
DATA(ld_maxline) = ' '.
 
"SELECT single MONAT FROM BKPF INTO @DATA(ld_monat).
DATA(ld_monat) = ' '.
 
"SELECT single RPNNR FROM VDBEPP INTO @DATA(ld_primanota).
DATA(ld_primanota) = ' '.
 
DATA(ld_protocol) = 'X'.
 
DATA(ld_prot_text) = ' '.
 
DATA(ld_sammelkz) = ' '.
 
DATA(ld_selkz) = ' '.
 
DATA(ld_start_day) = 00.
 
DATA(ld_start_time) = 00.
 
 
 
DATA(ld_status_ext) = ' '.
 
"SELECT single RPNSUP FROM VDPNS INTO @DATA(ld_s_primanota).
DATA(ld_s_primanota) = ' '.
 
DATA(ld_wie_kz) = ' '.
 
"SELECT single BLDAT FROM BSSBKPF INTO @DATA(ld_bldat).
 
 
DATA(ld_btci) = 'X'.
 
 
"SELECT single BUDAT FROM BSSBKPF INTO @DATA(ld_budat).
 
 
DATA(ld_callt) = ' '.
 
 
"SELECT single TCODE FROM SY INTO @DATA(ld_code).
DATA(ld_code) = ' '.
 
 
 
DATA(ld_ftpost_kz) = ' '.
 
DATA(ld_kont_ref) = ' '.
 


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!