SAP OIRC_GET_LOCBT_SOC Function Module for SSR Stocks - Select SOC materials for a business location/business type
OIRC_GET_LOCBT_SOC is a standard oirc get locbt soc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SSR Stocks - Select SOC materials for a business location/business type processing and below is the pattern details for this FM, 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 oirc get locbt soc FM, simply by entering the name OIRC_GET_LOCBT_SOC into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIRC_APP_STOCKS
Program Name: SAPLOIRC_APP_STOCKS
Main Program: SAPLOIRC_APP_STOCKS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIRC_GET_LOCBT_SOC 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 'OIRC_GET_LOCBT_SOC'"SSR Stocks - Select SOC materials for a business location/business type.
EXPORTING
I_PBLNR = "Business location identifier (IS-Oil MRN)
* I_EXCL_VIRT = "
* I_NO_EXCL = "
I_RNBT = "Retail network business type
I_MATHANDGRP = "Material handling group (IS-Oil SSR)
I_DRDATE_FROM = "SSR Fuels - Local date
I_DRTIME_FROM = "SSR Fuels - Local time
* I_DRDATE_TO = "SSR Fuels - Local date
* I_DRTIME_TO = "SSR Fuels - Local time
* I_MATNR = "Material number
* I_TIMEZONE = "SSR Fuels - Service station time zone
TABLES
* T_MATSEL = "SSR - Material selection
* T_MATSEL_RNBT = "SSR - Material selection - B. type
* T_MATSEL_MAT = "SSR - Material selection - Spec. mat.
* T_OIISOCTSS_CONN = "SOC: time dependent assignment SO <-> SO (IS-Oil BDRP)
EXCEPTIONS
NO_MATERIALS_SELECTED = 1 NO_MATHANDGRP_SELECTED = 2
IMPORTING Parameters details for OIRC_GET_LOCBT_SOC
I_PBLNR - Business location identifier (IS-Oil MRN)
Data type: OIRBPBLB-PBLNROptional: No
Call by Reference: Yes
I_EXCL_VIRT -
Data type:Optional: Yes
Call by Reference: Yes
I_NO_EXCL -
Data type:Optional: Yes
Call by Reference: Yes
I_RNBT - Retail network business type
Data type: OIRBPBLB-RNBTOptional: No
Call by Reference: Yes
I_MATHANDGRP - Material handling group (IS-Oil SSR)
Data type: OIRBPBLB-MATHANDGRPOptional: No
Call by Reference: Yes
I_DRDATE_FROM - SSR Fuels - Local date
Data type: ROIRC_DRUPLD-DRDATEOptional: No
Call by Reference: Yes
I_DRTIME_FROM - SSR Fuels - Local time
Data type: ROIRC_DRUPLD-DRTIMEOptional: No
Call by Reference: Yes
I_DRDATE_TO - SSR Fuels - Local date
Data type: ROIRC_DRUPLD-DRDATEOptional: Yes
Call by Reference: Yes
I_DRTIME_TO - SSR Fuels - Local time
Data type: ROIRC_DRUPLD-DRTIMEOptional: Yes
Call by Reference: Yes
I_MATNR - Material number
Data type: MATNROptional: Yes
Call by Reference: Yes
I_TIMEZONE - SSR Fuels - Service station time zone
Data type: ROIRC_DRUPLD-TIME_ZONEOptional: Yes
Call by Reference: Yes
TABLES Parameters details for OIRC_GET_LOCBT_SOC
T_MATSEL - SSR - Material selection
Data type: ROIRB_MATSELOptional: Yes
Call by Reference: Yes
T_MATSEL_RNBT - SSR - Material selection - B. type
Data type: ROIRB_MATSELOptional: Yes
Call by Reference: Yes
T_MATSEL_MAT - SSR - Material selection - Spec. mat.
Data type: ROIRB_MATSELOptional: Yes
Call by Reference: Yes
T_OIISOCTSS_CONN - SOC: time dependent assignment SO <-> SO (IS-Oil BDRP)
Data type: ROIISOCTSSOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_MATERIALS_SELECTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_MATHANDGRP_SELECTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for OIRC_GET_LOCBT_SOC 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_i_pblnr | TYPE OIRBPBLB-PBLNR, " | |||
| lt_t_matsel | TYPE STANDARD TABLE OF ROIRB_MATSEL, " | |||
| lv_no_materials_selected | TYPE ROIRB_MATSEL, " | |||
| lv_i_excl_virt | TYPE ROIRB_MATSEL, " | |||
| lv_i_no_excl | TYPE ROIRB_MATSEL, " | |||
| lv_i_rnbt | TYPE OIRBPBLB-RNBT, " | |||
| lt_t_matsel_rnbt | TYPE STANDARD TABLE OF ROIRB_MATSEL, " | |||
| lv_no_mathandgrp_selected | TYPE ROIRB_MATSEL, " | |||
| lv_i_mathandgrp | TYPE OIRBPBLB-MATHANDGRP, " | |||
| lt_t_matsel_mat | TYPE STANDARD TABLE OF ROIRB_MATSEL, " | |||
| lv_i_drdate_from | TYPE ROIRC_DRUPLD-DRDATE, " | |||
| lt_t_oiisoctss_conn | TYPE STANDARD TABLE OF ROIISOCTSS, " | |||
| lv_i_drtime_from | TYPE ROIRC_DRUPLD-DRTIME, " | |||
| lv_i_drdate_to | TYPE ROIRC_DRUPLD-DRDATE, " | |||
| lv_i_drtime_to | TYPE ROIRC_DRUPLD-DRTIME, " | |||
| lv_i_matnr | TYPE MATNR, " | |||
| lv_i_timezone | TYPE ROIRC_DRUPLD-TIME_ZONE. " |
|   CALL FUNCTION 'OIRC_GET_LOCBT_SOC' "SSR Stocks - Select SOC materials for a business location/business type |
| EXPORTING | ||
| I_PBLNR | = lv_i_pblnr | |
| I_EXCL_VIRT | = lv_i_excl_virt | |
| I_NO_EXCL | = lv_i_no_excl | |
| I_RNBT | = lv_i_rnbt | |
| I_MATHANDGRP | = lv_i_mathandgrp | |
| I_DRDATE_FROM | = lv_i_drdate_from | |
| I_DRTIME_FROM | = lv_i_drtime_from | |
| I_DRDATE_TO | = lv_i_drdate_to | |
| I_DRTIME_TO | = lv_i_drtime_to | |
| I_MATNR | = lv_i_matnr | |
| I_TIMEZONE | = lv_i_timezone | |
| TABLES | ||
| T_MATSEL | = lt_t_matsel | |
| T_MATSEL_RNBT | = lt_t_matsel_rnbt | |
| T_MATSEL_MAT | = lt_t_matsel_mat | |
| T_OIISOCTSS_CONN | = lt_t_oiisoctss_conn | |
| EXCEPTIONS | ||
| NO_MATERIALS_SELECTED = 1 | ||
| NO_MATHANDGRP_SELECTED = 2 | ||
| . " OIRC_GET_LOCBT_SOC | ||
ABAP code using 7.40 inline data declarations to call FM OIRC_GET_LOCBT_SOC
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 PBLNR FROM OIRBPBLB INTO @DATA(ld_i_pblnr). | ||||
| "SELECT single RNBT FROM OIRBPBLB INTO @DATA(ld_i_rnbt). | ||||
| "SELECT single MATHANDGRP FROM OIRBPBLB INTO @DATA(ld_i_mathandgrp). | ||||
| "SELECT single DRDATE FROM ROIRC_DRUPLD INTO @DATA(ld_i_drdate_from). | ||||
| "SELECT single DRTIME FROM ROIRC_DRUPLD INTO @DATA(ld_i_drtime_from). | ||||
| "SELECT single DRDATE FROM ROIRC_DRUPLD INTO @DATA(ld_i_drdate_to). | ||||
| "SELECT single DRTIME FROM ROIRC_DRUPLD INTO @DATA(ld_i_drtime_to). | ||||
| "SELECT single TIME_ZONE FROM ROIRC_DRUPLD INTO @DATA(ld_i_timezone). | ||||
Search for further information about these or an SAP related objects