SAP ORDER_STATUS_DETERMINE Function Module for Read Data for Given Order Number and Determine Existing Status
ORDER_STATUS_DETERMINE is a standard order status determine SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Data for Given Order Number and Determine Existing Status 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 order status determine FM, simply by entering the name ORDER_STATUS_DETERMINE into the relevant SAP transaction such as SE37 or SE38.
Function Group: FWOR
Program Name: SAPLFWOR
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ORDER_STATUS_DETERMINE 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 'ORDER_STATUS_DETERMINE'"Read Data for Given Order Number and Determine Existing Status.
EXPORTING
I_BUKRS = "Company Code
I_NORDER = "Order Number
* I_TYPE = "Internal level
IMPORTING
E_STATUS = "Status string
E_ORDER_RECORDS = "Tabelle mit allen VWORDE-Einträgen
E_MAIN_TRANSACTION_MAX_STATUS = "Haupteintrag der VWORDE zu maximalem Status
E_MEMO_RECORD = "Plansatz zu Kauf/Verkauf
E_ACTUAL_RECORD = "Istsatz zu Kauf/Verkauf (evtl. stornierter Satz)
E_REVERSED_RECORDS = "
E_ORDER_RECORD_FOR_TYPE = "VWORDE-Satz zu Kauf/Verkauf mit INTEB = I_INTEB
EXCEPTIONS
I_BUKRS_INITIAL = 1 I_NORDER_INITIAL = 2 NO_ENTRIES_FOUND = 3 NO_ENTRY_FOR_TYPE = 4
IMPORTING Parameters details for ORDER_STATUS_DETERMINE
I_BUKRS - Company Code
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_NORDER - Order Number
Data type: VWORDE-NORDEROptional: No
Call by Reference: No ( called with pass by value option)
I_TYPE - Internal level
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ORDER_STATUS_DETERMINE
E_STATUS - Status string
Data type: VWORDSTATOptional: No
Call by Reference: No ( called with pass by value option)
E_ORDER_RECORDS - Tabelle mit allen VWORDE-Einträgen
Data type: TRPM_IT_VWORDEOptional: No
Call by Reference: Yes
E_MAIN_TRANSACTION_MAX_STATUS - Haupteintrag der VWORDE zu maximalem Status
Data type: VWORDEOptional: No
Call by Reference: No ( called with pass by value option)
E_MEMO_RECORD - Plansatz zu Kauf/Verkauf
Data type: VWBEPPOptional: No
Call by Reference: No ( called with pass by value option)
E_ACTUAL_RECORD - Istsatz zu Kauf/Verkauf (evtl. stornierter Satz)
Data type: VWBEVIOptional: No
Call by Reference: No ( called with pass by value option)
E_REVERSED_RECORDS -
Data type: TRPM_IT_VWBEVIOptional: No
Call by Reference: Yes
E_ORDER_RECORD_FOR_TYPE - VWORDE-Satz zu Kauf/Verkauf mit INTEB = I_INTEB
Data type: VWORDEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
I_BUKRS_INITIAL - Company code has initial value
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_NORDER_INITIAL - Ordernummer initial
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRIES_FOUND - No Entries
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ENTRY_FOR_TYPE - kein Eintrag zu vorgegebener interner Ebene
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ORDER_STATUS_DETERMINE 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_bukrs | TYPE T001-BUKRS, " | |||
| lv_e_status | TYPE VWORDSTAT, " | |||
| lv_i_bukrs_initial | TYPE VWORDSTAT, " | |||
| lv_i_norder | TYPE VWORDE-NORDER, " | |||
| lv_e_order_records | TYPE TRPM_IT_VWORDE, " | |||
| lv_i_norder_initial | TYPE TRPM_IT_VWORDE, " | |||
| lv_i_type | TYPE C, " | |||
| lv_no_entries_found | TYPE C, " | |||
| lv_e_main_transaction_max_status | TYPE VWORDE, " | |||
| lv_e_memo_record | TYPE VWBEPP, " | |||
| lv_no_entry_for_type | TYPE VWBEPP, " | |||
| lv_e_actual_record | TYPE VWBEVI, " | |||
| lv_e_reversed_records | TYPE TRPM_IT_VWBEVI, " | |||
| lv_e_order_record_for_type | TYPE VWORDE. " |
|   CALL FUNCTION 'ORDER_STATUS_DETERMINE' "Read Data for Given Order Number and Determine Existing Status |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_NORDER | = lv_i_norder | |
| I_TYPE | = lv_i_type | |
| IMPORTING | ||
| E_STATUS | = lv_e_status | |
| E_ORDER_RECORDS | = lv_e_order_records | |
| E_MAIN_TRANSACTION_MAX_STATUS | = lv_e_main_transaction_max_status | |
| E_MEMO_RECORD | = lv_e_memo_record | |
| E_ACTUAL_RECORD | = lv_e_actual_record | |
| E_REVERSED_RECORDS | = lv_e_reversed_records | |
| E_ORDER_RECORD_FOR_TYPE | = lv_e_order_record_for_type | |
| EXCEPTIONS | ||
| I_BUKRS_INITIAL = 1 | ||
| I_NORDER_INITIAL = 2 | ||
| NO_ENTRIES_FOUND = 3 | ||
| NO_ENTRY_FOR_TYPE = 4 | ||
| . " ORDER_STATUS_DETERMINE | ||
ABAP code using 7.40 inline data declarations to call FM ORDER_STATUS_DETERMINE
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 BUKRS FROM T001 INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single NORDER FROM VWORDE INTO @DATA(ld_i_norder). | ||||
Search for further information about these or an SAP related objects