SAP GET_MAPPING_PH_BMID_FOR_PH_VAR Function Module for AFWBM: Transfer of Mapping fo PH Node <> BMID
GET_MAPPING_PH_BMID_FOR_PH_VAR is a standard get mapping ph bmid for ph var SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for AFWBM: Transfer of Mapping fo PH Node <> BMID 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 get mapping ph bmid for ph var FM, simply by entering the name GET_MAPPING_PH_BMID_FOR_PH_VAR into the relevant SAP transaction such as SE37 or SE38.
Function Group: AFWBM_SERVICES
Program Name: SAPLAFWBM_SERVICES
Main Program: SAPLAFWBM_SERVICES
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GET_MAPPING_PH_BMID_FOR_PH_VAR 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 'GET_MAPPING_PH_BMID_FOR_PH_VAR'"AFWBM: Transfer of Mapping fo PH Node <> BMID.
EXPORTING
* I_ASS_VARIANTE = "Layout
* I_KEYDATE = "Evaluation Date
* I_TAB_TREE_PH = "RM: Portfolio Hierarchy: Tree Table
* I_TAB_TREE_BM = "RM: Portfolio Hierarchy: Tree Table
IMPORTING
E_TAB_PH_BMID = "Assignment of Benchmark Segments to PH Nodes (Table)
E_TAB_PH_BMID_TOP = "Assignment of Benchmark Segments to PH Nodes (TOPDOWN)
E_TAB_TREE_BMTOP = "Top-Down Tree Table for AFWBMPH
EXCEPTIONS
WRONG_PARAM = 1 NO_ASSIGN_FOUND = 2
IMPORTING Parameters details for GET_MAPPING_PH_BMID_FOR_PH_VAR
I_ASS_VARIANTE - Layout
Data type: AFWBM_ASSPH_STROptional: Yes
Call by Reference: Yes
I_KEYDATE - Evaluation Date
Data type: AFW_KEYDATEOptional: Yes
Call by Reference: Yes
I_TAB_TREE_PH - RM: Portfolio Hierarchy: Tree Table
Data type: RMPHTREE_TOptional: Yes
Call by Reference: Yes
I_TAB_TREE_BM - RM: Portfolio Hierarchy: Tree Table
Data type: RMPHTREE_TOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for GET_MAPPING_PH_BMID_FOR_PH_VAR
E_TAB_PH_BMID - Assignment of Benchmark Segments to PH Nodes (Table)
Data type: AFWCH_PH_SEGMENT_TOptional: No
Call by Reference: Yes
E_TAB_PH_BMID_TOP - Assignment of Benchmark Segments to PH Nodes (TOPDOWN)
Data type: AFWCH_PH_SEGMENT_TOptional: No
Call by Reference: Yes
E_TAB_TREE_BMTOP - Top-Down Tree Table for AFWBMPH
Data type: RMPHTREE_TOptional: No
Call by Reference: Yes
EXCEPTIONS details
WRONG_PARAM -
Data type:Optional: No
Call by Reference: Yes
NO_ASSIGN_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for GET_MAPPING_PH_BMID_FOR_PH_VAR 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_wrong_param | TYPE STRING, " | |||
| lv_e_tab_ph_bmid | TYPE AFWCH_PH_SEGMENT_T, " | |||
| lv_i_ass_variante | TYPE AFWBM_ASSPH_STR, " | |||
| lv_i_keydate | TYPE AFW_KEYDATE, " | |||
| lv_no_assign_found | TYPE AFW_KEYDATE, " | |||
| lv_e_tab_ph_bmid_top | TYPE AFWCH_PH_SEGMENT_T, " | |||
| lv_i_tab_tree_ph | TYPE RMPHTREE_T, " | |||
| lv_e_tab_tree_bmtop | TYPE RMPHTREE_T, " | |||
| lv_i_tab_tree_bm | TYPE RMPHTREE_T. " |
|   CALL FUNCTION 'GET_MAPPING_PH_BMID_FOR_PH_VAR' "AFWBM: Transfer of Mapping fo PH Node <> BMID |
| EXPORTING | ||
| I_ASS_VARIANTE | = lv_i_ass_variante | |
| I_KEYDATE | = lv_i_keydate | |
| I_TAB_TREE_PH | = lv_i_tab_tree_ph | |
| I_TAB_TREE_BM | = lv_i_tab_tree_bm | |
| IMPORTING | ||
| E_TAB_PH_BMID | = lv_e_tab_ph_bmid | |
| E_TAB_PH_BMID_TOP | = lv_e_tab_ph_bmid_top | |
| E_TAB_TREE_BMTOP | = lv_e_tab_tree_bmtop | |
| EXCEPTIONS | ||
| WRONG_PARAM = 1 | ||
| NO_ASSIGN_FOUND = 2 | ||
| . " GET_MAPPING_PH_BMID_FOR_PH_VAR | ||
ABAP code using 7.40 inline data declarations to call FM GET_MAPPING_PH_BMID_FOR_PH_VAR
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