SAP MRM_XMLBAPI_INCINV_GETDETAIL Function Module for Invoice Verification: Display Incoming Invoice









MRM_XMLBAPI_INCINV_GETDETAIL is a standard mrm xmlbapi incinv getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Invoice Verification: Display Incoming Invoice 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 mrm xmlbapi incinv getdetail FM, simply by entering the name MRM_XMLBAPI_INCINV_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.

Function Group: MRM_BAPI
Program Name: SAPLMRM_BAPI
Main Program: SAPLMRM_BAPI
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function MRM_XMLBAPI_INCINV_GETDETAIL 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 'MRM_XMLBAPI_INCINV_GETDETAIL'"Invoice Verification: Display Incoming Invoice
EXPORTING
INVOICEDOCNUMBER = "Invoice Document Number
FISCALYEAR = "Fiscal Year

IMPORTING
HEADERDATA = "Header Data in Incoming Invoice
ADDRESSDATA = "Transfer Structure Address Data Incoming Invoice (Details)
E_INVOICE = "Indicator: post invoice
E_CREDITMEMO = "Indicator: post invoice
E_ADRESS_DIFF_INV = "Invoicing Party Address Data: Formatted

TABLES
ITEMDATA = "Item Data in Incoming Invoice
* ACCOUNTINGDATA = "Account Assignment Data in Incoming Invoice (Create)
* GLACCOUNTDATA = "G/L Account Posting: Incoming Invoice (GetDetail)
* MATERIALDATA = "Transfer Struct.: Material Posting Incoming Inv. (GetDetail
* TAXDATA = "Tax Information in Incoming Invoice (GetDetail)
* WITHTAXDATA = "Transfer Structure: Withholding Tax Data (GetDetail)
* VENDORITEMSPLITDATA = "Transfer Structure: Vendor Split Incoming Invoice (GetDetail
RETURN = "Return Messages
.




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_SAPLMRM_BAPI_001 Customer Exit: Change XML Data for BAPI Call CreateFrom Data

IMPORTING Parameters details for MRM_XMLBAPI_INCINV_GETDETAIL

INVOICEDOCNUMBER - Invoice Document Number

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

FISCALYEAR - Fiscal Year

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

EXPORTING Parameters details for MRM_XMLBAPI_INCINV_GETDETAIL

HEADERDATA - Header Data in Incoming Invoice

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

ADDRESSDATA - Transfer Structure Address Data Incoming Invoice (Details)

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

E_INVOICE - Indicator: post invoice

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

E_CREDITMEMO - Indicator: post invoice

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

E_ADRESS_DIFF_INV - Invoicing Party Address Data: Formatted

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

TABLES Parameters details for MRM_XMLBAPI_INCINV_GETDETAIL

ITEMDATA - Item Data in Incoming Invoice

Data type: MXML_INCINV_DETAIL_ITEM
Optional: No
Call by Reference: Yes

ACCOUNTINGDATA - Account Assignment Data in Incoming Invoice (Create)

Data type: BAPI_INCINV_DETAIL_ACCOUNT
Optional: Yes
Call by Reference: Yes

GLACCOUNTDATA - G/L Account Posting: Incoming Invoice (GetDetail)

Data type: BAPI_INCINV_DETAIL_GL_ACCOUNT
Optional: Yes
Call by Reference: Yes

MATERIALDATA - Transfer Struct.: Material Posting Incoming Inv. (GetDetail

Data type: BAPI_INCINV_DETAIL_MATERIAL
Optional: Yes
Call by Reference: Yes

TAXDATA - Tax Information in Incoming Invoice (GetDetail)

Data type: MXML_INCINV_DETAIL_TAX
Optional: Yes
Call by Reference: Yes

WITHTAXDATA - Transfer Structure: Withholding Tax Data (GetDetail)

Data type: BAPI_INCINV_DETAIL_WITHTAX
Optional: Yes
Call by Reference: Yes

VENDORITEMSPLITDATA - Transfer Structure: Vendor Split Incoming Invoice (GetDetail

Data type: BAPI_INCINV_DETAIL_VENDORSPLIT
Optional: Yes
Call by Reference: Yes

RETURN - Return Messages

Data type: BAPIRET2
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for MRM_XMLBAPI_INCINV_GETDETAIL 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_itemdata  TYPE STANDARD TABLE OF MXML_INCINV_DETAIL_ITEM, "   
lv_headerdata  TYPE BAPI_INCINV_DETAIL_HEADER, "   
lv_invoicedocnumber  TYPE BAPI_INCINV_FLD-INV_DOC_NO, "   
lv_fiscalyear  TYPE BAPI_INCINV_FLD-FISC_YEAR, "   
lv_addressdata  TYPE BAPI_INCINV_DETAIL_ADDRESSDATA, "   
lt_accountingdata  TYPE STANDARD TABLE OF BAPI_INCINV_DETAIL_ACCOUNT, "   
lv_e_invoice  TYPE RBKP-XRECH, "   
lt_glaccountdata  TYPE STANDARD TABLE OF BAPI_INCINV_DETAIL_GL_ACCOUNT, "   
lv_e_creditmemo  TYPE RBKP-XRECH, "   
lt_materialdata  TYPE STANDARD TABLE OF BAPI_INCINV_DETAIL_MATERIAL, "   
lt_taxdata  TYPE STANDARD TABLE OF MXML_INCINV_DETAIL_TAX, "   
lv_e_adress_diff_inv  TYPE MXML_INCINV_DETAIL_VENDORDATA, "   
lt_withtaxdata  TYPE STANDARD TABLE OF BAPI_INCINV_DETAIL_WITHTAX, "   
lt_vendoritemsplitdata  TYPE STANDARD TABLE OF BAPI_INCINV_DETAIL_VENDORSPLIT, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2. "   

  CALL FUNCTION 'MRM_XMLBAPI_INCINV_GETDETAIL'  "Invoice Verification: Display Incoming Invoice
    EXPORTING
         INVOICEDOCNUMBER = lv_invoicedocnumber
         FISCALYEAR = lv_fiscalyear
    IMPORTING
         HEADERDATA = lv_headerdata
         ADDRESSDATA = lv_addressdata
         E_INVOICE = lv_e_invoice
         E_CREDITMEMO = lv_e_creditmemo
         E_ADRESS_DIFF_INV = lv_e_adress_diff_inv
    TABLES
         ITEMDATA = lt_itemdata
         ACCOUNTINGDATA = lt_accountingdata
         GLACCOUNTDATA = lt_glaccountdata
         MATERIALDATA = lt_materialdata
         TAXDATA = lt_taxdata
         WITHTAXDATA = lt_withtaxdata
         VENDORITEMSPLITDATA = lt_vendoritemsplitdata
         RETURN = lt_return
. " MRM_XMLBAPI_INCINV_GETDETAIL




ABAP code using 7.40 inline data declarations to call FM MRM_XMLBAPI_INCINV_GETDETAIL

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 INV_DOC_NO FROM BAPI_INCINV_FLD INTO @DATA(ld_invoicedocnumber).
 
"SELECT single FISC_YEAR FROM BAPI_INCINV_FLD INTO @DATA(ld_fiscalyear).
 
 
 
"SELECT single XRECH FROM RBKP INTO @DATA(ld_e_invoice).
 
 
"SELECT single XRECH FROM RBKP INTO @DATA(ld_e_creditmemo).
 
 
 
 
 
 
 


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!