SAP TB_ALLOCATION_LIST Function Module for Interactive List of Hedges Returning Flagged Hedge (Exactly 1)









TB_ALLOCATION_LIST is a standard tb allocation list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Interactive List of Hedges Returning Flagged Hedge (Exactly 1) 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 allocation list FM, simply by entering the name TB_ALLOCATION_LIST into the relevant SAP transaction such as SE37 or SE38.

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



Function TB_ALLOCATION_LIST 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_ALLOCATION_LIST'"Interactive List of Hedges Returning Flagged Hedge (Exactly 1)
EXPORTING
* IMP_ALLOC_FULLY_SETTLED = ' ' "Hedges where allocations paid in full
* IMP_FX_PURCHASE = ' ' "Hedge with positive BZTRANS (purchase)
* IMP_FX_SALE = ' ' "Hedge with negative BZTRANS (sale)
* IMP_GJAHR = ' ' "Fiscal year
* IMP_KLART = ' ' "Unit type (hedge category)
* IMP_WBASIS = ' ' "Base currency (usually local currency)
* IMP_WITH_DETAILS = ' ' "Display with allocations ('X': yes, ' ':no)
* IMP_WTRANS = ' ' "Transaction currency (usually foreign currency)
* IMP_ALLOC_FULLY_USED = ' ' "Hedge where amount fully allocated
* IMP_ALLOC_NOT_FULLY_SETTLED = ' ' "Hedge where allocation not fully paid
* IMP_ALLOC_NOT_FULLY_USED = ' ' "Hedge where amount not fully allocated
* IMP_CRUSER = ' ' "Entered/changed by
* IMP_DATHI = ' ' "Due date of hedge, lower limit
* IMP_DATLO = ' ' "Due date of hedge, upper limit
* IMP_DCRDAT_HIGH = '00000000' "Entry/change date upto
* IMP_DCRDAT_LOW = '00000000' "Entry/change date from

TABLES
* SO_BELNR = "Ranges: Document no.
SO_BUKRS = "Ranges: company code
* SO_RFHA = "Ranges: Financial transaction
SO_RSICH = "Ranges: Hedge no.
* SO_STATUS = "

EXCEPTIONS
NO_ALLOCATION_FOUND = 1 PARAMETERS_WRONG = 2
.



IMPORTING Parameters details for TB_ALLOCATION_LIST

IMP_ALLOC_FULLY_SETTLED - Hedges where allocations paid in full

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

IMP_FX_PURCHASE - Hedge with positive BZTRANS (purchase)

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

IMP_FX_SALE - Hedge with negative BZTRANS (sale)

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

IMP_GJAHR - Fiscal year

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

IMP_KLART - Unit type (hedge category)

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

IMP_WBASIS - Base currency (usually local currency)

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

IMP_WITH_DETAILS - Display with allocations ('X': yes, ' ':no)

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

IMP_WTRANS - Transaction currency (usually foreign currency)

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

IMP_ALLOC_FULLY_USED - Hedge where amount fully allocated

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

IMP_ALLOC_NOT_FULLY_SETTLED - Hedge where allocation not fully paid

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

IMP_ALLOC_NOT_FULLY_USED - Hedge where amount not fully allocated

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

IMP_CRUSER - Entered/changed by

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

IMP_DATHI - Due date of hedge, lower limit

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

IMP_DATLO - Due date of hedge, upper limit

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

IMP_DCRDAT_HIGH - Entry/change date upto

Data type: VTBSI-DCRDAT
Default: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IMP_DCRDAT_LOW - Entry/change date from

Data type: VTBSI-DCRDAT
Default: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for TB_ALLOCATION_LIST

SO_BELNR - Ranges: Document no.

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

SO_BUKRS - Ranges: company code

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

SO_RFHA - Ranges: Financial transaction

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

SO_RSICH - Ranges: Hedge no.

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

SO_STATUS -

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

EXCEPTIONS details

NO_ALLOCATION_FOUND - nothing found

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

PARAMETERS_WRONG - inconsistent/incorrect/missing parameters

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

