SAP SELECT_SINGLE_FROM_DBTAB Function Module for









SELECT_SINGLE_FROM_DBTAB is a standard select single from dbtab SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 select single from dbtab FM, simply by entering the name SELECT_SINGLE_FROM_DBTAB into the relevant SAP transaction such as SE37 or SE38.

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



Function SELECT_SINGLE_FROM_DBTAB 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 'SELECT_SINGLE_FROM_DBTAB'"
EXPORTING
I_TABLE_NAME = "
I_TABLE_KEY_WA = "
* I_MANDT = SY-MANDT "
* I_TABLE_KEY_WA_CONTAINS_CLIENT = 'X' "
* I_BYPASSING_BUFFER = "

IMPORTING
E_TABLE_WA = "

EXCEPTIONS
ENTRY_NOT_FOUND = 1 TABLE_NOT_FOUND = 2 TABLE_TOO_LONG = 3 TABLE_TYPE_INVALID = 4 TABLE_KEY_WA_TOO_SHORT = 5 INTERNAL_ERROR = 6
.



IMPORTING Parameters details for SELECT_SINGLE_FROM_DBTAB

I_TABLE_NAME -

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

I_TABLE_KEY_WA -

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

I_MANDT -

Data type: SY-MANDT
Default: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TABLE_KEY_WA_CONTAINS_CLIENT -

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

I_BYPASSING_BUFFER -

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

EXPORTING Parameters details for SELECT_SINGLE_FROM_DBTAB

E_TABLE_WA -

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

EXCEPTIONS details

ENTRY_NOT_FOUND -

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

TABLE_NOT_FOUND -

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

TABLE_TOO_LONG -

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

TABLE_TYPE_INVALID -

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

TABLE_KEY_WA_TOO_SHORT -

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

INTERNAL_ERROR -

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

Copy and paste ABAP code example for SELECT_SINGLE_FROM_DBTAB 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_e_table_wa  TYPE STRING, "   
lv_i_table_name  TYPE DCOBJDEF-NAME, "   
lv_entry_not_found  TYPE DCOBJDEF, "   
lv_i_table_key_wa  TYPE DCOBJDEF, "   
lv_table_not_found  TYPE DCOBJDEF, "   
lv_i_mandt  TYPE SY-MANDT, "   SY-MANDT
lv_table_too_long  TYPE SY, "   
lv_table_type_invalid  TYPE SY, "   
lv_i_table_key_wa_contains_client  TYPE SY-MARKY, "   'X'
lv_i_bypassing_buffer  TYPE SY-MARKY, "   
lv_table_key_wa_too_short  TYPE SY, "   
lv_internal_error  TYPE SY. "   

  CALL FUNCTION 'SELECT_SINGLE_FROM_DBTAB'  "
    EXPORTING
         I_TABLE_NAME = lv_i_table_name
         I_TABLE_KEY_WA = lv_i_table_key_wa
         I_MANDT = lv_i_mandt
         I_TABLE_KEY_WA_CONTAINS_CLIENT = lv_i_table_key_wa_contains_client
         I_BYPASSING_BUFFER = lv_i_bypassing_buffer
    IMPORTING
         E_TABLE_WA = lv_e_table_wa
    EXCEPTIONS
        ENTRY_NOT_FOUND = 1
        TABLE_NOT_FOUND = 2
        TABLE_TOO_LONG = 3
        TABLE_TYPE_INVALID = 4
        TABLE_KEY_WA_TOO_SHORT = 5
        INTERNAL_ERROR = 6
. " SELECT_SINGLE_FROM_DBTAB




ABAP code using 7.40 inline data declarations to call FM SELECT_SINGLE_FROM_DBTAB

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 NAME FROM DCOBJDEF INTO @DATA(ld_i_table_name).
 
 
 
 
"SELECT single MANDT FROM SY INTO @DATA(ld_i_mandt).
DATA(ld_i_mandt) = SY-MANDT.
 
 
 
"SELECT single MARKY FROM SY INTO @DATA(ld_i_table_key_wa_contains_client).
DATA(ld_i_table_key_wa_contains_client) = 'X'.
 
"SELECT single MARKY FROM SY INTO @DATA(ld_i_bypassing_buffer).
 
 
 


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!