SAP FSBP_READ_RELATION Function Module for
FSBP_READ_RELATION is a standard fsbp read relation 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 fsbp read relation FM, simply by entering the name FSBP_READ_RELATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: FSBP_READ
Program Name: SAPLFSBP_READ
Main Program: SAPLFSBP_READ
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function FSBP_READ_RELATION 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 'FSBP_READ_RELATION'".
EXPORTING
* I_PARTNER1 = "Business Partner Number
* I_DATE = "Start of validity of BP-BP relationship
* I_PARTNER2 = "Business Partner Number
TABLES
* T_BUT050 = "BP relationships/role definitions: General data
* T_BUT051 = "BP Relationship: Contact Person Relationship
* T_BUT053 = "BP Relationship: Company Interest
* R_RELTYP = "CBP: Relationship cat. structure (RANGE)
EXCEPTIONS
NO_REL_FOUND = 1 NO_DATA = 2
IMPORTING Parameters details for FSBP_READ_RELATION
I_PARTNER1 - Business Partner Number
Data type: BUT000-PARTNEROptional: Yes
Call by Reference: No ( called with pass by value option)
I_DATE - Start of validity of BP-BP relationship
Data type: SY-DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PARTNER2 - Business Partner Number
Data type: BUT000-PARTNEROptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for FSBP_READ_RELATION
T_BUT050 - BP relationships/role definitions: General data
Data type: BUT050Optional: Yes
Call by Reference: Yes
T_BUT051 - BP Relationship: Contact Person Relationship
Data type: BUT051Optional: Yes
Call by Reference: Yes
T_BUT053 - BP Relationship: Company Interest
Data type: BUT053Optional: Yes
Call by Reference: Yes
R_RELTYP - CBP: Relationship cat. structure (RANGE)
Data type: BUS050_BTROptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_REL_FOUND -
Data type:Optional: No
Call by Reference: Yes
NO_DATA -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for FSBP_READ_RELATION 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_t_but050 | TYPE STANDARD TABLE OF BUT050, " | |||
lv_i_partner1 | TYPE BUT000-PARTNER, " | |||
lv_no_rel_found | TYPE BUT000, " | |||
lv_i_date | TYPE SY-DATUM, " | |||
lv_no_data | TYPE SY, " | |||
lt_t_but051 | TYPE STANDARD TABLE OF BUT051, " | |||
lt_t_but053 | TYPE STANDARD TABLE OF BUT053, " | |||
lv_i_partner2 | TYPE BUT000-PARTNER, " | |||
lt_r_reltyp | TYPE STANDARD TABLE OF BUS050_BTR. " |
  CALL FUNCTION 'FSBP_READ_RELATION' " |
EXPORTING | ||
I_PARTNER1 | = lv_i_partner1 | |
I_DATE | = lv_i_date | |
I_PARTNER2 | = lv_i_partner2 | |
TABLES | ||
T_BUT050 | = lt_t_but050 | |
T_BUT051 | = lt_t_but051 | |
T_BUT053 | = lt_t_but053 | |
R_RELTYP | = lt_r_reltyp | |
EXCEPTIONS | ||
NO_REL_FOUND = 1 | ||
NO_DATA = 2 | ||
. " FSBP_READ_RELATION |
ABAP code using 7.40 inline data declarations to call FM FSBP_READ_RELATION
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 PARTNER FROM BUT000 INTO @DATA(ld_i_partner1). | ||||
"SELECT single DATUM FROM SY INTO @DATA(ld_i_date). | ||||
"SELECT single PARTNER FROM BUT000 INTO @DATA(ld_i_partner2). | ||||
Search for further information about these or an SAP related objects