SAP Function Modules

TB_REF_OBJECTS_GET_MLT SAP Function module - Return Requested Table(s) of Reference(s), with Select Options







TB_REF_OBJECTS_GET_MLT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name TB_REF_OBJECTS_GET_MLT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: TB91
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM TB_REF_OBJECTS_GET_MLT - TB REF OBJECTS GET MLT





CALL FUNCTION 'TB_REF_OBJECTS_GET_MLT' "Return Requested Table(s) of Reference(s), with Select Options
* TABLES
*   t_refon =                   " refon         Tabelle  der Ref. mit Objekten
*   t_refh =                    " refh          Tabelle  der Ref. Kopf
*   t_refcc =                   " refcc         Tabelle  der Ref. Währungen
*   i_so_reftyp =               " tbref_so_reftyp  Typ der Referenzierung als Ranges-Tab
*   i_so_refnr =                " tbref_so_refnr  Nr  der Referenzierung als Ranges-Tab
*   i_so_objnr =                " tbref_so_objnr  Objektnummer           als Ranges-Tab
*   i_so_status =               " tbref_so_status  Status (leer =aktive!) als Ranges-Tab   )
*   i_so_dzterm =               " tbref_so_dzterm  Zahlungstermin         als Ranges-Tab
*   i_so_kontrh =               " tbref_so_rpzahl  Kontrahent             als Ranges-Tab
*   i_so_ext_ref =              " tbref_so_ext_ref  External Reference
* CHANGING
*   pc_tab_fut_pos =            " trsy_claspos  Treasury: Table with Class Position in Securities Account
  EXCEPTIONS
    REFERENCE_NOT_FOUND = 1     "               Referenzierung nicht vorhanden
    INTERNAL_ERROR = 2          "               Internal Error
    .  "  TB_REF_OBJECTS_GET_MLT

ABAP code example for Function Module TB_REF_OBJECTS_GET_MLT





The ABAP code below is a full code listing to execute function module TB_REF_OBJECTS_GET_MLT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_t_refon  TYPE STANDARD TABLE OF REFON,"TABLES PARAM
wa_t_refon  LIKE LINE OF it_t_refon ,
it_t_refh  TYPE STANDARD TABLE OF REFH,"TABLES PARAM
wa_t_refh  LIKE LINE OF it_t_refh ,
it_t_refcc  TYPE STANDARD TABLE OF REFCC,"TABLES PARAM
wa_t_refcc  LIKE LINE OF it_t_refcc ,
it_i_so_reftyp  TYPE STANDARD TABLE OF TBREF_SO_REFTYP,"TABLES PARAM
wa_i_so_reftyp  LIKE LINE OF it_i_so_reftyp ,
it_i_so_refnr  TYPE STANDARD TABLE OF TBREF_SO_REFNR,"TABLES PARAM
wa_i_so_refnr  LIKE LINE OF it_i_so_refnr ,
it_i_so_objnr  TYPE STANDARD TABLE OF TBREF_SO_OBJNR,"TABLES PARAM
wa_i_so_objnr  LIKE LINE OF it_i_so_objnr ,
it_i_so_status  TYPE STANDARD TABLE OF TBREF_SO_STATUS,"TABLES PARAM
wa_i_so_status  LIKE LINE OF it_i_so_status ,
it_i_so_dzterm  TYPE STANDARD TABLE OF TBREF_SO_DZTERM,"TABLES PARAM
wa_i_so_dzterm  LIKE LINE OF it_i_so_dzterm ,
it_i_so_kontrh  TYPE STANDARD TABLE OF TBREF_SO_RPZAHL,"TABLES PARAM
wa_i_so_kontrh  LIKE LINE OF it_i_so_kontrh ,
it_i_so_ext_ref  TYPE STANDARD TABLE OF TBREF_SO_EXT_REF,"TABLES PARAM
wa_i_so_ext_ref  LIKE LINE OF it_i_so_ext_ref .

DATA(ld_pc_tab_fut_pos) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_refon to it_t_refon.

"populate fields of struture and append to itab
append wa_t_refh to it_t_refh.

"populate fields of struture and append to itab
append wa_t_refcc to it_t_refcc.

