CL_CPE_USAGE - Provides current usage (IPC, ABAP, Test) for FA, FE
General Material Data Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
Functionality
(For internal use only)
For
- Formula Assembly (FA),
- Formula Evaluation (FE) and
- Formula Assembly Procedure Info (FAP)
several implementations exist:
- IPC (Java),
- ABAP and
- Test.
Static method GET of class CL_CPE_USAGE determines the correct implementation for FA, FE and FAP.
Relationships
The different usages are realized by the sub classes
- CL_CPE_USAGE_ABAP,
- CL_CPE_USAGE_IPC and
- CL_CPE_USAGE_TEST.
and each of them is implementing the three interfaces
- IF_CPE_FORMULA_ASSEMBLY,
- IF_CPE_FA_PROCEDURE_INFO and
- IF_CPE_FORMULA_EVALUATION
for FA, FAP and FE respectively.
Example
DATA lo_fa TYPE REF TO if_cpe_formula_assembly.
TRY.
lo_fa = cl_cpe_usage=>get( 'V' ).
lo_fa->assemble_formula( ... ).
CATCH cx_cpe_usage_unknown.
...
CATCH cx_cpe_assembly_terminated.
...
CATCH cx_cpe_rfc_failure.
...
ENDTRY.
Notes
CL_CPE_USAGE returns an instace which implements all three interfaces:
- IF_CPE_FORMULA_ASSEMBLY
- IF_CPE_FA_PROCEDURE_INFO
- IF_CPE_FORMULA_EVALUATION
In a productive system, method CL_CPE_USAGE=>GET returns an instance either of type CL_CPE_USAGE_ABAP or CL_CPE_USAGE_IPC depending on whether the Java API of the IPC should be used or not. MethodIS_JAVA_ACTIVE evaluates which of them is relevant.
For test purposes, however, it is possible that some or all of these three implementations are replacedby a test version. For this reason, class CL_CPE_USAGE is composed of three - possibly different but usually identical - interface references which delegate each interface implementation to the current one:
- MO_FA,
- MO_FAP and
- MO_FE.
The test versions can be activated with the following user parameters:
- CPE_TEST_WITHOUTJAVA
- CPE_TEST_FA_NO_JAVA
- CPE_TEST_FAP_NO_JAVA
- CPE_TEST_FE_NO_JAVA
For each parameter, value X must be used for activation. The first parameter can be used to activatethe test versions for all three interfaces (FA, FAP and FE) while the other ones can be used to activate only some of them. The test implementations for FA, FAP and FE can be found in class CL_CPE_USAGE_TEST.
Further information
General Data in Customer Master CPI1466 during Backup
This documentation is copyright by SAP AG.
Length: 3265 Date: 20120526 Time: 103407 triton ( 95 ms )






