SAP MM_ARRANG_READ_PURCHASE_INDEX Function Module for NOTRANSL: Index Belege Preisfindung/Fortschreibung zum Konditionssatz lese
MM_ARRANG_READ_PURCHASE_INDEX is a standard mm arrang read purchase index SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Index Belege Preisfindung/Fortschreibung zum Konditionssatz lese 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 mm arrang read purchase index FM, simply by entering the name MM_ARRANG_READ_PURCHASE_INDEX into the relevant SAP transaction such as SE37 or SE38.
Function Group: WN26
Program Name: SAPLWN26
Main Program: SAPLWN26
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function MM_ARRANG_READ_PURCHASE_INDEX 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 'MM_ARRANG_READ_PURCHASE_INDEX'"NOTRANSL: Index Belege Preisfindung/Fortschreibung zum Konditionssatz lese.
EXPORTING
* ARRANGEMENT = "Rebate arrangement data
* I_FOMISS_ERROR = 'X' "
* CONDITION_NUMBER = "Condition record number (process individual record)
* READ_INDEX = ' ' "Import and edit index
* READ_ONLY_EBOX = ' ' "Fill table TEBOX only
* NO_MAT_LIEF_TEXT = ' ' "Do not read material/vendor short text
* I_CHECK_MAIN_ENTRY = ' ' "
* I_BLTYPN = "
* I_EBELN = "
* I_EBELP = "
TABLES
* SELECT_KNUMH = "Condition records (several condition records processed)
* VARIABLE_KEY = "Variable key for rebate arrangement
* TEKBO = "Index data: purchasing documents/invoice receipts
* INDEX_PURCHASE = "Purchasing documents for condition record plus additional data
* INDEX_PURCHASE_INVOICE = "Purchasing documents/invoice receipts for condition record
* ERROR_MESSAGES4 = "List of error messages per purchasing document
EXCEPTIONS
ARRANGEMENT_NOT_FOUND = 1 NOTHING_TO_DO = 2 PURCHASE_EXIST = 3 VARIABLE_KEY_NOT_FOUND = 4 PARAMETER_ERROR = 5
IMPORTING Parameters details for MM_ARRANG_READ_PURCHASE_INDEX
ARRANGEMENT - Rebate arrangement data
Data type: KONAOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FOMISS_ERROR -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONDITION_NUMBER - Condition record number (process individual record)
Data type: VAKE-KNUMHOptional: Yes
Call by Reference: No ( called with pass by value option)
READ_INDEX - Import and edit index
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
READ_ONLY_EBOX - Fill table TEBOX only
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_MAT_LIEF_TEXT - Do not read material/vendor short text
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CHECK_MAIN_ENTRY -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BLTYPN -
Data type: EKBO-BLTYPNOptional: Yes
Call by Reference: No ( called with pass by value option)
I_EBELN -
Data type: EKBO-EBELNOptional: Yes
Call by Reference: No ( called with pass by value option)
I_EBELP -
Data type: EKBO-EBELPOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MM_ARRANG_READ_PURCHASE_INDEX
SELECT_KNUMH - Condition records (several condition records processed)
Data type: KNUMH_RANOptional: Yes
Call by Reference: No ( called with pass by value option)
VARIABLE_KEY - Variable key for rebate arrangement
Data type: VAKEOptional: Yes
Call by Reference: No ( called with pass by value option)
TEKBO - Index data: purchasing documents/invoice receipts
Data type: EKBOOptional: Yes
Call by Reference: No ( called with pass by value option)
INDEX_PURCHASE - Purchasing documents for condition record plus additional data
Data type: ENACHWEISOptional: Yes
Call by Reference: No ( called with pass by value option)
INDEX_PURCHASE_INVOICE - Purchasing documents/invoice receipts for condition record
Data type: RNACHWEISOptional: Yes
Call by Reference: No ( called with pass by value option)
ERROR_MESSAGES4 - List of error messages per purchasing document
Data type: ARRANGERR4Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ARRANGEMENT_NOT_FOUND - Rebate arrangement does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOTHING_TO_DO - No condition records to be processed/passed on
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PURCHASE_EXIST - Purchasing documents exist for a condition record
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VARIABLE_KEY_NOT_FOUND - Variable key missing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PARAMETER_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MM_ARRANG_READ_PURCHASE_INDEX 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_arrangement | TYPE KONA, " | |||
lt_select_knumh | TYPE STANDARD TABLE OF KNUMH_RAN, " | |||
lv_arrangement_not_found | TYPE KNUMH_RAN, " | |||
lv_i_fomiss_error | TYPE C, " 'X' | |||
lt_variable_key | TYPE STANDARD TABLE OF VAKE, " | |||
lv_nothing_to_do | TYPE VAKE, " | |||
lv_condition_number | TYPE VAKE-KNUMH, " | |||
lt_tekbo | TYPE STANDARD TABLE OF EKBO, " | |||
lv_read_index | TYPE C, " SPACE | |||
lv_purchase_exist | TYPE C, " | |||
lt_index_purchase | TYPE STANDARD TABLE OF ENACHWEIS, " | |||
lv_read_only_ebox | TYPE C, " SPACE | |||
lv_variable_key_not_found | TYPE C, " | |||
lv_parameter_error | TYPE C, " | |||
lv_no_mat_lief_text | TYPE C, " SPACE | |||
lt_index_purchase_invoice | TYPE STANDARD TABLE OF RNACHWEIS, " | |||
lt_error_messages4 | TYPE STANDARD TABLE OF ARRANGERR4, " | |||
lv_i_check_main_entry | TYPE C, " SPACE | |||
lv_i_bltypn | TYPE EKBO-BLTYPN, " | |||
lv_i_ebeln | TYPE EKBO-EBELN, " | |||
lv_i_ebelp | TYPE EKBO-EBELP. " |
  CALL FUNCTION 'MM_ARRANG_READ_PURCHASE_INDEX' "NOTRANSL: Index Belege Preisfindung/Fortschreibung zum Konditionssatz lese |
