SAP MRMBADI_HEADER_DEFAULT Function Module for NOTRANSL: Call BADI for setting header default values









MRMBADI_HEADER_DEFAULT is a standard mrmbadi header default 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: Call BADI for setting header default values 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 mrmbadi header default FM, simply by entering the name MRMBADI_HEADER_DEFAULT into the relevant SAP transaction such as SE37 or SE38.

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



Function MRMBADI_HEADER_DEFAULT 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 'MRMBADI_HEADER_DEFAULT'"NOTRANSL: Call BADI for setting header default values
EXPORTING
I_RBKPV = "Invoice Document Header
I_RM08M = "I/O Fields SAPLMR1M

IMPORTING
E_BLART = "Document Type
E_BKTXT = "Document Header Text
E_XBLNR = "Reference Document Number
E_BLDAT = "Document Date in Document
E_REINDAT = "Invoice Receipt Date
E_XBNK = "Planned Delivery Costs Indicator
E_XWARE = "Goods Invoice/Service Indicator

EXCEPTIONS
NO_ENTRY_FOUND = 1 BADI_ERROR = 2
.



IMPORTING Parameters details for MRMBADI_HEADER_DEFAULT

I_RBKPV - Invoice Document Header

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

I_RM08M - I/O Fields SAPLMR1M

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

EXPORTING Parameters details for MRMBADI_HEADER_DEFAULT

E_BLART - Document Type

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

E_BKTXT - Document Header Text

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

E_XBLNR - Reference Document Number

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

E_BLDAT - Document Date in Document

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

E_REINDAT - Invoice Receipt Date

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

E_XBNK - Planned Delivery Costs Indicator

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

E_XWARE - Goods Invoice/Service Indicator

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

EXCEPTIONS details

NO_ENTRY_FOUND - No Entry Found

Data type:
Optional: No
Call by Reference: Yes

BADI_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for MRMBADI_HEADER_DEFAULT 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_blart  TYPE MRM_RBKPV-BLART, "   
lv_i_rbkpv  TYPE MRM_RBKPV, "   
lv_no_entry_found  TYPE MRM_RBKPV, "   
lv_e_bktxt  TYPE MRM_RBKPV-BKTXT, "   
lv_i_rm08m  TYPE RM08M, "   
lv_badi_error  TYPE RM08M, "   
lv_e_xblnr  TYPE MRM_RBKPV-XBLNR, "   
lv_e_bldat  TYPE MRM_RBKPV-BLDAT, "   
lv_e_reindat  TYPE MRM_RBKPV-REINDAT, "   
lv_e_xbnk  TYPE MRM_RBKPV-XBNK, "   
lv_e_xware  TYPE MRM_RBKPV-XWARE. "   

  CALL FUNCTION 'MRMBADI_HEADER_DEFAULT'  "NOTRANSL: Call BADI for setting header default values
    EXPORTING
         I_RBKPV = lv_i_rbkpv
         I_RM08M = lv_i_rm08m
    IMPORTING
         E_BLART = lv_e_blart
         E_BKTXT = lv_e_bktxt
         E_XBLNR = lv_e_xblnr
         E_BLDAT = lv_e_bldat
         E_REINDAT = lv_e_reindat
         E_XBNK = lv_e_xbnk
         E_XWARE = lv_e_xware
    EXCEPTIONS
        NO_ENTRY_FOUND = 1
        BADI_ERROR = 2
. " MRMBADI_HEADER_DEFAULT




ABAP code using 7.40 inline data declarations to call FM MRMBADI_HEADER_DEFAULT

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 BLART FROM MRM_RBKPV INTO @DATA(ld_e_blart).
 
 
 
"SELECT single BKTXT FROM MRM_RBKPV INTO @DATA(ld_e_bktxt).
 
 
 
"SELECT single XBLNR FROM MRM_RBKPV INTO @DATA(ld_e_xblnr).
 
"SELECT single BLDAT FROM MRM_RBKPV INTO @DATA(ld_e_bldat).
 
"SELECT single REINDAT FROM MRM_RBKPV INTO @DATA(ld_e_reindat).
 
"SELECT single XBNK FROM MRM_RBKPV INTO @DATA(ld_e_xbnk).
 
"SELECT single XWARE FROM MRM_RBKPV INTO @DATA(ld_e_xware).
 


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!