SAP TB_ACCRUAL_DEFERRAL_FOR_DEAL Function Module for Generate Accrual/Deferral Flows for a Transaction









TB_ACCRUAL_DEFERRAL_FOR_DEAL is a standard tb accrual deferral for deal SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generate Accrual/Deferral Flows for a Transaction 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 tb accrual deferral for deal FM, simply by entering the name TB_ACCRUAL_DEFERRAL_FOR_DEAL into the relevant SAP transaction such as SE37 or SE38.

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



Function TB_ACCRUAL_DEFERRAL_FOR_DEAL 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 'TB_ACCRUAL_DEFERRAL_FOR_DEAL'"Generate Accrual/Deferral Flows for a Transaction
EXPORTING
CURRENCY_LOCAL = "Local Currency
* FLG_USE_CURRENT_RATE = 'X' "'X'=FW-Umrechn.z.Stichtagskurs/Kurs d.Abgr.buchung, ' '=nimm Kurs d.abzugr.B.
* NOTICE_DATE = "
DATE_ACCR_DEFR = "Key Date
DATE_ACCR_DEFR_INCLUSIVE = "Stichtag - Inklusiv
DATE_ACCR_DEFR_LAST_OF_MONTH = "Stichtag - Ultimo
DATE_POSTING = "Buchungsdatum der Abgrenzungsbewegung
DATE_POSTING_REVERSAL = "Buchungsdatum der Rücknahmebewegung
DEAL = "Transaction
* FLG_TEST = 'X' "Test Mode
* TYPE_OF_RATE = 'M' "Price/Rate Type

IMPORTING
FLG_ERROR = "Fehler bei der Erzeugung der Abgrenzungsbwg.

TABLES
FLOWS = "Abzugrenzende Bewegungen
FLOWS_ACCR_DEFR_NEW = "Neu erzeugte Abgrenzungsbewegungen
FLOWS_ACCR_DEFR_OLD = "Bereits vorhandene Abgrenzungsbewegungen
FLOW_ACCR_DEFR_CUSTOM = "Customizing: Zugeordn. Abgrenzungsbewegungsarten
MESSAGES = "Nachrichten der Abgrenzung
.



IMPORTING Parameters details for TB_ACCRUAL_DEFERRAL_FOR_DEAL

CURRENCY_LOCAL - Local Currency

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

FLG_USE_CURRENT_RATE - 'X'=FW-Umrechn.z.Stichtagskurs/Kurs d.Abgr.buchung, ' '=nimm Kurs d.abzugr.B.

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

NOTICE_DATE -

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

DATE_ACCR_DEFR - Key Date

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

DATE_ACCR_DEFR_INCLUSIVE - Stichtag - Inklusiv

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

DATE_ACCR_DEFR_LAST_OF_MONTH - Stichtag - Ultimo

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

DATE_POSTING - Buchungsdatum der Abgrenzungsbewegung

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

DATE_POSTING_REVERSAL - Buchungsdatum der Rücknahmebewegung

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

DEAL - Transaction

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

FLG_TEST - Test Mode

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

TYPE_OF_RATE - Price/Rate Type

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

EXPORTING Parameters details for TB_ACCRUAL_DEFERRAL_FOR_DEAL

FLG_ERROR - Fehler bei der Erzeugung der Abgrenzungsbwg.

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

TABLES Parameters details for TB_ACCRUAL_DEFERRAL_FOR_DEAL

FLOWS - Abzugrenzende Bewegungen

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

FLOWS_ACCR_DEFR_NEW - Neu erzeugte Abgrenzungsbewegungen

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

FLOWS_ACCR_DEFR_OLD - Bereits vorhandene Abgrenzungsbewegungen

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

FLOW_ACCR_DEFR_CUSTOM - Customizing: Zugeordn. Abgrenzungsbewegungsarten

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

MESSAGES - Nachrichten der Abgrenzung

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

