SAP MR_ARRANGEMENT_INVOICE_CREATE Function Module for NOTRANSL: Vorbereiten zur Erstellung von Rechnungen aus der 'nachträgl. Ab









MR_ARRANGEMENT_INVOICE_CREATE is a standard mr arrangement invoice create 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: Vorbereiten zur Erstellung von Rechnungen aus der 'nachträgl. Ab 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 mr arrangement invoice create FM, simply by entering the name MR_ARRANGEMENT_INVOICE_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: MRST
Program Name: SAPLMRST
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MR_ARRANGEMENT_INVOICE_CREATE 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 'MR_ARRANGEMENT_INVOICE_CREATE'"NOTRANSL: Vorbereiten zur Erstellung von Rechnungen aus der 'nachträgl. Ab
EXPORTING
I_BUDAT = "Posting date
I_BUKRS = "Company code
I_LIFNR = "Vendor
I_WAERS = "Currency key: foreign currency
I_WWERT = "Conversion date foreign currency -> local currency
I_ZLSCH = "Payment method
* I_ONLY_PREPOST_DOCUMENT = ' ' "

TABLES
T_ARRANG_ERR = "Error table
T_ARRANG_TAX = "Tax table
T_ARRANG_VAL = "Value table
T_EK08ARRANG = "Invoice items for all invoices

EXCEPTIONS
BUKRS_NOT_FOUND = 1 CREDITOR_ERROR = 2 FATAL_ERROR = 3 PERIOD_ERROR = 4 RATE_NOT_FOUND = 5 TABLE_EMPTY = 6 DOCUMENT_TYPE_NOT_FOUND = 7 ACCOUNT_ASSIGNMENT_ERROR = 8 ERROR_JURISDICTION_CODE = 9
.



IMPORTING Parameters details for MR_ARRANGEMENT_INVOICE_CREATE

I_BUDAT - Posting date

Data type: BKPF-BUDAT
Optional: No
Call by Reference: No ( called with pass by value option)

I_BUKRS - Company code

Data type: BKPF-BUKRS
Optional: No
Call by Reference: No ( called with pass by value option)

I_LIFNR - Vendor

Data type: LFA1-LIFNR
Optional: No
Call by Reference: No ( called with pass by value option)

I_WAERS - Currency key: foreign currency

Data type: BKPF-WAERS
Optional: No
Call by Reference: No ( called with pass by value option)

I_WWERT - Conversion date foreign currency -> local currency

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

I_ZLSCH - Payment method

Data type: KONA-ZLSCH
Optional: No
Call by Reference: No ( called with pass by value option)

I_ONLY_PREPOST_DOCUMENT -

Data type: RWM01-VORER
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MR_ARRANGEMENT_INVOICE_CREATE

T_ARRANG_ERR - Error table

Data type: ARRANG_ERR
Optional: No
Call by Reference: No ( called with pass by value option)

T_ARRANG_TAX - Tax table

Data type: ARRANG_TAX
Optional: No
Call by Reference: No ( called with pass by value option)

T_ARRANG_VAL - Value table

Data type: ARRANG_VAL
Optional: No
Call by Reference: No ( called with pass by value option)

T_EK08ARRANG - Invoice items for all invoices

Data type: EK08ARRANG
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

BUKRS_NOT_FOUND - I_BUKRS not in T001

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CREDITOR_ERROR - Vendor not created/maintained properly

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FATAL_ERROR - Should not occur

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PERIOD_ERROR - I_BUDAT not in allowed posting period

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

RATE_NOT_FOUND - Exchange rate not determined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TABLE_EMPTY - T_EK08ARRANG contains no lines

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DOCUMENT_TYPE_NOT_FOUND - Document type not found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ACCOUNT_ASSIGNMENT_ERROR - G/L accounts wrongly maintained

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_JURISDICTION_CODE - Error with tax-free transactions with jur. code

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MR_ARRANGEMENT_INVOICE_CREATE 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_i_budat  TYPE BKPF-BUDAT, "   
lt_t_arrang_err  TYPE STANDARD TABLE OF ARRANG_ERR, "   
lv_bukrs_not_found  TYPE ARRANG_ERR, "   
lv_i_bukrs  TYPE BKPF-BUKRS, "   
lt_t_arrang_tax  TYPE STANDARD TABLE OF ARRANG_TAX, "   
lv_creditor_error  TYPE ARRANG_TAX, "   
lv_i_lifnr  TYPE LFA1-LIFNR, "   
lv_fatal_error  TYPE LFA1, "   
lt_t_arrang_val  TYPE STANDARD TABLE OF ARRANG_VAL, "   
lv_i_waers  TYPE BKPF-WAERS, "   
lv_period_error  TYPE BKPF, "   
lt_t_ek08arrang  TYPE STANDARD TABLE OF EK08ARRANG, "   
lv_i_wwert  TYPE SY-DATUM, "   
lv_rate_not_found  TYPE SY, "   
lv_i_zlsch  TYPE KONA-ZLSCH, "   
lv_table_empty  TYPE KONA, "   
lv_document_type_not_found  TYPE KONA, "   
lv_i_only_prepost_document  TYPE RWM01-VORER, "   SPACE
lv_account_assignment_error  TYPE RWM01, "   
lv_error_jurisdiction_code  TYPE RWM01. "   

  CALL FUNCTION 'MR_ARRANGEMENT_INVOICE_CREATE'  "NOTRANSL: Vorbereiten zur Erstellung von Rechnungen aus der 'nachträgl. Ab
    EXPORTING
         I_BUDAT = lv_i_budat
         I_BUKRS = lv_i_bukrs
         I_LIFNR = lv_i_lifnr
         I_WAERS = lv_i_waers
         I_WWERT = lv_i_wwert
         I_ZLSCH = lv_i_zlsch
         I_ONLY_PREPOST_DOCUMENT = lv_i_only_prepost_document
    TABLES
         T_ARRANG_ERR = lt_t_arrang_err
         T_ARRANG_TAX = lt_t_arrang_tax
         T_ARRANG_VAL = lt_t_arrang_val
         T_EK08ARRANG = lt_t_ek08arrang
    EXCEPTIONS
        BUKRS_NOT_FOUND = 1
        CREDITOR_ERROR = 2
        FATAL_ERROR = 3
        PERIOD_ERROR = 4
        RATE_NOT_FOUND = 5
        TABLE_EMPTY = 6
        DOCUMENT_TYPE_NOT_FOUND = 7
        ACCOUNT_ASSIGNMENT_ERROR = 8
        ERROR_JURISDICTION_CODE = 9
. " MR_ARRANGEMENT_INVOICE_CREATE




ABAP code using 7.40 inline data declarations to call FM MR_ARRANGEMENT_INVOICE_CREATE

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.

"SELECT single BUDAT FROM BKPF INTO @DATA(ld_i_budat).
 
 
 
"SELECT single BUKRS FROM BKPF INTO @DATA(ld_i_bukrs).
 
 
 
"SELECT single LIFNR FROM LFA1 INTO @DATA(ld_i_lifnr).
 
 
 
"SELECT single WAERS FROM BKPF INTO @DATA(ld_i_waers).
 
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_wwert).
 
 
"SELECT single ZLSCH FROM KONA INTO @DATA(ld_i_zlsch).
 
 
 
"SELECT single VORER FROM RWM01 INTO @DATA(ld_i_only_prepost_document).
DATA(ld_i_only_prepost_document) = ' '.
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!