SAP TB_REF_REFERENCE_GET_DEALS Function Module for Return TR Transactions of a Reference









TB_REF_REFERENCE_GET_DEALS is a standard tb ref reference get deals SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Return TR Transactions of a Reference 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 ref reference get deals FM, simply by entering the name TB_REF_REFERENCE_GET_DEALS into the relevant SAP transaction such as SE37 or SE38.

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



Function TB_REF_REFERENCE_GET_DEALS 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_REF_REFERENCE_GET_DEALS'"Return TR Transactions of a Reference
EXPORTING
REFTYP = "Kompensations-Typ
REFNR = "Kompensations-Nummer

TABLES
* T_DEALS = "Tab der Geschäfte (TR-DE/FX/MM)
* T_REFCC = "Tab der Nettobeträge/Bankwege je Whrg.
* T_REFON = "Tab der Positionen
* T_LOANS = "Tab der Darlehen (TR-LO)
* T_ORDERS = "Tab der WP-Order (TR-SE)

EXCEPTIONS
REFTYP_UNKNOWN = 1 REFERENCE_NOT_FOUND = 2 OTHERS = 3
.



IMPORTING Parameters details for TB_REF_REFERENCE_GET_DEALS

REFTYP - Kompensations-Typ

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

REFNR - Kompensations-Nummer

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

TABLES Parameters details for TB_REF_REFERENCE_GET_DEALS

T_DEALS - Tab der Geschäfte (TR-DE/FX/MM)

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

T_REFCC - Tab der Nettobeträge/Bankwege je Whrg.

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

T_REFON - Tab der Positionen

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

T_LOANS - Tab der Darlehen (TR-LO)

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

T_ORDERS - Tab der WP-Order (TR-SE)

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

EXCEPTIONS details

REFTYP_UNKNOWN - Referenztyp nicht bekannt

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

REFERENCE_NOT_FOUND - Kompensation nicht gefunden

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

OTHERS -

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

Copy and paste ABAP code example for TB_REF_REFERENCE_GET_DEALS 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_reftyp  TYPE REFH-REFTYP, "   
lt_t_deals  TYPE STANDARD TABLE OF TBREF_T_TR1KEY, "   
lv_reftyp_unknown  TYPE TBREF_T_TR1KEY, "   
lv_refnr  TYPE REFH-REFNR, "   
lt_t_refcc  TYPE STANDARD TABLE OF REFCC, "   
lv_reference_not_found  TYPE REFCC, "   
lv_others  TYPE REFCC, "   
lt_t_refon  TYPE STANDARD TABLE OF REFON, "   
lt_t_loans  TYPE STANDARD TABLE OF TBREF_T_TR3KEY, "   
lt_t_orders  TYPE STANDARD TABLE OF TBREF_T_TR2KEY. "   

  CALL FUNCTION 'TB_REF_REFERENCE_GET_DEALS'  "Return TR Transactions of a Reference
    EXPORTING
         REFTYP = lv_reftyp
         REFNR = lv_refnr
    TABLES
         T_DEALS = lt_t_deals
         T_REFCC = lt_t_refcc
         T_REFON = lt_t_refon
         T_LOANS = lt_t_loans
         T_ORDERS = lt_t_orders
    EXCEPTIONS
        REFTYP_UNKNOWN = 1
        REFERENCE_NOT_FOUND = 2
        OTHERS = 3
. " TB_REF_REFERENCE_GET_DEALS




ABAP code using 7.40 inline data declarations to call FM TB_REF_REFERENCE_GET_DEALS

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 REFTYP FROM REFH INTO @DATA(ld_reftyp).
 
 
 
"SELECT single REFNR FROM REFH INTO @DATA(ld_refnr).
 
 
 
 
 
 
 


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!