SAP BAPI_PLANNEDORDER_GET_DETAIL Function Module for Get details for planned order









BAPI_PLANNEDORDER_GET_DETAIL is a standard bapi plannedorder get detail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get details for planned order 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 bapi plannedorder get detail FM, simply by entering the name BAPI_PLANNEDORDER_GET_DETAIL into the relevant SAP transaction such as SE37 or SE38.

Function Group: 2004
Program Name: SAPL2004
Main Program: SAPL2004
Appliation area: C
Release date: 17-Jul-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_PLANNEDORDER_GET_DETAIL 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 'BAPI_PLANNEDORDER_GET_DETAIL'"Get details for planned order
EXPORTING
PLANNEDORDER = "Planned order number

IMPORTING
RETURN = "Completion confirmations
HEADERDATA = "Header data
CAPACITYHEADERDATA1 = "Capacity header data (detailed scheduling)
CAPACITYHEADERDATA2 = "Capacity header data (rate-based scheduling)
CAPACITYHEADERDATA3 = "Capacity header data (rough-cut scheduling)

TABLES
* COMPONENTSDATA = "Material component data
* CAPACITYDATA1 = "Capacity data (detailed scheduling)
* CAPACITYDATA2 = "Capacity data (rate-based scheduling)
* CAPACITYDATA3 = "Capacity data (rough-cut scheduling)
.



IMPORTING Parameters details for BAPI_PLANNEDORDER_GET_DETAIL

PLANNEDORDER - Planned order number

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

EXPORTING Parameters details for BAPI_PLANNEDORDER_GET_DETAIL

RETURN - Completion confirmations

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

HEADERDATA - Header data

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

CAPACITYHEADERDATA1 - Capacity header data (detailed scheduling)

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

CAPACITYHEADERDATA2 - Capacity header data (rate-based scheduling)

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

CAPACITYHEADERDATA3 - Capacity header data (rough-cut scheduling)

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

TABLES Parameters details for BAPI_PLANNEDORDER_GET_DETAIL

COMPONENTSDATA - Material component data

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

CAPACITYDATA1 - Capacity data (detailed scheduling)

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

CAPACITYDATA2 - Capacity data (rate-based scheduling)

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

CAPACITYDATA3 - Capacity data (rough-cut scheduling)

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

Copy and paste ABAP code example for BAPI_PLANNEDORDER_GET_DETAIL 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_return  TYPE BAPIRETURN1, "   
lv_plannedorder  TYPE BAPI_PLDORD-PLDORD_NUM, "   
lt_componentsdata  TYPE STANDARD TABLE OF BAPI_PLDORDCOMP_E1, "   
lv_headerdata  TYPE BAPIPLAF_E1, "   
lt_capacitydata1  TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1, "   
lt_capacitydata2  TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1, "   
lv_capacityheaderdata1  TYPE BAPI_KBKO, "   
lt_capacitydata3  TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1, "   
lv_capacityheaderdata2  TYPE BAPI_KBKO, "   
lv_capacityheaderdata3  TYPE BAPI_KBKO. "   

  CALL FUNCTION 'BAPI_PLANNEDORDER_GET_DETAIL'  "Get details for planned order
    EXPORTING
         PLANNEDORDER = lv_plannedorder
    IMPORTING
         RETURN = lv_return
         HEADERDATA = lv_headerdata
         CAPACITYHEADERDATA1 = lv_capacityheaderdata1
         CAPACITYHEADERDATA2 = lv_capacityheaderdata2
         CAPACITYHEADERDATA3 = lv_capacityheaderdata3
    TABLES
         COMPONENTSDATA = lt_componentsdata
         CAPACITYDATA1 = lt_capacitydata1
         CAPACITYDATA2 = lt_capacitydata2
         CAPACITYDATA3 = lt_capacitydata3
. " BAPI_PLANNEDORDER_GET_DETAIL




ABAP code using 7.40 inline data declarations to call FM BAPI_PLANNEDORDER_GET_DETAIL

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 PLDORD_NUM FROM BAPI_PLDORD INTO @DATA(ld_plannedorder).
 
 
 
 
 
 
 
 
 


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!