SAP TB_ACCDEF_TRD_TRANS_CREATE Function Module for Generate Accrual/Deferral Business Transactions









TB_ACCDEF_TRD_TRANS_CREATE is a standard tb accdef trd trans create 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 Business Transactions 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 accdef trd trans create FM, simply by entering the name TB_ACCDEF_TRD_TRANS_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function TB_ACCDEF_TRD_TRANS_CREATE 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_ACCDEF_TRD_TRANS_CREATE'"Generate Accrual/Deferral Business Transactions
EXPORTING
IM_TRANSACTION = "Transaction Data
IM_DOCUMENT_DATE = "Document Date in Document
* IM_FLAG_TEST = 'X' "Test Run Indicator
* IM_AUTO_POST = 'X' "soll sofort gebucht werden?
* IM_FLG_ALL_VAL_AREAS = ' ' "'X'=Post All Val. Areas, ' '=Post Only Operative Val. Area
* IM_PROTOCOL = "Protocol Manager
* IM_TYPE_OF_RATE = 'M' "Price/Rate Type
* IM_SFHAZU = "

IMPORTING
EX_FLAG_ERROR = "Indicator: Error Occurred
EX_TAB_MESSAGES = "Table of Messages

CHANGING
CH_TAB_FLOW = "Accrual/Deferral Flows

EXCEPTIONS
FAILED = 1
.



IMPORTING Parameters details for TB_ACCDEF_TRD_TRANS_CREATE

IM_TRANSACTION - Transaction Data

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

IM_DOCUMENT_DATE - Document Date in Document

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

IM_FLAG_TEST - Test Run Indicator

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

IM_AUTO_POST - soll sofort gebucht werden?

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

IM_FLG_ALL_VAL_AREAS - 'X'=Post All Val. Areas, ' '=Post Only Operative Val. Area

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

IM_PROTOCOL - Protocol Manager

Data type: CL_PROTOCOL_HANDLER_TRP
Optional: Yes
Call by Reference: Yes

IM_TYPE_OF_RATE - Price/Rate Type

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

IM_SFHAZU -

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

EXPORTING Parameters details for TB_ACCDEF_TRD_TRANS_CREATE

EX_FLAG_ERROR - Indicator: Error Occurred

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

EX_TAB_MESSAGES - Table of Messages

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

CHANGING Parameters details for TB_ACCDEF_TRD_TRANS_CREATE

CH_TAB_FLOW - Accrual/Deferral Flows

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

EXCEPTIONS details

FAILED - Error Occurred

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TB_ACCDEF_TRD_TRANS_CREATE 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_failed  TYPE STRING, "   
lv_ch_tab_flow  TYPE FTR_FHAPO, "   
lv_ex_flag_error  TYPE XFELD, "   
lv_im_transaction  TYPE VTBFHA, "   
lv_ex_tab_messages  TYPE FTRY_VTBMSGPOST, "   
lv_im_document_date  TYPE BLDAT, "   
lv_im_flag_test  TYPE TB_STEST, "   'X'
lv_im_auto_post  TYPE XFELD, "   'X'
lv_im_flg_all_val_areas  TYPE CHAR1, "   SPACE
lv_im_protocol  TYPE CL_PROTOCOL_HANDLER_TRP, "   
lv_im_type_of_rate  TYPE KURST_CURR, "   'M'
lv_im_sfhazu  TYPE VTBFHAZU. "   

  CALL FUNCTION 'TB_ACCDEF_TRD_TRANS_CREATE'  "Generate Accrual/Deferral Business Transactions
    EXPORTING
         IM_TRANSACTION = lv_im_transaction
         IM_DOCUMENT_DATE = lv_im_document_date
         IM_FLAG_TEST = lv_im_flag_test
         IM_AUTO_POST = lv_im_auto_post
         IM_FLG_ALL_VAL_AREAS = lv_im_flg_all_val_areas
         IM_PROTOCOL = lv_im_protocol
         IM_TYPE_OF_RATE = lv_im_type_of_rate
         IM_SFHAZU = lv_im_sfhazu
    IMPORTING
         EX_FLAG_ERROR = lv_ex_flag_error
         EX_TAB_MESSAGES = lv_ex_tab_messages
    CHANGING
         CH_TAB_FLOW = lv_ch_tab_flow
    EXCEPTIONS
        FAILED = 1
. " TB_ACCDEF_TRD_TRANS_CREATE




ABAP code using 7.40 inline data declarations to call FM TB_ACCDEF_TRD_TRANS_CREATE

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_im_flag_test) = 'X'.
 
DATA(ld_im_auto_post) = 'X'.
 
DATA(ld_im_flg_all_val_areas) = ' '.
 
 
DATA(ld_im_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!