Copy and paste ABAP code example for TB_ACCRUAL_DEFERRAL_FOR_DEAL 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_flows  TYPE STANDARD TABLE OF VTBFHAPO, "   
lv_flg_error  TYPE VTBFHAPO, "   
lv_currency_local  TYPE T001-WAERS, "   
lv_flg_use_current_rate  TYPE BOOLE-BOOLE, "   'X'
lv_notice_date  TYPE TB_NOTICE_DATE, "   
lv_date_accr_defr  TYPE VTBFHAPO-DBERBIS, "   
lt_flows_accr_defr_new  TYPE STANDARD TABLE OF VTBFHAPO, "   
lt_flows_accr_defr_old  TYPE STANDARD TABLE OF VTBFHAPO, "   
lv_date_accr_defr_inclusive  TYPE VTBFHAPO-SINCLBIS, "   
lt_flow_accr_defr_custom  TYPE STANDARD TABLE OF AT19, "   
lv_date_accr_defr_last_of_month  TYPE VTBFHAPO-SULTBIS, "   
lt_messages  TYPE STANDARD TABLE OF VTBMSGPOST, "   
lv_date_posting  TYPE VTBFHAPO-DBUCHUNG, "   
lv_date_posting_reversal  TYPE VTBFHAPO-DBUCHUNG, "   
lv_deal  TYPE VTBFHA, "   
lv_flg_test  TYPE BOOLE-BOOLE, "   'X'
lv_type_of_rate  TYPE KURST_CURR. "   'M'

  CALL FUNCTION 'TB_ACCRUAL_DEFERRAL_FOR_DEAL'  "Generate Accrual/Deferral Flows for a Transaction
    EXPORTING
         CURRENCY_LOCAL = lv_currency_local
         FLG_USE_CURRENT_RATE = lv_flg_use_current_rate
         NOTICE_DATE = lv_notice_date
         DATE_ACCR_DEFR = lv_date_accr_defr
         DATE_ACCR_DEFR_INCLUSIVE = lv_date_accr_defr_inclusive
         DATE_ACCR_DEFR_LAST_OF_MONTH = lv_date_accr_defr_last_of_month
         DATE_POSTING = lv_date_posting
         DATE_POSTING_REVERSAL = lv_date_posting_reversal
         DEAL = lv_deal
         FLG_TEST = lv_flg_test
         TYPE_OF_RATE = lv_type_of_rate
    IMPORTING
         FLG_ERROR = lv_flg_error
    TABLES
         FLOWS = lt_flows
         FLOWS_ACCR_DEFR_NEW = lt_flows_accr_defr_new
         FLOWS_ACCR_DEFR_OLD = lt_flows_accr_defr_old
         FLOW_ACCR_DEFR_CUSTOM = lt_flow_accr_defr_custom
         MESSAGES = lt_messages
. " TB_ACCRUAL_DEFERRAL_FOR_DEAL




ABAP code using 7.40 inline data declarations to call FM TB_ACCRUAL_DEFERRAL_FOR_DEAL

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 WAERS FROM T001 INTO @DATA(ld_currency_local).
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_flg_use_current_rate).
DATA(ld_flg_use_current_rate) = 'X'.
 
 
"SELECT single DBERBIS FROM VTBFHAPO INTO @DATA(ld_date_accr_defr).
 
 
 
"SELECT single SINCLBIS FROM VTBFHAPO INTO @DATA(ld_date_accr_defr_inclusive).
 
 
"SELECT single SULTBIS FROM VTBFHAPO INTO @DATA(ld_date_accr_defr_last_of_month).
 
 
"SELECT single DBUCHUNG FROM VTBFHAPO INTO @DATA(ld_date_posting).
 
"SELECT single DBUCHUNG FROM VTBFHAPO INTO @DATA(ld_date_posting_reversal).
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_flg_test).
DATA(ld_flg_test) = 'X'.
 
DATA(ld_type_of_rate) = 'M'.
 


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!