BAPI_PLANNEDORDER_CREATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name BAPI_PLANNEDORDER_CREATE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
2004
Released Date:
26.01.2005
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_PLANNEDORDER_CREATE' "Create planned order
EXPORTING
headerdata = " bapiplaf_i1 Header data (from external system)
IMPORTING
return = " bapireturn1 Completion confirmations
plannedorder = " bapi_pldord-pldord_num Planned order number
createdheaderdata = " bapiplaf_e1 Header Data (from SAP for the Ext. System)
capacityheaderdata1 = " bapi_kbko Capacity header data (detailed scheduling)
capacityheaderdata2 = " bapi_kbko Capacity header data (rate-based scheduling)
capacityheaderdata3 = " bapi_kbko Capacity header data (rough-cut scheduling)
* TABLES
* componentsdata = " bapi_pldordcomp_i1 Component data - create
* createdcomponentsdata = " bapi_pldordcomp_e1 Created component data
* capacitydata1 = " bapi_pldordcapa_e1 Capacity data (detailed scheduling)
* capacitydata2 = " bapi_pldordcapa_e1 Capacity data (rate-based scheduling)
* capacitydata3 = " bapi_pldordcapa_e1 Capacity data (rough-cut scheduling)
. " BAPI_PLANNEDORDER_CREATE
The ABAP code below is a full code listing to execute function module BAPI_PLANNEDORDER_CREATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_return | TYPE BAPIRETURN1 , |
| ld_plannedorder | TYPE BAPI_PLDORD-PLDORD_NUM , |
| ld_createdheaderdata | TYPE BAPIPLAF_E1 , |
| ld_capacityheaderdata1 | TYPE BAPI_KBKO , |
| ld_capacityheaderdata2 | TYPE BAPI_KBKO , |
| ld_capacityheaderdata3 | TYPE BAPI_KBKO , |
| it_componentsdata | TYPE STANDARD TABLE OF BAPI_PLDORDCOMP_I1,"TABLES PARAM |
| wa_componentsdata | LIKE LINE OF it_componentsdata , |
| it_createdcomponentsdata | TYPE STANDARD TABLE OF BAPI_PLDORDCOMP_E1,"TABLES PARAM |
| wa_createdcomponentsdata | LIKE LINE OF it_createdcomponentsdata , |
| it_capacitydata1 | TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1,"TABLES PARAM |
| wa_capacitydata1 | LIKE LINE OF it_capacitydata1 , |
| it_capacitydata2 | TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1,"TABLES PARAM |
| wa_capacitydata2 | LIKE LINE OF it_capacitydata2 , |
| it_capacitydata3 | TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1,"TABLES PARAM |
| wa_capacitydata3 | LIKE LINE OF it_capacitydata3 . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_return | TYPE BAPIRETURN1 , |
| ld_headerdata | TYPE BAPIPLAF_I1 , |
| it_componentsdata | TYPE STANDARD TABLE OF BAPI_PLDORDCOMP_I1 , |
| wa_componentsdata | LIKE LINE OF it_componentsdata, |
| ld_plannedorder | TYPE BAPI_PLDORD-PLDORD_NUM , |
| it_createdcomponentsdata | TYPE STANDARD TABLE OF BAPI_PLDORDCOMP_E1 , |
| wa_createdcomponentsdata | LIKE LINE OF it_createdcomponentsdata, |
| ld_createdheaderdata | TYPE BAPIPLAF_E1 , |
| it_capacitydata1 | TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1 , |
| wa_capacitydata1 | LIKE LINE OF it_capacitydata1, |
| ld_capacityheaderdata1 | TYPE BAPI_KBKO , |
| it_capacitydata2 | TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1 , |
| wa_capacitydata2 | LIKE LINE OF it_capacitydata2, |
| ld_capacityheaderdata2 | TYPE BAPI_KBKO , |
| it_capacitydata3 | TYPE STANDARD TABLE OF BAPI_PLDORDCAPA_E1 , |
| wa_capacitydata3 | LIKE LINE OF it_capacitydata3, |
| ld_capacityheaderdata3 | TYPE BAPI_KBKO . |
This method can be used to create planned orders with BoM explosion or
with manual entry of components.
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_PLANNEDORDER_CREATE or its description.
BAPI_PLANNEDORDER_CREATE - Create planned order BAPI_PLANNEDORDER_CHANGE - Change planned order BAPI_PERSDATA_SIMULATECREATION - Simulation: Create personal data BAPI_PERSDATA_GETLIST - Read instances BAPI_PERSDATA_GETDETAILEDLIST - Read instances with data BAPI_PERSDATA_GETDETAIL - Read personal data