SAP MM_ARRANG_INVOICE_ADD Function Module for NOTRANSL: Lieferanten- oder Kundenfakturen einer Abrechnung verbuchen
MM_ARRANG_INVOICE_ADD is a standard mm arrang invoice add 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: Lieferanten- oder Kundenfakturen einer Abrechnung verbuchen 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 invoice add FM, simply by entering the name MM_ARRANG_INVOICE_ADD into the relevant SAP transaction such as SE37 or SE38.
Function Group: WN01
Program Name: SAPLWN01
Main Program: SAPLWN01
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MM_ARRANG_INVOICE_ADD 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_INVOICE_ADD'"NOTRANSL: Lieferanten- oder Kundenfakturen einer Abrechnung verbuchen.
EXPORTING
I_ARRANGEMENT = "Rebate Arrangement
* I_DB_UPDATE = 'X' "
* I_T6B1 = "Arrang. Type
* I_PRINT_OUTPUT = 'X' "
IMPORTING
E_ARRANGEMENT = "Rebate Arrangement
TABLES
T_VARIABLE_KEY = "Variable key
T_EBOX = "
T_KOPA = "Arrangement Partner
T_CONDITION_RECORD = "
* T_CONDITION_RECORD_UPDATE = "
T_SETTLEMENT_VALUES = "
T_SETTLEMENT_VALUES_MWSKZ = "
T_SETTLEMENT_VALUES_WERKS = "
T_EVALUATION_DATA = "
* T_ERROR_MESSAGES = "List of Error Messages
* T_YKONP = "
EXCEPTIONS
INVALID_ARRANG_TYPE = 1 VARIABLE_KEY_NOT_FOUND = 10 NO_SETTLEMENT_DATA = 2 INVALID_SETTLEMENT_DATA = 3 ERROR_DURING_INVOICE_ADD = 4 NO_ABRECHLAUF_NUMBER = 5 INT_ERROR_STATUS_UPDATE = 6 ERR_MSG_DURING_MESSAGING = 7 ERROR_DURING_SETTLEMENT = 8 CONDITION_RECORD_NOT_FOUND = 9
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLWN01_001 Business Volume Data (Scale/Condition Basis) Before Calculation of Income
EXIT_SAPLWN01_002 Calculation of the Income of a Condition Record
EXIT_SAPLWN01_003 Change Settlement Data Before Creation of Settlement Doc.
IMPORTING Parameters details for MM_ARRANG_INVOICE_ADD
I_ARRANGEMENT - Rebate Arrangement
Data type: KONAOptional: No
Call by Reference: No ( called with pass by value option)
I_DB_UPDATE -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_T6B1 - Arrang. Type
Data type: T6B1Optional: Yes
Call by Reference: No ( called with pass by value option)
I_PRINT_OUTPUT -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MM_ARRANG_INVOICE_ADD
E_ARRANGEMENT - Rebate Arrangement
Data type: KONAOptional: No
Call by Reference: Yes
TABLES Parameters details for MM_ARRANG_INVOICE_ADD
T_VARIABLE_KEY - Variable key
Data type: VAKEOptional: No
Call by Reference: Yes
T_EBOX -
Data type: EBOXOptional: No
Call by Reference: No ( called with pass by value option)
T_KOPA - Arrangement Partner
Data type: KOPAOptional: No
Call by Reference: No ( called with pass by value option)
T_CONDITION_RECORD -
Data type: KONPOptional: No
Call by Reference: No ( called with pass by value option)
T_CONDITION_RECORD_UPDATE -
Data type: KONPDBOptional: Yes
Call by Reference: No ( called with pass by value option)
T_SETTLEMENT_VALUES -
Data type: ARRANG_VALOptional: No
Call by Reference: No ( called with pass by value option)
T_SETTLEMENT_VALUES_MWSKZ -
Data type: ARRANGVALWOptional: No
Call by Reference: No ( called with pass by value option)
T_SETTLEMENT_VALUES_WERKS -
Data type: ARRANGVALWOptional: No
Call by Reference: No ( called with pass by value option)
T_EVALUATION_DATA -
Data type: GRADDATAOptional: No
Call by Reference: No ( called with pass by value option)
T_ERROR_MESSAGES - List of Error Messages
Data type: ARRANG_ERROptional: Yes
Call by Reference: No ( called with pass by value option)
T_YKONP -
Data type: KONPDBOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_ARRANG_TYPE -
Data type:Optional: No
Call by Reference: Yes
VARIABLE_KEY_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
NO_SETTLEMENT_DATA -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_SETTLEMENT_DATA -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_DURING_INVOICE_ADD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ABRECHLAUF_NUMBER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INT_ERROR_STATUS_UPDATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERR_MSG_DURING_MESSAGING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_DURING_SETTLEMENT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CONDITION_RECORD_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MM_ARRANG_INVOICE_ADD 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_e_arrangement | TYPE KONA, " | |||
| lv_i_arrangement | TYPE KONA, " | |||
| lt_t_variable_key | TYPE STANDARD TABLE OF VAKE, " | |||
| lv_invalid_arrang_type | TYPE VAKE, " | |||
| lt_t_ebox | TYPE STANDARD TABLE OF EBOX, " | |||
| lv_variable_key_not_found | TYPE EBOX, " | |||
| lt_t_kopa | TYPE STANDARD TABLE OF KOPA, " | |||
| lv_i_db_update | TYPE C, " 'X' | |||
| lv_no_settlement_data | TYPE C, " | |||
| lt_t_condition_record | TYPE STANDARD TABLE OF KONP, " | |||
| lv_i_t6b1 | TYPE T6B1, " | |||
| lv_invalid_settlement_data | TYPE T6B1, " | |||
| lt_t_condition_record_update | TYPE STANDARD TABLE OF KONPDB, " | |||
| lv_i_print_output | TYPE C, " 'X' | |||
| lt_t_settlement_values | TYPE STANDARD TABLE OF ARRANG_VAL, " | |||
| lv_error_during_invoice_add | TYPE ARRANG_VAL, " | |||
| lv_no_abrechlauf_number | TYPE ARRANG_VAL, " | |||
| lt_t_settlement_values_mwskz | TYPE STANDARD TABLE OF ARRANGVALW, " | |||
| lv_int_error_status_update | TYPE ARRANGVALW, " | |||
| lt_t_settlement_values_werks | TYPE STANDARD TABLE OF ARRANGVALW, " | |||
| lt_t_evaluation_data | TYPE STANDARD TABLE OF GRADDATA, " | |||
| lv_err_msg_during_messaging | TYPE GRADDATA, " | |||
| lt_t_error_messages | TYPE STANDARD TABLE OF ARRANG_ERR, " | |||
| lv_error_during_settlement | TYPE ARRANG_ERR, " | |||
| lt_t_ykonp | TYPE STANDARD TABLE OF KONPDB, " | |||
| lv_condition_record_not_found | TYPE KONPDB. " |
|   CALL FUNCTION 'MM_ARRANG_INVOICE_ADD' "NOTRANSL: Lieferanten- oder Kundenfakturen einer Abrechnung verbuchen |
| EXPORTING | ||
| I_ARRANGEMENT | = lv_i_arrangement | |
| I_DB_UPDATE | = lv_i_db_update | |
| I_T6B1 | = lv_i_t6b1 | |
| I_PRINT_OUTPUT | = lv_i_print_output | |
| IMPORTING | ||
| E_ARRANGEMENT | = lv_e_arrangement | |
| TABLES | ||
| T_VARIABLE_KEY | = lt_t_variable_key | |
| T_EBOX | = lt_t_ebox | |
| T_KOPA | = lt_t_kopa | |
| T_CONDITION_RECORD | = lt_t_condition_record | |
| T_CONDITION_RECORD_UPDATE | = lt_t_condition_record_update | |
| T_SETTLEMENT_VALUES | = lt_t_settlement_values | |
| T_SETTLEMENT_VALUES_MWSKZ | = lt_t_settlement_values_mwskz | |
| T_SETTLEMENT_VALUES_WERKS | = lt_t_settlement_values_werks | |
| T_EVALUATION_DATA | = lt_t_evaluation_data | |
| T_ERROR_MESSAGES | = lt_t_error_messages | |
| T_YKONP | = lt_t_ykonp | |
| EXCEPTIONS | ||
| INVALID_ARRANG_TYPE = 1 | ||
| VARIABLE_KEY_NOT_FOUND = 10 | ||
| NO_SETTLEMENT_DATA = 2 | ||
| INVALID_SETTLEMENT_DATA = 3 | ||
| ERROR_DURING_INVOICE_ADD = 4 | ||
| NO_ABRECHLAUF_NUMBER = 5 | ||
| INT_ERROR_STATUS_UPDATE = 6 | ||
| ERR_MSG_DURING_MESSAGING = 7 | ||
| ERROR_DURING_SETTLEMENT = 8 | ||
| CONDITION_RECORD_NOT_FOUND = 9 | ||
| . " MM_ARRANG_INVOICE_ADD | ||
ABAP code using 7.40 inline data declarations to call FM MM_ARRANG_INVOICE_ADD
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_db_update) | = 'X'. | |||
| DATA(ld_i_print_output) | = 'X'. | |||
Search for further information about these or an SAP related objects