SAP Function Modules

B31I_SOURCEDETERMIN_GETSOS SAP Function module







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

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


Pattern for FM B31I_SOURCEDETERMIN_GETSOS - B31I SOURCEDETERMIN GETSOS





CALL FUNCTION 'B31I_SOURCEDETERMIN_GETSOS' "
  EXPORTING
*   i_product_guid =            " comt_product_guid  Interner, eindeutiger Identifikator des Produkts
*   i_ordered_prod =            " crmt_ordered_prod_db  Eingegebener Produktname
*   i_product_src_sys =         " crmt_product_src_sys  Logisches System, aus dem das Produkt stammt
*   material =                  " bapieban-material  Material Number
*   mat_grp =                   " bapieban-mat_grp  Material group
    plant =                     " bapieban-plant  Plant
    deliv_date =                " bapieban-deliv_date  Delivery date
*   quantity =                  " bapieban-quantity  Quantity
*   unit =                      " bapieban-unit  Unit of measure
*   item_cat =                  " bapieban-item_cat  Item category
*   acctasscat =                " bapieban-acctasscat  Account assignment category
*   purch_org =                 " bapieban-purch_org  Purchasing organization
*   fixed_vend =                " bapieban-fixed_vend  Fixed vendor
*   pckg_no =                   " bapieban-pckg_no  Package number
*   unit_iso =                  " bapieban-preq_unit_iso  ISO code for unit of measure
  TABLES
    sources_of_supply =         " bbps_bapisosy  Table of sources found
*   return =                    " bapireturn    Return messages
*   control_record =            " bbp_control_record  Meta BAPI control record
    .  "  B31I_SOURCEDETERMIN_GETSOS

ABAP code example for Function Module B31I_SOURCEDETERMIN_GETSOS





The ABAP code below is a full code listing to execute function module B31I_SOURCEDETERMIN_GETSOS 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_sources_of_supply  TYPE STANDARD TABLE OF BBPS_BAPISOSY,"TABLES PARAM
wa_sources_of_supply  LIKE LINE OF it_sources_of_supply ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN,"TABLES PARAM
wa_return  LIKE LINE OF it_return ,
it_control_record  TYPE STANDARD TABLE OF BBP_CONTROL_RECORD,"TABLES PARAM
wa_control_record  LIKE LINE OF it_control_record .

DATA(ld_i_product_guid) = 'Check type of data required'.
DATA(ld_i_ordered_prod) = 'Check type of data required'.
DATA(ld_i_product_src_sys) = '20210129'.

DATA(ld_material) = some text here

DATA(ld_mat_grp) = some text here

DATA(ld_plant) = some text here

DATA(ld_deliv_date) = 20210129

DATA(ld_quantity) = Check type of data required

DATA(ld_unit) = Check type of data required

DATA(ld_item_cat) = some text here

DATA(ld_acctasscat) = some text here

DATA(ld_purch_org) = some text here

DATA(ld_fixed_vend) = some text here

DATA(ld_pckg_no) = Check type of data required

DATA(ld_unit_iso) = some text here

"populate fields of struture and append to itab
append wa_sources_of_supply to it_sources_of_supply.

"populate fields of struture and append to itab
append wa_return to it_return.

"populate fields of struture and append to itab
append wa_control_record to it_control_record. . CALL FUNCTION 'B31I_SOURCEDETERMIN_GETSOS' EXPORTING * i_product_guid = ld_i_product_guid * i_ordered_prod = ld_i_ordered_prod * i_product_src_sys = ld_i_product_src_sys * material = ld_material * mat_grp = ld_mat_grp plant = ld_plant deliv_date = ld_deliv_date * quantity = ld_quantity * unit = ld_unit * item_cat = ld_item_cat * acctasscat = ld_acctasscat * purch_org = ld_purch_org * fixed_vend = ld_fixed_vend * pckg_no = ld_pckg_no * unit_iso = ld_unit_iso TABLES sources_of_supply = it_sources_of_supply * return = it_return * control_record = it_control_record . " B31I_SOURCEDETERMIN_GETSOS
IF SY-SUBRC EQ 0. "All OK 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_product_guid  TYPE COMT_PRODUCT_GUID ,
it_sources_of_supply  TYPE STANDARD TABLE OF BBPS_BAPISOSY ,
wa_sources_of_supply  LIKE LINE OF it_sources_of_supply,
ld_i_ordered_prod  TYPE CRMT_ORDERED_PROD_DB ,
it_return  TYPE STANDARD TABLE OF BAPIRETURN ,
wa_return  LIKE LINE OF it_return,
ld_i_product_src_sys  TYPE CRMT_PRODUCT_SRC_SYS ,
it_control_record  TYPE STANDARD TABLE OF BBP_CONTROL_RECORD ,
wa_control_record  LIKE LINE OF it_control_record,
ld_material  TYPE BAPIEBAN-MATERIAL ,
ld_mat_grp  TYPE BAPIEBAN-MAT_GRP ,
ld_plant  TYPE BAPIEBAN-PLANT ,
ld_deliv_date  TYPE BAPIEBAN-DELIV_DATE ,
ld_quantity  TYPE BAPIEBAN-QUANTITY ,
ld_unit  TYPE BAPIEBAN-UNIT ,
ld_item_cat  TYPE BAPIEBAN-ITEM_CAT ,
ld_acctasscat  TYPE BAPIEBAN-ACCTASSCAT ,
ld_purch_org  TYPE BAPIEBAN-PURCH_ORG ,
ld_fixed_vend  TYPE BAPIEBAN-FIXED_VEND ,
ld_pckg_no  TYPE BAPIEBAN-PCKG_NO ,
ld_unit_iso  TYPE BAPIEBAN-PREQ_UNIT_ISO .

ld_i_product_guid = 'some text here'.

"populate fields of struture and append to itab
append wa_sources_of_supply to it_sources_of_supply.
ld_i_ordered_prod = 'some text here'.

"populate fields of struture and append to itab
append wa_return to it_return.
ld_i_product_src_sys = '20210129'.

"populate fields of struture and append to itab
append wa_control_record to it_control_record.

ld_material = some text here

ld_mat_grp = some text here

ld_plant = some text here

ld_deliv_date = 20210129

ld_quantity = Check type of data required

ld_unit = Check type of data required

ld_item_cat = some text here

ld_acctasscat = some text here

ld_purch_org = some text here

ld_fixed_vend = some text here

ld_pckg_no = Check type of data required

ld_unit_iso = some text here

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