EXPORTING | ||
ARRANGEMENT | = lv_arrangement | |
I_FOMISS_ERROR | = lv_i_fomiss_error | |
CONDITION_NUMBER | = lv_condition_number | |
READ_INDEX | = lv_read_index | |
READ_ONLY_EBOX | = lv_read_only_ebox | |
NO_MAT_LIEF_TEXT | = lv_no_mat_lief_text | |
I_CHECK_MAIN_ENTRY | = lv_i_check_main_entry | |
I_BLTYPN | = lv_i_bltypn | |
I_EBELN | = lv_i_ebeln | |
I_EBELP | = lv_i_ebelp | |
TABLES | ||
SELECT_KNUMH | = lt_select_knumh | |
VARIABLE_KEY | = lt_variable_key | |
TEKBO | = lt_tekbo | |
INDEX_PURCHASE | = lt_index_purchase | |
INDEX_PURCHASE_INVOICE | = lt_index_purchase_invoice | |
ERROR_MESSAGES4 | = lt_error_messages4 | |
EXCEPTIONS | ||
ARRANGEMENT_NOT_FOUND = 1 | ||
NOTHING_TO_DO = 2 | ||
PURCHASE_EXIST = 3 | ||
VARIABLE_KEY_NOT_FOUND = 4 | ||
PARAMETER_ERROR = 5 | ||
. " MM_ARRANG_READ_PURCHASE_INDEX |
ABAP code using 7.40 inline data declarations to call FM MM_ARRANG_READ_PURCHASE_INDEX
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.DATA(ld_i_fomiss_error) | = 'X'. | |||
"SELECT single KNUMH FROM VAKE INTO @DATA(ld_condition_number). | ||||
DATA(ld_read_index) | = ' '. | |||
DATA(ld_read_only_ebox) | = ' '. | |||
DATA(ld_no_mat_lief_text) | = ' '. | |||
DATA(ld_i_check_main_entry) | = ' '. | |||
"SELECT single BLTYPN FROM EKBO INTO @DATA(ld_i_bltypn). | ||||
"SELECT single EBELN FROM EKBO INTO @DATA(ld_i_ebeln). | ||||
"SELECT single EBELP FROM EKBO INTO @DATA(ld_i_ebelp). | ||||
Search for further information about these or an SAP related objects