SAP Function Modules

FSBP_08_READ_BP1012 SAP Function module







FSBP_08_READ_BP1012 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 FSBP_08_READ_BP1012 into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM FSBP_08_READ_BP1012 - FSBP 08 READ BP1012





CALL FUNCTION 'FSBP_08_READ_BP1012' "
  EXPORTING
    i_partner =                 " bp1012-partner  Business Partner Number
*   i_grade_method =            " bp1012-grade_method
*   i_criter =                  " bp_criter     BP: Differentiation Type Criterion
*   i_date =                    " bp1012-date_from  Date
*   i_read_from_db = SPACE      " boole-boole   Reading Database
*   i_xmemory = SPACE           " boole-boole
*   i_xwa = SPACE               " boole-boole
*   i_default = SPACE           " bp_default
*   i_valdt =                   " sy-datlo
* TABLES
*   t_bp1012 =                  " bp1012        Business Partner: Ratings
  EXCEPTIONS
    WRONG_PARAMETERS = 1        "               Wrong parameters
    NOT_FOUND = 2               "
    .  "  FSBP_08_READ_BP1012

ABAP code example for Function Module FSBP_08_READ_BP1012





The ABAP code below is a full code listing to execute function module FSBP_08_READ_BP1012 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_bp1012  TYPE STANDARD TABLE OF BP1012,"TABLES PARAM
wa_t_bp1012  LIKE LINE OF it_t_bp1012 .


SELECT single PARTNER
FROM BP1012
INTO @DATA(ld_i_partner).


SELECT single GRADE_METHOD
FROM BP1012
INTO @DATA(ld_i_grade_method).

DATA(ld_i_criter) = 'Check type of data required'.

SELECT single DATE_FROM
FROM BP1012
INTO @DATA(ld_i_date).


DATA(ld_i_read_from_db) = some text here

DATA(ld_i_xmemory) = some text here

DATA(ld_i_xwa) = some text here
DATA(ld_i_default) = 'Check type of data required'.
DATA(ld_i_valdt) = '20210129'.

"populate fields of struture and append to itab
append wa_t_bp1012 to it_t_bp1012. . CALL FUNCTION 'FSBP_08_READ_BP1012' EXPORTING i_partner = ld_i_partner * i_grade_method = ld_i_grade_method * i_criter = ld_i_criter * i_date = ld_i_date * i_read_from_db = ld_i_read_from_db * i_xmemory = ld_i_xmemory * i_xwa = ld_i_xwa * i_default = ld_i_default * i_valdt = ld_i_valdt * TABLES * t_bp1012 = it_t_bp1012 EXCEPTIONS WRONG_PARAMETERS = 1 NOT_FOUND = 2 . " FSBP_08_READ_BP1012
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_i_partner  TYPE BP1012-PARTNER ,
it_t_bp1012  TYPE STANDARD TABLE OF BP1012 ,
wa_t_bp1012  LIKE LINE OF it_t_bp1012,
ld_i_grade_method  TYPE BP1012-GRADE_METHOD ,
ld_i_criter  TYPE BP_CRITER ,
ld_i_date  TYPE BP1012-DATE_FROM ,
ld_i_read_from_db  TYPE BOOLE-BOOLE ,
ld_i_xmemory  TYPE BOOLE-BOOLE ,
ld_i_xwa  TYPE BOOLE-BOOLE ,
ld_i_default  TYPE BP_DEFAULT ,
ld_i_valdt  TYPE SY-DATLO .


SELECT single PARTNER
FROM BP1012
INTO ld_i_partner.


"populate fields of struture and append to itab
append wa_t_bp1012 to it_t_bp1012.

SELECT single GRADE_METHOD
FROM BP1012
INTO ld_i_grade_method.

ld_i_criter = '20210129'.

SELECT single DATE_FROM
FROM BP1012
INTO ld_i_date.


ld_i_read_from_db = some text here

ld_i_xmemory = some text here

ld_i_xwa = some text here
ld_i_default = '20210129'.
ld_i_valdt = '20210129'.

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 FSBP_08_READ_BP1012 or its description.