PP
BAPI
RFC
Used the same way in S/4HANA
BAPI_ROUTING_CREATE Create Routing
Creates a routing with header, material assignment, sequences, operations, component assignments, PRTs and inspection characteristics in one call. It is used in master data migration and in uploads from engineering or PLM systems. Run it first with TESTRUN, link operations to the header through the task list keys, and commit only if RETURN contains no E message.
- Function group
- CPCC_BUS1012
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| TESTRUN | BAPIFLAG | Test run (no update) | — |
| PROFILE | BAPI1012_CONTROL_DATA-PROFILE | Profile | — |
| BOMUSAGE | BAPI1012_CONTROL_DATA-BOM_USAGE | BOM usage | — |
| APPLICATION | BAPI1012_CONTROL_DATA-APPLICATION | BOM application | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| GROUP | BAPI1012_TSK_C-TASK_LIST_GROUP | Task list group |
| GROUPCOUNTER | BAPI1012_TSK_C-GROUP_COUNTER | Group counter |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| TASK | BAPI1012_TSK_C | Task list header | Yes |
| MATERIALTASKALLOCATION | BAPI1012_MTK_C | Material assignment | — |
| SEQUENCE | BAPI1012_SEQ_C | Sequences | — |
| OPERATION | BAPI1012_OPR_C | Operations | — |
| SUBOPERATION | BAPI1012_SUB_OPR_C | Suboperations | — |
| COMPONENTALLOCATION | BAPI1012_COM_C | Component assignments | — |
| PRODUCTIONRESOURCE | BAPI1012_PRT_C | Production resource/tool assignments | — |
| INSPCHARACTERISTIC | BAPI1012_CHA_C | Inspection characteristics | — |
| TEXT | BAPI1012_TXT_C | Long text lines | — |
| RETURN | BAPIRET2 | Return messages | — |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_ROUTING_CREATE'
IMPORTING
group = lv_group
groupcounter = lv_groupcounter
TABLES
task = lt_task
materialtaskallocation = lt_materialtaskallocation
sequence = lt_sequence
operation = lt_operation
suboperation = lt_suboperation
componentallocation = lt_componentallocation
productionresource = lt_productionresource
inspcharacteristic = lt_inspcharacteristic
text = lt_text
return = lt_return.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.