SAP CFM_HIERARCHY_CATALOG_CFM2 Function Module for Risikohierarchie: Hierarchieverzeichnis ins BW übertragen
CFM_HIERARCHY_CATALOG_CFM2 is a standard cfm hierarchy catalog cfm2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Risikohierarchie: Hierarchieverzeichnis ins BW übertragen 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 cfm hierarchy catalog cfm2 FM, simply by entering the name CFM_HIERARCHY_CATALOG_CFM2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: CFM_HIERARCHIES_BIW
Program Name: SAPLCFM_HIERARCHIES_BIW
Main Program: SAPLCFM_HIERARCHIES_BIW
Appliation area: B
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CFM_HIERARCHY_CATALOG_CFM2 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 'CFM_HIERARCHY_CATALOG_CFM2'"Risikohierarchie: Hierarchieverzeichnis ins BW übertragen.
EXPORTING
I_S_HIEBAS = "Angeforderte Basismerkmal/Hierarchieklasse
I_S_HIEFLAG = "Hierarchiesteuerkennzeichen zu Basismerkmalen
* I_S_HIERSEL = "Angeforderte Hierarchien
TABLES
I_T_LANGU = "Angeforderte Sprache
E_T_HIERS = "Liste der Hierarchie-Kopfinformationen
EXCEPTIONS
INVALID_CHABASNM_HCLASS = 1 INVALID_HIERARCHY_FLAG = 2 INVALID_HIERARCHY_SELECT = 3 LANGU_NOT_SUPPORTED = 4 HIERARCHY_NOT_FOUND = 5 APPLICATION_ERROR = 6
IMPORTING Parameters details for CFM_HIERARCHY_CATALOG_CFM2
I_S_HIEBAS - Angeforderte Basismerkmal/Hierarchieklasse
Data type: RSAP_S_HIEBASOptional: No
Call by Reference: No ( called with pass by value option)
I_S_HIEFLAG - Hierarchiesteuerkennzeichen zu Basismerkmalen
Data type: RSAP_S_HIEFLAGOptional: No
Call by Reference: No ( called with pass by value option)
I_S_HIERSEL - Angeforderte Hierarchien
Data type: RSAP_S_HIER_LISTOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CFM_HIERARCHY_CATALOG_CFM2
I_T_LANGU - Angeforderte Sprache
Data type: SBIWA_T_LANGUOptional: No
Call by Reference: No ( called with pass by value option)
E_T_HIERS - Liste der Hierarchie-Kopfinformationen
Data type: RSAP_T_HIERSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_CHABASNM_HCLASS - Unzulässige Zuordnung der Hie.Klasse zu Basism.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_HIERARCHY_FLAG - Unzulässige Hie.Steuerkennzeichen zu Basism.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_HIERARCHY_SELECT - Unzulässige Hierarchieselection
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LANGU_NOT_SUPPORTED - Keine Sprachunterstützung der Hierarchien vorh.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
HIERARCHY_NOT_FOUND - Keine Hierarchien zu Basism. in den APIs gefund.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
APPLICATION_ERROR - Fehler bei der Verarbeitung der Applikation APIs
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CFM_HIERARCHY_CATALOG_CFM2 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: | ||||
| lt_i_t_langu | TYPE STANDARD TABLE OF SBIWA_T_LANGU, " | |||
| lv_i_s_hiebas | TYPE RSAP_S_HIEBAS, " | |||
| lv_invalid_chabasnm_hclass | TYPE RSAP_S_HIEBAS, " | |||
| lt_e_t_hiers | TYPE STANDARD TABLE OF RSAP_T_HIERS, " | |||
| lv_i_s_hieflag | TYPE RSAP_S_HIEFLAG, " | |||
| lv_invalid_hierarchy_flag | TYPE RSAP_S_HIEFLAG, " | |||
| lv_i_s_hiersel | TYPE RSAP_S_HIER_LIST, " | |||
| lv_invalid_hierarchy_select | TYPE RSAP_S_HIER_LIST, " | |||
| lv_langu_not_supported | TYPE RSAP_S_HIER_LIST, " | |||
| lv_hierarchy_not_found | TYPE RSAP_S_HIER_LIST, " | |||
| lv_application_error | TYPE RSAP_S_HIER_LIST. " |
|   CALL FUNCTION 'CFM_HIERARCHY_CATALOG_CFM2' "Risikohierarchie: Hierarchieverzeichnis ins BW übertragen |
| EXPORTING | ||
| I_S_HIEBAS | = lv_i_s_hiebas | |
| I_S_HIEFLAG | = lv_i_s_hieflag | |
| I_S_HIERSEL | = lv_i_s_hiersel | |
| TABLES | ||
| I_T_LANGU | = lt_i_t_langu | |
| E_T_HIERS | = lt_e_t_hiers | |
| EXCEPTIONS | ||
| INVALID_CHABASNM_HCLASS = 1 | ||
| INVALID_HIERARCHY_FLAG = 2 | ||
| INVALID_HIERARCHY_SELECT = 3 | ||
| LANGU_NOT_SUPPORTED = 4 | ||
| HIERARCHY_NOT_FOUND = 5 | ||
| APPLICATION_ERROR = 6 | ||
| . " CFM_HIERARCHY_CATALOG_CFM2 | ||
ABAP code using 7.40 inline data declarations to call FM CFM_HIERARCHY_CATALOG_CFM2
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