---
title: "Codeunit 20557 Subc. Purchase Order Creator"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/20557-subc-purchase-order-creator/
type: codeunit
id: 20557
name: "Subc. Purchase Order Creator"
app: "Subcontracting"
namespace: Microsoft.Manufacturing.Subcontracting
versions: "28-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/20557-subc-purchase-order-creator/source/?v=28 https://jonas-paprotka.de/ref/codeunit/20557-subc-purchase-order-creator/source/"
checked: 2026-11-20
changed: 2026-10-24
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 20557 Subc. Purchase Order Creator

JOP-AL, https://jonas-paprotka.de/ref/codeunit/20557-subc-purchase-order-creator/

| | |
| --- | --- |
| App | Subcontracting |
| Namespace | Microsoft.Manufacturing.Subcontracting |
| Versions | 28-29 |
| Minors | W1 28.4-29.0; DE 28.4-29.0; US 28.4-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/20557-subc-purchase-order-creator/editions.json) |
| Source file | src/Purchase/SubcPurchaseOrderCreator.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CreateSubcontractingPurchaseOrderFromRoutingLine | (ProdOrderRoutingLine: Record "Prod. Order Routing Line") | Integer | public | 28-29 | - | - |
| InsertProdDescriptionOnAfterInsertPurchOrderLine | (PurchOrderLine: Record "Purchase Line"; var RequisitionLine: Record "Requisition Line") | - | public | 28-29 | - | - |
| TransferSubcontractingProdOrderComp | (var PurchaseLine: Record "Purchase Line"; var RequisitionLine: Record "Requisition Line"; var NextLineNo: Integer) | - | public | 28-29 | - | - |
| ShowCreatedPurchaseOrder | (ProdOrderNo: Code[20]; NoOfCreatedPurchOrder: Integer) | - | public | 28-29 | - | - |
| SetOperationNoForCreatedPurchaseOrder | (OperationNoToSet: Code[10]) | - | internal | 28 | - | - |
| ClearOperationNoForCreatedPurchaseOrder | () | - | internal | 28 | - | - |
| SetRoutingReferenceNoForCreatedPurchaseOrder | (RoutingReferenceNoToSet: Integer) | - | internal | 28 | - | - |
| ClearRoutingReferenceNoForCreatedPurchaseOrder | () | - | internal | 28 | - | - |
| ShowExistingPurchaseOrdersForRoutingLines | (var ProdOrderRoutingLine: Record "Prod. Order Routing Line") | - | internal | 28-29 | - | - |
| CreateSubcontractingOrdersForRoutingLineSelection | (var ProdOrderRoutingLine: Record "Prod. Order Routing Line") | Integer | internal | 28-29 | - | - |
| InsertSubcontractingProdOrderComments | (PurchOrderLine: Record "Purchase Line"; RequisitionLine: Record "Requisition Line"; var NextLineNo: Integer) | - | internal | 29 | - | - |
| TransferSubcontractingProdOrderLineAttachments | (PurchOrderLine: Record "Purchase Line"; RequisitionLine: Record "Requisition Line") | - | internal | 29 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Internal event | OnBeforeHandleProdOrderRtngWorkCenterWithSubcontractor | (var SubContractorWorkCenterNo: Code[20]) | 28-29 | - | - |
| Internal event | OnBeforeShowCreatedPurchaseOrder | (ProdOrderNo: Code[20]; NoOfCreatedPurchOrder: Integer; var IsHandled: Boolean) | 28-29 | - | - |

## Source

Symbols: Microsoft.Subcontracting.symbols.1f32a50d-0057-4b95-b5df-cc04d7e89470, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 408a4cc8d3a4c54b60464cc14c964479facb9ba0.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
