SAP Knowledge Base Article - Public

3456532 - Customer reference number not copied from Quotation to Sales order - S/4HANA Cloud

Symptom

When creating the sales order referencing to a quotation, Customer Reference number is not copied from Quotation to Sales order. 

Environment

SAP S/4HANA Cloud 2402

Reproducing the Issue

  1. Open app Create Sales Order
  2. Create a sales order with referent to a quotation
  3. Customer Reference number is not copied from quotation to sales order

Cause

Standard behavior.

Resolution

Implement some custom logic to meet the business need. Refer to below document and follow the general steps.

Custom Logic: Data Transfer and Copying Requirements for Sales Documents
https://help.sap.com/docs/SAP_S4HANA_CLOUD/a376cd9ea00d476b96f18dea1247e6a5/d309fa912946447ab9bca5a813c9515c.html?locale=en-US

  1. With the Custom Logic app, implement custom logic for the following Business Add-Ins (BAdIs) and assign a unique filter value to it:

    Business Add-In (BAdI)Business Context
    Data Transfer for Sales Document HeadersSales: Sales Document
     
  2. Make the following settings in your configuration environment:

    1. Perform the Define Data Transfer and Copying Requirements for Sales Documents configuration activity for the implementation type Business Add-In (BAdI): You can define a routine number for the following process enhancement options:

      • Data Transfer for Sales Document (Header)

Steps and sample code for your reference:

1. Implement BAdI Data Transfer for Sales Document Headers (SD_SLS_DATA_TRANSFER_HEAD) via Custom Logic app in the following way

  1. Choose an Enhancement ID (will be used in SSCUI 103089 later)


  2. Insert the following Coding to get Customer Reference from Quotation

*   First of all assign existing field values to output parameter:
move-corresponding salesdocument_in to salesdocument_out.

*   Read Customer Reference from preceeding document
Select single purchaseorderbycustomer from I_SalesQuotation with privileged access where salesquotation = @salesdocument_in-referencesddocument  into @salesdocument_out-purchaseorderbycustomer.

2. Configure Customizing

  1. Configuration activity 103089: Define Data Transfer and Copying Rqmts for Sales Document


  2. Configuration activity 102905: Set Copying Control: Sales Document to Sales Document

Keywords

KBA , SD-SLS-SO-2CL , Sales Orders (Public Cloud) , Problem

Product

SAP S/4HANA Cloud 2402