Copy and paste ABAP code example for TB_ALLOCATION_LIST 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_so_belnr  TYPE STANDARD TABLE OF VTB_BELNR, "   
lv_no_allocation_found  TYPE VTB_BELNR, "   
lv_imp_alloc_fully_settled  TYPE VTB_SIZU-XAFELD, "   SPACE
lv_imp_fx_purchase  TYPE VTB_SIZU-XAFELD, "   SPACE
lv_imp_fx_sale  TYPE VTB_SIZU-XAFELD, "   SPACE
lv_imp_gjahr  TYPE VTBSIZU-GJAHR, "   SPACE
lv_imp_klart  TYPE VTBSI-KLART, "   SPACE
lv_imp_wbasis  TYPE VTBSI-WBASIS, "   SPACE
lv_imp_with_details  TYPE VTB_SIZU-XAFELD, "   SPACE
lv_imp_wtrans  TYPE VTBSI-WTRANS, "   SPACE
lt_so_bukrs  TYPE STANDARD TABLE OF VTB_BUKRS, "   
lv_parameters_wrong  TYPE VTB_BUKRS, "   
lv_imp_alloc_fully_used  TYPE VTB_SIZU-XAFELD, "   SPACE
lt_so_rfha  TYPE STANDARD TABLE OF VTB_RFHA, "   
lv_imp_alloc_not_fully_settled  TYPE VTB_SIZU-XAFELD, "   SPACE
lt_so_rsich  TYPE STANDARD TABLE OF VTB_RSICH, "   
lv_imp_alloc_not_fully_used  TYPE VTB_SIZU-XAFELD, "   SPACE
lt_so_status  TYPE STANDARD TABLE OF VTB_STATUS, "   
lv_imp_cruser  TYPE VTBSI-CRUSER, "   SPACE
lv_imp_dathi  TYPE VTBSI-DSICH, "   SPACE
lv_imp_datlo  TYPE VTBSI-DSICH, "   SPACE
lv_imp_dcrdat_high  TYPE VTBSI-DCRDAT, "   '00000000'
lv_imp_dcrdat_low  TYPE VTBSI-DCRDAT. "   '00000000'

  CALL FUNCTION 'TB_ALLOCATION_LIST'  "Interactive List of Hedges Returning Flagged Hedge (Exactly 1)
    EXPORTING
         IMP_ALLOC_FULLY_SETTLED = lv_imp_alloc_fully_settled
         IMP_FX_PURCHASE = lv_imp_fx_purchase
         IMP_FX_SALE = lv_imp_fx_sale
         IMP_GJAHR = lv_imp_gjahr
         IMP_KLART = lv_imp_klart
         IMP_WBASIS = lv_imp_wbasis
         IMP_WITH_DETAILS = lv_imp_with_details
         IMP_WTRANS = lv_imp_wtrans
         IMP_ALLOC_FULLY_USED = lv_imp_alloc_fully_used
         IMP_ALLOC_NOT_FULLY_SETTLED = lv_imp_alloc_not_fully_settled
         IMP_ALLOC_NOT_FULLY_USED = lv_imp_alloc_not_fully_used
         IMP_CRUSER = lv_imp_cruser
         IMP_DATHI = lv_imp_dathi
         IMP_DATLO = lv_imp_datlo
         IMP_DCRDAT_HIGH = lv_imp_dcrdat_high
         IMP_DCRDAT_LOW = lv_imp_dcrdat_low
    TABLES
         SO_BELNR = lt_so_belnr
         SO_BUKRS = lt_so_bukrs
         SO_RFHA = lt_so_rfha
         SO_RSICH = lt_so_rsich
         SO_STATUS = lt_so_status
    EXCEPTIONS
        NO_ALLOCATION_FOUND = 1
        PARAMETERS_WRONG = 2
. " TB_ALLOCATION_LIST




ABAP code using 7.40 inline data declarations to call FM TB_ALLOCATION_LIST

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 XAFELD FROM VTB_SIZU INTO @DATA(ld_imp_alloc_fully_settled).
DATA(ld_imp_alloc_fully_settled) = ' '.
 
"SELECT single XAFELD FROM VTB_SIZU INTO @DATA(ld_imp_fx_purchase).
DATA(ld_imp_fx_purchase) = ' '.
 
"SELECT single XAFELD FROM VTB_SIZU INTO @DATA(ld_imp_fx_sale).
DATA(ld_imp_fx_sale) = ' '.
 
"SELECT single GJAHR FROM VTBSIZU INTO @DATA(ld_imp_gjahr).
DATA(ld_imp_gjahr) = ' '.
 
"SELECT single KLART FROM VTBSI INTO @DATA(ld_imp_klart).
DATA(ld_imp_klart) = ' '.
 
"SELECT single WBASIS FROM VTBSI INTO @DATA(ld_imp_wbasis).
DATA(ld_imp_wbasis) = ' '.
 
"SELECT single XAFELD FROM VTB_SIZU INTO @DATA(ld_imp_with_details).
DATA(ld_imp_with_details) = ' '.
 
"SELECT single WTRANS FROM VTBSI INTO @DATA(ld_imp_wtrans).
DATA(ld_imp_wtrans) = ' '.
 
 
 
"SELECT single XAFELD FROM VTB_SIZU INTO @DATA(ld_imp_alloc_fully_used).
DATA(ld_imp_alloc_fully_used) = ' '.
 
 
"SELECT single XAFELD FROM VTB_SIZU INTO @DATA(ld_imp_alloc_not_fully_settled).
DATA(ld_imp_alloc_not_fully_settled) = ' '.
 
 
"SELECT single XAFELD FROM VTB_SIZU INTO @DATA(ld_imp_alloc_not_fully_used).
DATA(ld_imp_alloc_not_fully_used) = ' '.
 
 
"SELECT single CRUSER FROM VTBSI INTO @DATA(ld_imp_cruser).
DATA(ld_imp_cruser) = ' '.
 
"SELECT single DSICH FROM VTBSI INTO @DATA(ld_imp_dathi).
DATA(ld_imp_dathi) = ' '.
 
"SELECT single DSICH FROM VTBSI INTO @DATA(ld_imp_datlo).
DATA(ld_imp_datlo) = ' '.
 
"SELECT single DCRDAT FROM VTBSI INTO @DATA(ld_imp_dcrdat_high).
DATA(ld_imp_dcrdat_high) = '00000000'.
 
"SELECT single DCRDAT FROM VTBSI INTO @DATA(ld_imp_dcrdat_low).
DATA(ld_imp_dcrdat_low) = '00000000'.
 


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!