SAP F4_ORDER_QUANTITY Function Module for NOTRANSL: F4-Hilfe zur Bestellmenge incl. Rundung in Alternativ-ME's









F4_ORDER_QUANTITY is a standard f4 order quantity 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: F4-Hilfe zur Bestellmenge incl. Rundung in Alternativ-ME's 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 f4 order quantity FM, simply by entering the name F4_ORDER_QUANTITY into the relevant SAP transaction such as SE37 or SE38.

Function Group: MDR1
Program Name: SAPLMDR1
Main Program: SAPLMDR1
Appliation area: W
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function F4_ORDER_QUANTITY 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 'F4_ORDER_QUANTITY'"NOTRANSL: F4-Hilfe zur Bestellmenge incl. Rundung in Alternativ-ME's
EXPORTING
I_WERK = "
I_MATNR = "Material Number
I_MENGE = "
I_MEINS = "Purchase Order Unit of Measure
* I_LIFNR = "
* I_EKORG = "
* I_LIWRK = "
* I_MESPERRE = ' ' "Indicator That UoM Should Not be Changed
* I_PSTYP = "

IMPORTING
E_MENGE = "
E_MEINS = "

EXCEPTIONS
WRONG_INPUT_COMBINATION = 1 ERROR_BY_OPERATION = 2 ERROR = 3
.




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_SAPLMDR1_001 User Exit for Removing Invalid UN decimal Points
EXIT_SAPLMDR1_002 User Exit for Defining Allowed Units of Measure
EXIT_SAPLMDR1_003 User Exit for Implementing Customer-Specific Method of Rounding
EXIT_SAPLMDR1_004 User Exit for Customer-Specific Correction of Rounding Result
EXIT_SAPLMDR1_005 User Exit for Customer-Specific Correction of Rounding Parameters

IMPORTING Parameters details for F4_ORDER_QUANTITY

I_WERK -

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

I_MATNR - Material Number

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

I_MENGE -

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

I_MEINS - Purchase Order Unit of Measure

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

I_LIFNR -

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

I_EKORG -

Data type: EINE-EKORG
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LIWRK -

Data type: T001W-WERKS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MESPERRE - Indicator That UoM Should Not be Changed

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

I_PSTYP -

Data type: EKPO-PSTYP
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for F4_ORDER_QUANTITY

E_MENGE -

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

E_MEINS -

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

EXCEPTIONS details

WRONG_INPUT_COMBINATION -

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

ERROR_BY_OPERATION -

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

ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for F4_ORDER_QUANTITY 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_werk  TYPE T001W-WERKS, "   
lv_e_menge  TYPE EBAN-MENGE, "   
lv_wrong_input_combination  TYPE EBAN, "   
lv_e_meins  TYPE MARM-MEINH, "   
lv_i_matnr  TYPE MARA-MATNR, "   
lv_error_by_operation  TYPE MARA, "   
lv_error  TYPE MARA, "   
lv_i_menge  TYPE EBAN-MENGE, "   
lv_i_meins  TYPE MARA-BSTME, "   
lv_i_lifnr  TYPE LFA1-LIFNR, "   
lv_i_ekorg  TYPE EINE-EKORG, "   
lv_i_liwrk  TYPE T001W-WERKS, "   
lv_i_mesperre  TYPE MDR1MESPERRE, "   SPACE
lv_i_pstyp  TYPE EKPO-PSTYP. "   

  CALL FUNCTION 'F4_ORDER_QUANTITY'  "NOTRANSL: F4-Hilfe zur Bestellmenge incl. Rundung in Alternativ-ME's
    EXPORTING
         I_WERK = lv_i_werk
         I_MATNR = lv_i_matnr
         I_MENGE = lv_i_menge
         I_MEINS = lv_i_meins
         I_LIFNR = lv_i_lifnr
         I_EKORG = lv_i_ekorg
         I_LIWRK = lv_i_liwrk
         I_MESPERRE = lv_i_mesperre
         I_PSTYP = lv_i_pstyp
    IMPORTING
         E_MENGE = lv_e_menge
         E_MEINS = lv_e_meins
    EXCEPTIONS
        WRONG_INPUT_COMBINATION = 1
        ERROR_BY_OPERATION = 2
        ERROR = 3
. " F4_ORDER_QUANTITY




ABAP code using 7.40 inline data declarations to call FM F4_ORDER_QUANTITY

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 WERKS FROM T001W INTO @DATA(ld_i_werk).
 
"SELECT single MENGE FROM EBAN INTO @DATA(ld_e_menge).
 
 
"SELECT single MEINH FROM MARM INTO @DATA(ld_e_meins).
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_i_matnr).
 
 
 
"SELECT single MENGE FROM EBAN INTO @DATA(ld_i_menge).
 
"SELECT single BSTME FROM MARA INTO @DATA(ld_i_meins).
 
"SELECT single LIFNR FROM LFA1 INTO @DATA(ld_i_lifnr).
 
"SELECT single EKORG FROM EINE INTO @DATA(ld_i_ekorg).
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_i_liwrk).
 
DATA(ld_i_mesperre) = ' '.
 
"SELECT single PSTYP FROM EKPO INTO @DATA(ld_i_pstyp).
 


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!