SAP GET_MOAF_SALES_ORDER Function Module for NOTRANSL: Plan- und Fertigungsaufträge für Montageabwicklung selektieren
GET_MOAF_SALES_ORDER is a standard get moaf sales order 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: Plan- und Fertigungsaufträge für Montageabwicklung selektieren 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 get moaf sales order FM, simply by entering the name GET_MOAF_SALES_ORDER into the relevant SAP transaction such as SE37 or SE38.
Function Group: M61E
Program Name: SAPLM61E
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function GET_MOAF_SALES_ORDER 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 'GET_MOAF_SALES_ORDER'"NOTRANSL: Plan- und Fertigungsaufträge für Montageabwicklung selektieren.
EXPORTING
IKDAUF = "Sales Order Number
IKDPOS = "Item Number in Sales Order
* IMATNR = "Material Number
* IWERKS = "Plant
IMPORTING
EMATNR = "Material Number
EWERKS = "Plant
TABLES
PLAF_M = "Planned Order
IMPORTING Parameters details for GET_MOAF_SALES_ORDER
IKDAUF - Sales Order Number
Data type: RM61X-KDAUFOptional: No
Call by Reference: No ( called with pass by value option)
IKDPOS - Item Number in Sales Order
Data type: RM61X-KDPOSOptional: No
Call by Reference: No ( called with pass by value option)
IMATNR - Material Number
Data type: RM61X-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
IWERKS - Plant
Data type: RM61X-WERKSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for GET_MOAF_SALES_ORDER
EMATNR - Material Number
Data type: CM61E-MATNROptional: No
Call by Reference: No ( called with pass by value option)
EWERKS - Plant
Data type: CM61E-WERKSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GET_MOAF_SALES_ORDER
PLAF_M - Planned Order
Data type: PLAFOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GET_MOAF_SALES_ORDER 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_ematnr | TYPE CM61E-MATNR, " | |||
| lv_ikdauf | TYPE RM61X-KDAUF, " | |||
| lt_plaf_m | TYPE STANDARD TABLE OF PLAF, " | |||
| lv_ewerks | TYPE CM61E-WERKS, " | |||
| lv_ikdpos | TYPE RM61X-KDPOS, " | |||
| lv_imatnr | TYPE RM61X-MATNR, " | |||
| lv_iwerks | TYPE RM61X-WERKS. " |
|   CALL FUNCTION 'GET_MOAF_SALES_ORDER' "NOTRANSL: Plan- und Fertigungsaufträge für Montageabwicklung selektieren |
| EXPORTING | ||
| IKDAUF | = lv_ikdauf | |
| IKDPOS | = lv_ikdpos | |
| IMATNR | = lv_imatnr | |
| IWERKS | = lv_iwerks | |
| IMPORTING | ||
| EMATNR | = lv_ematnr | |
| EWERKS | = lv_ewerks | |
| TABLES | ||
| PLAF_M | = lt_plaf_m | |
| . " GET_MOAF_SALES_ORDER | ||
ABAP code using 7.40 inline data declarations to call FM GET_MOAF_SALES_ORDER
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 MATNR FROM CM61E INTO @DATA(ld_ematnr). | ||||
| "SELECT single KDAUF FROM RM61X INTO @DATA(ld_ikdauf). | ||||
| "SELECT single WERKS FROM CM61E INTO @DATA(ld_ewerks). | ||||
| "SELECT single KDPOS FROM RM61X INTO @DATA(ld_ikdpos). | ||||
| "SELECT single MATNR FROM RM61X INTO @DATA(ld_imatnr). | ||||
| "SELECT single WERKS FROM RM61X INTO @DATA(ld_iwerks). | ||||
Search for further information about these or an SAP related objects