SAP OIRE_VALIDATE_MATERIALS Function Module for check if materials are allowed to be sold with card type
OIRE_VALIDATE_MATERIALS is a standard oire validate materials SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for check if materials are allowed to be sold with card 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 oire validate materials FM, simply by entering the name OIRE_VALIDATE_MATERIALS into the relevant SAP transaction such as SE37 or SE38.
Function Group: OIRE_VALIDATION
Program Name: SAPLOIRE_VALIDATION
Main Program: SAPLOIRE_VALIDATION
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OIRE_VALIDATE_MATERIALS 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 'OIRE_VALIDATE_MATERIALS'"check if materials are allowed to be sold with card type.
EXPORTING
I_XDTFLOCH = "SSR PC: Template for generated DTF tables (header)
IMPORTING
E_VALID_FLAG = "material valid = 'X', material not valid = ' '
TABLES
T_XDTFLOCI = "table for OIREUPLPXXXX
EXCEPTIONS
CARD_TYPE_NOT_DEFINED = 1 LOCATION_NOT_DEFINED = 2 COMPANY_CODE_NOT_DEFINED = 3 COMPANY_CODE_CARD_TYPE_NOT_DEF = 4 MATERIAL_NOT_DEFINED = 5
IMPORTING Parameters details for OIRE_VALIDATE_MATERIALS
I_XDTFLOCH - SSR PC: Template for generated DTF tables (header)
Data type: OIREUPLKXXXXOptional: No
Call by Reference: Yes
EXPORTING Parameters details for OIRE_VALIDATE_MATERIALS
E_VALID_FLAG - material valid = 'X', material not valid = ' '
Data type: COptional: No
Call by Reference: Yes
TABLES Parameters details for OIRE_VALIDATE_MATERIALS
T_XDTFLOCI - table for OIREUPLPXXXX
Data type: OIREUPLPXXXX_TABOptional: No
Call by Reference: Yes
EXCEPTIONS details
CARD_TYPE_NOT_DEFINED - CARD_TYPE_NOT_DEFINED
Data type:Optional: No
Call by Reference: Yes
LOCATION_NOT_DEFINED - LOCATION_NOT_DEFINED
Data type:Optional: No
Call by Reference: Yes
COMPANY_CODE_NOT_DEFINED - COMPANY_CODE_NOT_DEFINED
Data type:Optional: No
Call by Reference: Yes
COMPANY_CODE_CARD_TYPE_NOT_DEF - COMPANY_CODE_CARD_TYPE_NOT_DEFINED
Data type:Optional: No
Call by Reference: Yes
MATERIAL_NOT_DEFINED - MATERIAL_NOT_DEFINED
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OIRE_VALIDATE_MATERIALS 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_xdtfloch | TYPE OIREUPLKXXXX, " | |||
| lt_t_xdtfloci | TYPE STANDARD TABLE OF OIREUPLPXXXX_TAB, " | |||
| lv_e_valid_flag | TYPE C, " | |||
| lv_card_type_not_defined | TYPE C, " | |||
| lv_location_not_defined | TYPE C, " | |||
| lv_company_code_not_defined | TYPE C, " | |||
| lv_company_code_card_type_not_def | TYPE C, " | |||
| lv_material_not_defined | TYPE C. " |
|   CALL FUNCTION 'OIRE_VALIDATE_MATERIALS' "check if materials are allowed to be sold with card type |
| EXPORTING | ||
| I_XDTFLOCH | = lv_i_xdtfloch | |
| IMPORTING | ||
| E_VALID_FLAG | = lv_e_valid_flag | |
| TABLES | ||
| T_XDTFLOCI | = lt_t_xdtfloci | |
| EXCEPTIONS | ||
| CARD_TYPE_NOT_DEFINED = 1 | ||
| LOCATION_NOT_DEFINED = 2 | ||
| COMPANY_CODE_NOT_DEFINED = 3 | ||
| COMPANY_CODE_CARD_TYPE_NOT_DEF = 4 | ||
| MATERIAL_NOT_DEFINED = 5 | ||
| . " OIRE_VALIDATE_MATERIALS | ||
ABAP code using 7.40 inline data declarations to call FM OIRE_VALIDATE_MATERIALS
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.Search for further information about these or an SAP related objects