SAP OIRC_MM_TARGET_QTY_CONVERSION Function Module for Oil quantity conversion for SSR material document creation
OIRC_MM_TARGET_QTY_CONVERSION is a standard oirc mm target qty conversion SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Oil quantity conversion for SSR material document creation 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 mm target qty conversion FM, simply by entering the name OIRC_MM_TARGET_QTY_CONVERSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIRC_APP04
Program Name: SAPLOIRC_APP04
Main Program: SAPLOIRC_APP04
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIRC_MM_TARGET_QTY_CONVERSION 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_MM_TARGET_QTY_CONVERSION'"Oil quantity conversion for SSR material document creation.
EXPORTING
PI_PBLNR = "Business location identifier (IS-Oil MRN)
* PI_WKSTA = 1 "
* PI_CMODE = '1' "Conversion Mode
PI_RNBT = "Business type
PI_MATNR = "Material Number
PI_WERKS = "Plant
* PI_LGORT = "Storage Location
PI_VOL_UOM = "Base Unit of Measure
PI_TARGET_QUANTITY = "Quantity
PI_DATE = "Date
PI_TIME = "Time
IMPORTING
PE_OIB_A04 = "HPM: Import/Export for Quantity Conversion (OIB1, OIB_QCI)
TABLES
T_OIB_A05 = "HPM: Import/Export for Quantity Conversion (OIB_QCI, OIB1)
EXCEPTIONS
MATERIAL_NOT_EXISTENT = 1 GET_PROFILE_ERROR = 2 QCI_QUANTITY_CONTROL_ERROR = 3
IMPORTING Parameters details for OIRC_MM_TARGET_QTY_CONVERSION
PI_PBLNR - Business location identifier (IS-Oil MRN)
Data type: OIFSPBL-PBLNROptional: No
Call by Reference: Yes
PI_WKSTA -
Data type: IDefault: 1
Optional: No
Call by Reference: Yes
PI_CMODE - Conversion Mode
Data type: MSEGO1-CMODEDefault: '1'
Optional: No
Call by Reference: Yes
PI_RNBT - Business type
Data type: OIRARNBT-RNBTOptional: No
Call by Reference: Yes
PI_MATNR - Material Number
Data type: MATNROptional: No
Call by Reference: Yes
PI_WERKS - Plant
Data type: WERKS_DOptional: No
Call by Reference: Yes
PI_LGORT - Storage Location
Data type: LGORT_DOptional: Yes
Call by Reference: Yes
PI_VOL_UOM - Base Unit of Measure
Data type: MEINSOptional: No
Call by Reference: Yes
PI_TARGET_QUANTITY - Quantity
Data type: MENGE_DOptional: No
Call by Reference: Yes
PI_DATE - Date
Data type: DATUMOptional: No
Call by Reference: Yes
PI_TIME - Time
Data type: UZEITOptional: No
Call by Reference: Yes
EXPORTING Parameters details for OIRC_MM_TARGET_QTY_CONVERSION
PE_OIB_A04 - HPM: Import/Export for Quantity Conversion (OIB1, OIB_QCI)
Data type: OIB_A04Optional: No
Call by Reference: Yes
TABLES Parameters details for OIRC_MM_TARGET_QTY_CONVERSION
T_OIB_A05 - HPM: Import/Export for Quantity Conversion (OIB_QCI, OIB1)
Data type: OIB_A05Optional: No
Call by Reference: Yes
EXCEPTIONS details
MATERIAL_NOT_EXISTENT - material does not exist (table mara)
Data type:Optional: No
Call by Reference: Yes
GET_PROFILE_ERROR - processing profile read error
Data type:Optional: No
Call by Reference: Yes
QCI_QUANTITY_CONTROL_ERROR - quantity conversion error
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OIRC_MM_TARGET_QTY_CONVERSION 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_pi_pblnr | TYPE OIFSPBL-PBLNR, " | |||
| lt_t_oib_a05 | TYPE STANDARD TABLE OF OIB_A05, " | |||
| lv_pe_oib_a04 | TYPE OIB_A04, " | |||
| lv_material_not_existent | TYPE OIB_A04, " | |||
| lv_pi_wksta | TYPE I, " 1 | |||
| lv_pi_cmode | TYPE MSEGO1-CMODE, " '1' | |||
| lv_pi_rnbt | TYPE OIRARNBT-RNBT, " | |||
| lv_get_profile_error | TYPE OIRARNBT, " | |||
| lv_pi_matnr | TYPE MATNR, " | |||
| lv_qci_quantity_control_error | TYPE MATNR, " | |||
| lv_pi_werks | TYPE WERKS_D, " | |||
| lv_pi_lgort | TYPE LGORT_D, " | |||
| lv_pi_vol_uom | TYPE MEINS, " | |||
| lv_pi_target_quantity | TYPE MENGE_D, " | |||
| lv_pi_date | TYPE DATUM, " | |||
| lv_pi_time | TYPE UZEIT. " |
|   CALL FUNCTION 'OIRC_MM_TARGET_QTY_CONVERSION' "Oil quantity conversion for SSR material document creation |
| EXPORTING | ||
| PI_PBLNR | = lv_pi_pblnr | |
| PI_WKSTA | = lv_pi_wksta | |
| PI_CMODE | = lv_pi_cmode | |
| PI_RNBT | = lv_pi_rnbt | |
| PI_MATNR | = lv_pi_matnr | |
| PI_WERKS | = lv_pi_werks | |
| PI_LGORT | = lv_pi_lgort | |
| PI_VOL_UOM | = lv_pi_vol_uom | |
| PI_TARGET_QUANTITY | = lv_pi_target_quantity | |
| PI_DATE | = lv_pi_date | |
| PI_TIME | = lv_pi_time | |
| IMPORTING | ||
| PE_OIB_A04 | = lv_pe_oib_a04 | |
| TABLES | ||
| T_OIB_A05 | = lt_t_oib_a05 | |
| EXCEPTIONS | ||
| MATERIAL_NOT_EXISTENT = 1 | ||
| GET_PROFILE_ERROR = 2 | ||
| QCI_QUANTITY_CONTROL_ERROR = 3 | ||
| . " OIRC_MM_TARGET_QTY_CONVERSION | ||
ABAP code using 7.40 inline data declarations to call FM OIRC_MM_TARGET_QTY_CONVERSION
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 OIFSPBL INTO @DATA(ld_pi_pblnr). | ||||
| DATA(ld_pi_wksta) | = 1. | |||
| "SELECT single CMODE FROM MSEGO1 INTO @DATA(ld_pi_cmode). | ||||
| DATA(ld_pi_cmode) | = '1'. | |||
| "SELECT single RNBT FROM OIRARNBT INTO @DATA(ld_pi_rnbt). | ||||
Search for further information about these or an SAP related objects