Hierarchy
⤷ MM-PUR-FIP (Application Component) Perishables Procurement
⤷ FIP_DDIC (Package) DDIC package for Fresh Item Procurement
IMG Activity
ID | W_FIP_025 | BAdI: Access Material |
Transaction Code | S_E4A_94000205 | (empty) |
Created on | 20080611 | |
Customizing Attributes | W_FIP_025 | BAdI: For Accessing BO Material |
Customizing Activity | W_FIP_025 | BAdI: For Accessing BO Material |
Document
Document Class | SIMG | Hypertext: Object Class - Class to which a document belongs. |
Document Name | FIP_BADI_MATERIAL_BAL |
Use
This technical Business Add-In (BAdI) is part of a business abstraction layer used internally by SAP. It is not intended for reuse by customers. This technology enables individual functionality or complete applications to be called either by back-end functions or enterprise services. It is used to read material information using some selection criteria.
This BAdI uses the following methods:
- READ_BY_ELEMENTS
Returns a list of materials with its details from ERP DB tables using the parameters of the method as the search criteria. The partial result of selection by each criterion is merged into the final results. In the
IT_SUPPLY_PLANT_ID
parameter, the value of theWERKS
component should match at least one value of theWERKS
component in theIT_WERKS_EKORG
parameter.The parameters are optional; they allow you to make your search flexible.
- FIND_BY_ELEMENTS
Find materials that fit various criteria, such as:
- Material category
- Material type
- Vendor account
- Plant
- Material group
- Material number
- Material description
- International article number
The input parameters are range table types. As a result, many values can be passed along with different conditions such as equals, between, and so on.
When implementation of this BAdI is enabled, the application can retrieve the data from the back-end.
Requirements
Standard settings
As for all BAdIs in the ES_FIP_BAL
enhancement spot, a developer should never use the GET_BADI
call to create an instance of this BAdI. Rather, the developer should first get an instance of the CL_FIP_BAL_FACTORY
class and then use its GET_BADI method to instantiate the needed BAdI.
Example - Instantiation of the FIP_BADI_MATERIAL_BAL
BAdI
DATA:
lo_bal_factory TYPE REF TO cl_fip_bal_factory,
lo_badi_material TYPE REF TO fip_badi_material_bal.
" Get instance of the BAL factory
cl_fip_bal_factory=>get_instance(
IMPORTING eo_factory = lo_bal_factory ).
" Instantiate the FIP_BADI_MATERIAL_BAL BAdI
lo_badi_material ?= lo_bal_factory->get_badi(
cl_fip_const=>co_material_bal ).
This BAdI was designed to run only one BAdI implementation. It uses a filter named ACCESS_TYPE
to determine which implementation is to be executed. Each implementation must have a different filter. In the GET_BADI
call to the BAL factory, the value of ACCESS_TYPE
is automatically determined and set.
All possible values of ACCESS_TYPE
:
- 0BA
Implementation using BAPIs and/or direct database access
- 0ES
Implementation using enterprise services, which allows access to different back-ends in case used functionalities are available in different systems.
- Cnn (where nn is a one-digit or two-digit number)
Customer implementation
The BAL factory class determines the value of the ACCESS_TYPE
filter by going through the following process:
- Get the value from the
FIP_C_BAL_BADI
client-specific customizing table. - If a value was not yet obtained, get the value from the
FIP_C_BAL_CONF
client-specific customizing table. - If a value was not yet obtained, the default value as determined by the BAL factory will be used. In ERP 6.0 EHP4, this value is 0BA.
As of ERP 6.0 EHP4, 0BA and 0ES implementations exist for each BAdI that belongs to the ES_FIP_BAL
enhancement spot.
Activities
For information about implementing BAdIs as part of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.
Example
You want to retrieve all materials for a combination of supplier (lt_supplier_id)
, supply plants (lt_supply_plant_id)
and purchasing data ( lt_werks_ekorg)
. Additionally, you want to limit the results to specific materials (lt_material_id)
.
CALL BADI lo_badi_material->if_fip_manage_material~read_by_elements
EXPORTING
it_material_id = lt_material_id
it_supplier_id = lt_supplier_id
it_supply_plant_id = lt_supply_plant_id
it_werks_ekorg = lt_werks_ekorg
iv_query_hits_maximum_number = lv_query_hits_maximum_number
IMPORTING
ev_returned_query_hits_number = lv_returned_query_hits_number
ev_more_elements_available = lv_more_elements_available
et_materials = lt_materials
CHANGING
co_logger = lo_logger.
Business Attributes
ASAP Roadmap ID | 153 | Design enhancements |
Mandatory / Optional | 2 | Optional activity |
Critical / Non-Critical | 2 | Non-critical |
Country-Dependency | A | Valid for all countries |
Maintenance Objects
Maintenance object type | E | Business Add-In - Definition |
History
Last changed by/on | SAP | 20080703 |
SAP Release Created in | 604 |