"populate fields of struture and append to itab
append wa_i_so_reftyp to it_i_so_reftyp.

"populate fields of struture and append to itab
append wa_i_so_refnr to it_i_so_refnr.

"populate fields of struture and append to itab
append wa_i_so_objnr to it_i_so_objnr.

"populate fields of struture and append to itab
append wa_i_so_status to it_i_so_status.

"populate fields of struture and append to itab
append wa_i_so_dzterm to it_i_so_dzterm.

"populate fields of struture and append to itab
append wa_i_so_kontrh to it_i_so_kontrh.

"populate fields of struture and append to itab
append wa_i_so_ext_ref to it_i_so_ext_ref. . CALL FUNCTION 'TB_REF_OBJECTS_GET_MLT' * TABLES * t_refon = it_t_refon * t_refh = it_t_refh * t_refcc = it_t_refcc * i_so_reftyp = it_i_so_reftyp * i_so_refnr = it_i_so_refnr * i_so_objnr = it_i_so_objnr * i_so_status = it_i_so_status * i_so_dzterm = it_i_so_dzterm * i_so_kontrh = it_i_so_kontrh * i_so_ext_ref = it_i_so_ext_ref * CHANGING * pc_tab_fut_pos = ld_pc_tab_fut_pos EXCEPTIONS REFERENCE_NOT_FOUND = 1 INTERNAL_ERROR = 2 . " TB_REF_OBJECTS_GET_MLT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_pc_tab_fut_pos  TYPE TRSY_CLASPOS ,
it_t_refon  TYPE STANDARD TABLE OF REFON ,
wa_t_refon  LIKE LINE OF it_t_refon,
it_t_refh  TYPE STANDARD TABLE OF REFH ,
wa_t_refh  LIKE LINE OF it_t_refh,
it_t_refcc  TYPE STANDARD TABLE OF REFCC ,
wa_t_refcc  LIKE LINE OF it_t_refcc,
it_i_so_reftyp  TYPE STANDARD TABLE OF TBREF_SO_REFTYP ,
wa_i_so_reftyp  LIKE LINE OF it_i_so_reftyp,
it_i_so_refnr  TYPE STANDARD TABLE OF TBREF_SO_REFNR ,
wa_i_so_refnr  LIKE LINE OF it_i_so_refnr,
it_i_so_objnr  TYPE STANDARD TABLE OF TBREF_SO_OBJNR ,
wa_i_so_objnr  LIKE LINE OF it_i_so_objnr,
it_i_so_status  TYPE STANDARD TABLE OF TBREF_SO_STATUS ,
wa_i_so_status  LIKE LINE OF it_i_so_status,
it_i_so_dzterm  TYPE STANDARD TABLE OF TBREF_SO_DZTERM ,
wa_i_so_dzterm  LIKE LINE OF it_i_so_dzterm,
it_i_so_kontrh  TYPE STANDARD TABLE OF TBREF_SO_RPZAHL ,
wa_i_so_kontrh  LIKE LINE OF it_i_so_kontrh,
it_i_so_ext_ref  TYPE STANDARD TABLE OF TBREF_SO_EXT_REF ,
wa_i_so_ext_ref  LIKE LINE OF it_i_so_ext_ref.

ld_pc_tab_fut_pos = 'some text here'.

"populate fields of struture and append to itab
append wa_t_refon to it_t_refon.

"populate fields of struture and append to itab
append wa_t_refh to it_t_refh.

"populate fields of struture and append to itab
append wa_t_refcc to it_t_refcc.

"populate fields of struture and append to itab
append wa_i_so_reftyp to it_i_so_reftyp.

"populate fields of struture and append to itab
append wa_i_so_refnr to it_i_so_refnr.

"populate fields of struture and append to itab
append wa_i_so_objnr to it_i_so_objnr.

"populate fields of struture and append to itab
append wa_i_so_status to it_i_so_status.

"populate fields of struture and append to itab
append wa_i_so_dzterm to it_i_so_dzterm.

"populate fields of struture and append to itab
append wa_i_so_kontrh to it_i_so_kontrh.

"populate fields of struture and append to itab
append wa_i_so_ext_ref to it_i_so_ext_ref.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name TB_REF_OBJECTS_GET_MLT or its description.