SAP BUB_RELATION_GET Function Module for









BUB_RELATION_GET is a standard bub relation get 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 bub relation get FM, simply by entering the name BUB_RELATION_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function BUB_RELATION_GET 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 'BUB_RELATION_GET'"
EXPORTING
I_PARTNER1 = "Business Partner 1
* I_XWA = ' ' "
* I_XLM1 = ' ' "
* I_XLM2 = ' ' "
I_PARTNER2 = "Business Partner 2
* I_DATE_TO = "
* I_DATE_FROM = "
* I_DATE_FIX = "Validity Key Date
I_RELTYP = "Relationship/Role Def.Category
I_XRF = "
* I_DFTVAL = "Differentiation Type Characteristic
* I_RLTYP = "

IMPORTING
E_KEY = "
E_RELATION = "
E_RELATION_EXT = "

EXCEPTIONS
RELATION_NOT_FOUND = 1 WRONG_PARAMETERS = 2
.



IMPORTING Parameters details for BUB_RELATION_GET

I_PARTNER1 - Business Partner 1

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

I_XWA -

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

I_XLM1 -

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

I_XLM2 -

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

I_PARTNER2 - Business Partner 2

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

I_DATE_TO -

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

I_DATE_FROM -

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

I_DATE_FIX - Validity Key Date

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

I_RELTYP - Relationship/Role Def.Category

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

I_XRF -

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

I_DFTVAL - Differentiation Type Characteristic

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

I_RLTYP -

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

EXPORTING Parameters details for BUB_RELATION_GET

E_KEY -

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

E_RELATION -

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

E_RELATION_EXT -

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

EXCEPTIONS details

RELATION_NOT_FOUND -

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

WRONG_PARAMETERS - Wrong parameter

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

Copy and paste ABAP code example for BUB_RELATION_GET 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_key  TYPE BUS05X_KEY, "   
lv_i_partner1  TYPE BUT050-PARTNER1, "   
lv_relation_not_found  TYPE BUT050, "   
lv_i_xwa  TYPE BOOLE-BOOLE, "   SPACE
lv_i_xlm1  TYPE BOOLE-BOOLE, "   SPACE
lv_i_xlm2  TYPE BOOLE-BOOLE, "   SPACE
lv_e_relation  TYPE BUT050, "   
lv_i_partner2  TYPE BUT050-PARTNER2, "   
lv_wrong_parameters  TYPE BUT050, "   
lv_i_date_to  TYPE BUT050-DATE_TO, "   
lv_e_relation_ext  TYPE BUB01_REL_ADMIN_TYPE, "   
lv_i_date_from  TYPE BUT050-DATE_FROM, "   
lv_i_date_fix  TYPE BUS050DFLD-DATE_FIX, "   
lv_i_reltyp  TYPE BUT050-RELTYP, "   
lv_i_xrf  TYPE BUT050-XRF, "   
lv_i_dftval  TYPE BUT050-DFTVAL, "   
lv_i_rltyp  TYPE BUT050-RLTYP. "   

  CALL FUNCTION 'BUB_RELATION_GET'  "
    EXPORTING
         I_PARTNER1 = lv_i_partner1
         I_XWA = lv_i_xwa
         I_XLM1 = lv_i_xlm1
         I_XLM2 = lv_i_xlm2
         I_PARTNER2 = lv_i_partner2
         I_DATE_TO = lv_i_date_to
         I_DATE_FROM = lv_i_date_from
         I_DATE_FIX = lv_i_date_fix
         I_RELTYP = lv_i_reltyp
         I_XRF = lv_i_xrf
         I_DFTVAL = lv_i_dftval
         I_RLTYP = lv_i_rltyp
    IMPORTING
         E_KEY = lv_e_key
         E_RELATION = lv_e_relation
         E_RELATION_EXT = lv_e_relation_ext
    EXCEPTIONS
        RELATION_NOT_FOUND = 1
        WRONG_PARAMETERS = 2
. " BUB_RELATION_GET




ABAP code using 7.40 inline data declarations to call FM BUB_RELATION_GET

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 PARTNER1 FROM BUT050 INTO @DATA(ld_i_partner1).
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xwa).
DATA(ld_i_xwa) = ' '.
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xlm1).
DATA(ld_i_xlm1) = ' '.
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_xlm2).
DATA(ld_i_xlm2) = ' '.
 
 
"SELECT single PARTNER2 FROM BUT050 INTO @DATA(ld_i_partner2).
 
 
"SELECT single DATE_TO FROM BUT050 INTO @DATA(ld_i_date_to).
 
 
"SELECT single DATE_FROM FROM BUT050 INTO @DATA(ld_i_date_from).
 
"SELECT single DATE_FIX FROM BUS050DFLD INTO @DATA(ld_i_date_fix).
 
"SELECT single RELTYP FROM BUT050 INTO @DATA(ld_i_reltyp).
 
"SELECT single XRF FROM BUT050 INTO @DATA(ld_i_xrf).
 
"SELECT single DFTVAL FROM BUT050 INTO @DATA(ld_i_dftval).
 
"SELECT single RLTYP FROM BUT050 INTO @DATA(ld_i_rltyp).
 


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!