SAP GET_PLAF_FOR_SALES_ORDER Function Module for NOTRANSL: Liest Planaufträge zum Kundenauftrag









GET_PLAF_FOR_SALES_ORDER is a standard get plaf for 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: Liest Planaufträge zum Kundenauftrag 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 plaf for sales order FM, simply by entering the name GET_PLAF_FOR_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_PLAF_FOR_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_PLAF_FOR_SALES_ORDER'"NOTRANSL: Liest Planaufträge zum Kundenauftrag
EXPORTING
KDAUF = "Sales Order Number
* KDPOS = "Item Number in Sales Order
* MATNR = "Planning material
* PLWRK = "Planning Plant
* PWWRK = "Production plant in planned order
* PLSCN = "Planning Scenario of Long-Term Planning

TABLES
PLAF_TAB = "Planned Order

EXCEPTIONS
MISSING_PARAMETER = 1
.



IMPORTING Parameters details for GET_PLAF_FOR_SALES_ORDER

KDAUF - Sales Order Number

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

KDPOS - Item Number in Sales Order

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

MATNR - Planning material

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

PLWRK - Planning Plant

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

PWWRK - Production plant in planned order

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

PLSCN - Planning Scenario of Long-Term Planning

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

TABLES Parameters details for GET_PLAF_FOR_SALES_ORDER

PLAF_TAB - Planned Order

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

EXCEPTIONS details

MISSING_PARAMETER -

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

Copy and paste ABAP code example for GET_PLAF_FOR_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_kdauf  TYPE PLAF-KDAUF, "   
lt_plaf_tab  TYPE STANDARD TABLE OF PLAF, "   
lv_missing_parameter  TYPE PLAF, "   
lv_kdpos  TYPE PLAF-KDPOS, "   
lv_matnr  TYPE PLAF-MATNR, "   
lv_plwrk  TYPE PLAF-PLWRK, "   
lv_pwwrk  TYPE PLAF-PWWRK, "   
lv_plscn  TYPE PLAF-PLSCN. "   

  CALL FUNCTION 'GET_PLAF_FOR_SALES_ORDER'  "NOTRANSL: Liest Planaufträge zum Kundenauftrag
    EXPORTING
         KDAUF = lv_kdauf
         KDPOS = lv_kdpos
         MATNR = lv_matnr
         PLWRK = lv_plwrk
         PWWRK = lv_pwwrk
         PLSCN = lv_plscn
    TABLES
         PLAF_TAB = lt_plaf_tab
    EXCEPTIONS
        MISSING_PARAMETER = 1
. " GET_PLAF_FOR_SALES_ORDER




ABAP code using 7.40 inline data declarations to call FM GET_PLAF_FOR_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 KDAUF FROM PLAF INTO @DATA(ld_kdauf).
 
 
 
"SELECT single KDPOS FROM PLAF INTO @DATA(ld_kdpos).
 
"SELECT single MATNR FROM PLAF INTO @DATA(ld_matnr).
 
"SELECT single PLWRK FROM PLAF INTO @DATA(ld_plwrk).
 
"SELECT single PWWRK FROM PLAF INTO @DATA(ld_pwwrk).
 
"SELECT single PLSCN FROM PLAF INTO @DATA(ld_plscn).
 


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!