Status

  Approved

OwnerABOLAJI-ext, Luqman 
Stakeholders
Jira Request ID

ERP-1424 - Getting issue details... STATUS

Jira Development ID

ERP-2324 - Getting issue details... STATUS

High- Level Specification

Implementing SystemSAP S/4HANA
Invoked by/InvokesERP-2325 OrderChange Message from Elemica - Integration Process
Business Process Reference02.04.02.01. Manage Standard Sales Order


Functional Overview

The functional design of the system interface defines the API to be provided or consumed. 

EDI customers sends their Sales Order change message through Elemica to Syensqo. Elemica sends the OrderChange XML to SAP CPI. SAP CPI then triggers a custom API to compare a predefined subset of the OrderChange fields with their corresponding subset of fields in the existing Sales Order fields and identifies the fields that the OrderChange message is requesting to change. The Sales Order and the fields where new values are sent in the OrderChange message are then sent to the Order Modification Fiori App for CSR review and approval / rejection.  A notification is also sent to the CSR on the sales order with the changes requested by the customer. 

The purpose of this functional specification is to create the custom API for the identification of the changes to a sales order requested by the customer and sending notification of the changes to the CSR. This will be done by using

  1. data directly available in the Elemica XML
  2. data derived from S/4HANA based on data in the Elemica XML (e.g. using the Purchase Order Number in Elemica XML to find the Sales Order Number in S/4HANA)
  3. data directly pulled from S/4HANA (e.g. Sales Order Number and specific sales order fields)

Scope and Objectives

This System Interface, a custom implementation in SAP S/4HANA,

  • consumes the OrderChange data from SAP CPI
  • maps this data into a structure to compare with existing sales order in SAP S/4HANA
  • transform some data OrderChange message from SAP CPI into the Sales Order structure in S/4HANA
  • performs lookup of specified data (as applicable) in S/4HANA
  • stage certain data from OrderChange message from SAP CPI into a S/4HANA custom table

The standard SAP Sales Order Change API is unable to support the above functions, hence the need for a custom API.

Process Flow Diagram

Step

Description

Comment

1

Elemica sends OrderChange message to SAP CPI via API Management

  1. No system interface functional specification is required for Elemica as the approach is to keep as-is the process on the Elemica side for the SyWay project. 
  2. API Management is for security/routing and do not change the message structure or format

2

SAP CPI receives the OrderChange XML message from Elemica and maps to SAP Sales Order in S/4HANA. To identify the fields on the sales order the OrderChange message wants to make, SAP CPI calls the custom API 

This is covered in Integration Process functional specification  ERP-2325 OrderChange Message from Elemica - Integration Process

3

The Sales Order to be changed in SAP S/4HANA is identified based on the custom API calling SAP S/4HANA. The API also collates the fields in the sales order that needs to be changed and sends this to both the Order Modification Fiori App and as a Fiori Launchpad notification to the CSR

Order Modification Fiori App to be built in ERP-2326 New Order Modification Fiori App

Assumptions

  1. The custom Sales Order Change API will be called from SAP CPI and be able to lookup data from SAP S/4HANA to feed the target structure of the sales order
  2. The source object and S/4HANA System target field mappings, including custom fields, will be updated based on mapping requirements in S/4HANA System.
  3. The Custom API should be able to map all source and target mappings to successfully create a sales order
  4. The custom API should be able to send Fiori launchpad notifications to CSR identified on the sales order

Dependencies

  1. All configurations in S/4HANA from where the custom API should look up values should already be implemented before the interface is deployed.
  2. Connection between SAP CPI and S/4HANA already set up
  3. Required master data in S/4HANA already loaded
  4. Part of the staging table is updated based on outcome of user interface processing per ERP-2326 New Order Modification Fiori App

Security, Integrity and Controls

  • Required authorisations to execute the custom API need to be defined.
  • Existing secure connectivity for communication between SAP S/4HANA and SAP CPI will be applied.

Configuration Requirements

N/A

Special Requirements

N/A


Design Rationale

API Use

Custom API based on API_SALES_ORDER_SRV_0001 

Data Structure

The following fields will be used to provide the required data structure of the interface:

Field mapping is mentioned on  ERP-2097.

A_SalesOrderHeader1





DocumentIdentifier
NString


DocumentIdentifierDateTime
NDateTime


RequestingDocumentIdentifier
NString


RequestingDocumentDateTime
NDateTime


SenderPartnerName
YString


SenderDUNS
YString


SenderContactName
NString


SenderContactDescription
NString


SenderTelephoneNumberTelecomCountryCode
NString


SenderTelephoneNumberTelecomAreaCode
NString

 SenderTelephoneNumberPhoneNumber
NString

 SenderFaxNumberTelecomCountryCode
NString


SenderFaxNumberTelecomAreaCode
NString


SenderFaxNumberPhoneNumber
NString


SenderEmailAddress
NString


SenderAlternativeCommunicationMethod
NString


SenderAddressLine
NString


SenderCityName
NString


SenderStateProvince
NString


SenderPostalCode
NString


SenderPostalCountry
NString


SenderLocationCode
NString


SenderTaxIdentifierNumber
NString


SenderJurisdiction
NString


SenderTaxCertificateType
NString


SenderTaxCertificateNumber
Nstring


SenderTaxBasis
Nstring


SenderTaxRate
Nstring


SenderSenderURL
Nstring


ReceiverPartnerName
Ystring


ReceiverDUNS
YString


ReceiverContactName
NString


ReceiverContactDescription
NString


ReceiverTelephoneNumberTelecomCountryCode
NString


ReceiverTelephoneNumberTelecomAreaCode
NString


ReceiverTelephoneNumberPhoneNumber
NString


ReceiverFaxNumberTelecomCountryCode
NString


ReceiverFaxNumberTelecomAreaCode
NString


ReceiverFaxNumberPhoneNumber
NString


ReceiverEmailAddress
NString


ReceiverAlternativeCommunicationMethod
NString


ReceiverAddressLine
NString


ReceiverCityName
NString


ReceiverStateProvince
NString


ReceiverPostalCode
NString


ReceiverPostalCountry
NString


ReceiverLocationCode
NString


ReceiverTaxIdentifierNumber
NString


ReceiverJurisdiction
NString


ReceiverTaxCertificateType
NString


ReceiverTaxCertificateNumber
NString


ReceiverTaxBasis
NString


ReceiverTaxRate
NString


ReceiverSenderURL
NString


PurchaseOrderTypeCode
YString


CustomerPurchaseOrderCustomer reference number that the customer uses to uniquely identify a purchasing document (for example, a sales inquiry or a purchase order)YString


CustomerPurchaseOrderDate
YDateTime


TransactionCurrencyThe currency that applies to the sales order

N

String


ContractNumberCustomer reference number that the customer uses to uniquely identify a purchasing document (for example, a sales inquiry or a purchase order)NString


LanguageCode

N

String


RevisionNumber

N

String


ReleaseNumber

N

String


IncotermsClassificationCommonly used trading terms that comply with the standards established by the International Chamber of Commerce (ICC)

N

String


IncotermsLocation1Provides additional information for the primary Incoterm

N

String


CustomerPaymentTerms

N

String


DiscountPercentage

N

String


DiscountAmount

N

String


DiscountDaysDue

N

String


DiscountsDueDate

N

DateTime


DeferredAmount

N

String


DeferedDueDate

N

DateTime


PercentDeferredPayable

N

String


Penalty

N

String


ShipWithPurchaseOrder

N

String


CountryOfFinalDestination

N

String


MarketPlaceIdentifier

N

String


MarketPlaceDocumentIdentifier

N

String


MarketPlaceReferenceItem

N

String


MarketPlaceSellerIdentifier

N

String


InvoiceCommunicationMode

N

String


BillingScheduleCode

N

String


BuyerPartnerNameThe customer who orders the goods or services. The sold-to party is contractually responsible for sales orders.

Y

String


BuyerPartnerCode

Y

String


BuyerContactName
NString


BuyerContactDescription

N

String


SellerPartnerName
NString


SellerPartnerCode

Y

String


SellerContactName
NString


SellerContactDescription
NString


ShiptoPartnerName
NString


ShipToPartnerCode

Y

String


PayerPartnerName
NString


PayerPartnerCode

N

String


BilltoPartnerName
NString


BillToPartnerCode

N

String


ShipperPartnerName
NString


ShipperPartnerCode

N

String


ShipFromPartnerName
NString


ShipFromPartnerCode

N

String


CarrierPartnerName
NString


CarrierPartnerCode

N

String


BuyerTelephoneNumberTelecomCountryCode
NString


BuyerTelephoneNumberTelecomAreaCode
NString


BuyerTelephoneNumberPhoneNumber
NString


BuyerFaxNumberTelecomCountryCode
NString


BuyerFaxNumberTelecomAreaCode
NString


BuyerFaxNumberPhoneNumber
NString


BuyerEmailAddress
NString


BuyerAlternativeCommunicationMethod
NString


BuyerAddressLine
NString


BuyerCityName
NString


BuyerStateProvince
NString


BuyerPostalCode
NString


BuyerPostalCountry
NString


BuyerLocationCode
NString


BuyerExternalReference
NString


BuyerTaxIdentifierNumber
NString


BuyerJurisdiction
NString


BuyerTaxCertificateType
NString


BuyerTaxCertificateNumber
NString


BuyerTaxBasis
NString


BuyerTaxRate
NString


BuyerSenderURL
NString


ShipToTelephoneNumberTelecomCountryCode
NString


ShipToTelephoneNumberTelecomAreaCode
NString


ShipToTelephoneNumberPhoneNumber
NString


ShipToFaxNumberTelecomCountryCode
NString


ShipToFaxNumberTelecomAreaCode
NString


ShipToFaxNumberPhoneNumber
NString


ShipToEmailAddress
NString


ShipToAlternativeCommunicationMethod
NString


ShipToAddressLine
NString


ShipToCityName
NString


ShipToStateProvince
NString


ShipToPostalCode
NString


ShipToPostalCountry
NString


ShipToLocationCode
NString
 
ShipToExternalReference
NString
 
ShipToTaxIdentifierNumber
NString


ShipToJurisdiction
NString


ShipToTaxCertificateType
NString


ShipToTaxCertificateNumber
NString


ShipToTaxBasis
NString


ShipToTaxRate
NString


ShipToSenderURL
NString


PayerTelephoneNumberTelecomCountryCode
NString


PayerTelephoneNumberTelecomAreaCode
NString


PayerTelephoneNumberPhoneNumber
NString


PayerFaxNumberTelecomCountryCode
NString


PayerFaxNumberTelecomAreaCode
NString


PayerFaxNumberPhoneNumber
NString


PayerEmailAddress
NString


PayerAlternativeCommunicationMethod
NString


PayerAddressLine
NString


PayerCityName
NString


PayerStateProvince
NString


PayerPostalCode
NString


PayerPostalCountry
NString


PayerLocationCode
NString


PayerExternalReference
NString


PayerTaxIdentifierNumber
NString


PayerJurisdiction
NString


PayerToTaxCertificateType
NString


PayerTaxCertificateNumber
NString


PayerTaxBasis
NString


PayerTaxRate
NString
 
PayerSenderURL
NString


AccountHolderName
NString


AccountNumber
NString


FinancialInstitution
NString


FinancialInstitutionDFINumber
NString


CreditCardNumber
NString


CreditCardType
NString


CreditCardExpirationDate
NDateTime


BillToTelephoneNumberTelecomCountryCode
NString


BillToTelephoneNumberTelecomAreaCode
NString


BillToTelephoneNumberPhoneNumber
NString


BillToFaxNumberTelecomCountryCode
NString


BillToFaxNumberTelecomAreaCode
NString
 
BillToFaxNumberPhoneNumber
NString


BillToEmailAddress
NString


BillToAlternativeCommunicationMethod
NString


BillToAddressLine
NString


BillToCityName
NString


BillToStateProvince
NString


BillToPostalCode
NString


BillToPostalCountry
NString


BillToLocationCode
NString


BillToExternalReference
NString


BillToTaxIdentifierNumber
NString
 
BillToJurisdiction
NString
 
BillToTaxCertificateType
NString
 
BillToTaxCertificateNumber
NString
 
BillToTaxBasis
NString
 
BillToTaxRate
NString
 
BillToSenderURL
NString


ShipFromTelephoneNumberTelecomCountryCode
NString


ShipFromTelephoneNumberTelecomAreaCode
NString


ShipFromTelephoneNumberPhoneNumber
NString


ShipFromFaxNumberTelecomCountryCode
NString


ShipFromFaxNumberTelecomAreaCode
NString
 
ShipFromFaxNumberPhoneNumber
NString


ShipFromEmailAddress
NString


ShipFromAlternativeCommunicationMethod
NString


ShipFromAddressLine
NString


ShipFromCityName
NString


ShipFromStateProvince
NString


ShipFromPostalCode
NString


ShipFromPostalCountry
NString


ShipFromLocationCode
NString


ShipFromExternalReference
NString


ShipFromTaxIdentifierNumber
NString
 
ShipFromJurisdiction
NString
 
ShipFromTaxCertificateType
NString
 
ShipFromTaxCertificateNumber
NString
 
ShipFromTaxBasis
NString
 
ShipFromTaxRate
NString
 
ShipFromSenderURL
NString


CarrierTelephoneNumberTelecomCountryCode
NString


CarrierTelephoneNumberTelecomAreaCode
NString


CarrierTelephoneNumberPhoneNumber
NString


CarrierFaxNumberTelecomCountryCode
NString


CarrierFaxNumberTelecomAreaCode
NString
 
CarrierFaxNumberPhoneNumber
NString


CarrierEmailAddress
NString


CarrierAlternativeCommunicationMethod
NString


CarrierAddressLine
NString


CarrierCityName
NString


CarrierStateProvince
NString


CarrierPostalCode
NString


CarrierPostalCountry
NString


CarrierLocationCode
NString


CarrierExternalReference
NString


CarrierTaxIdentifierNumber
NString
 
CarrierJurisdiction
NString
 
CarrierTaxCertificateType
NString
 
CarrierTaxCertificateNumber
NString
 
CarrierTaxBasis
NString
 
CarrierTaxRate
NString
 
CarrierSenderURL
NString


ShipperTelephoneNumberTelecomCountryCode
NString


ShipperTelephoneNumberTelecomAreaCode
NString


ShipperTelephoneNumberPhoneNumber
NString


ShipperFaxNumberTelecomCountryCode
NString


ShipperFaxNumberTelecomAreaCode
NString
 
ShipperFaxNumberPhoneNumber
NString


ShipperEmailAddress
NString


ShipperAlternativeCommunicationMethod
NString


ShipperAddressLine
NString


ShipperCityName
NString


ShipperStateProvince
NString


ShipperPostalCode
NString


ShipperPostalCountry
NString


ShipperLocationCode
NString


ShipperExternalReference
NString


ShipperTaxIdentifierNumber
NString
 
ShipperJurisdiction
NString
 
ShipperTaxCertificateType
NString
 
ShipperTaxCertificateNumber
NString
 
ShipperTaxBasis
NString
 
ShipperTaxRate
NString
 
ShipperSenderURL
NString
A_SalesOrderText1 to many
 



CustomerRequiredInstructions NString


ShipperInstructions
NString


ConsigneeInstructions
NString

 CarrierInstructions
NString


ImportInstruction NString


CustomerServiceInstructions NString


RoutingInstruction
NString
A_SalesOrderItem1 


  LineItemNumber
NString


PurchaseOrderLineItemNumber
NString

 LineItemHandlingInstruction
NString

 MaterialByCustomer

YString

 MaterialByCustomerDescription
NString
  ProductDescription
NString
  ProductGradeDescription
NString
  Material
MString
  MaterialDescription
NString
  ProductDescription
NString
  ProductGradeDescription
NString
  CustomerPurchaseOrderNumber
NString
  ReferenceItem
NString
  RequestedQuantityThe number or volume of materials specified for an itemNString
 
RequestedQuantityISOUnit
NString
 
PackagingQuantity
NString
 
PackagingQuantityISOUnit
NString
 
EngineeringChangeOrderIdentifier
NString
 
BatchNumber
NString
 
CountryOfOriginCode
NString
 
IncotermsClassification
NString
 
IncotermsLocation1
NString
 
TransportMethodCode
NString
 
LineItemPurposeCode
NString
 
BalanceItemFlag
NString
 
ActionRequest
NString
 
DeliveryTolerancesLowerLimit
NString
 
DeliveryTolerancesUpperLimit
NString
 
DeliveryTolerancesUnitofMeasure
NString


ItemShiptoPartnerName
NString


ItemShipToPartnerCode

Y

String


ItemBilltoPartnerName
NString


ItemBillToPartnerCode

N

String


ItemShipperPartnerName
NString


ItemShipperPartnerCode

N

String


ItemShipFromPartnerName
NString
 
ItemShipFromPartnerCode

N

String
 
ItemCarrierPartnerName
NString
 
ItemCarrierPartnerCode

N

String


ItemShipToTelephoneNumberTelecomCountryCode
NString


ItemShipToTelephoneNumberTelecomAreaCode
NString


ItemShipToTelephoneNumberPhoneNumber
NString


ItemShipToFaxNumberTelecomCountryCode
NString


ItemShipToFaxNumberTelecomAreaCode
NString


ItemShipToFaxNumberPhoneNumber
NString


ItemShipToEmailAddress
NString


ItemShipToAlternativeCommunicationMethod
NString


ItemShipToAddressLine
NString


ItemShipToCityName
NString


ItemShipToStateProvince
NString


ItemShipToPostalCode
NString


ItemShipToPostalCountry
NString


ItemShipToLocationCode
NString
 
ItemShipToExternalReference
NString
 
ItemShipToTaxIdentifierNumber
NString


ItemShipToJurisdiction
NString


ItemShipToTaxCertificateType
NString


ItemShipToTaxCertificateNumber
NString


ItemShipToTaxBasis
NString


ItemShipToTaxRate
NString


ItemShipToSenderURL
NString


ItemBillToTelephoneNumberTelecomCountryCode
NString


ItemBillToTelephoneNumberTelecomAreaCode
NString


ItemBillToTelephoneNumberPhoneNumber
NString


ItemBillToFaxNumberTelecomCountryCode
NString


ItemBillToFaxNumberTelecomAreaCode
NString
 
ItemBillToFaxNumberPhoneNumber
NString


ItemBillToEmailAddress
NString


ItemBillToAlternativeCommunicationMethod
NString


ItemBillToAddressLine
NString


ItemBillToCityName
NString


ItemBillToStateProvince
NString


ItemBillToPostalCode
NString


ItemBillToPostalCountry
NString


ItemBillToLocationCode
NString


ItemBillToExternalReference
NString


ItemBillToTaxIdentifierNumber
NString
 
ItemBillToJurisdiction
NString
 
ItemBillToTaxCertificateType
NString
 
ItemBillToTaxCertificateNumber
NString
 
ItemBillToTaxBasis
NString
 
ItemBillToTaxRate
NString
 
ItemBillToSenderURL
NString


ItemShipFromTelephoneNumberTelecomCountryCode
NString


ItemShipFromTelephoneNumberTelecomAreaCode
NString


ItemShipFromTelephoneNumberPhoneNumber
NString


ItemShipFromFaxNumberTelecomCountryCode
NString


ItemShipFromFaxNumberTelecomAreaCode
NString
 
ItemShipFromFaxNumberPhoneNumber
NString


ItemShipFromEmailAddress
NString


ItemShipFromAlternativeCommunicationMethod
NString


ItemShipFromAddressLine
NString


ItemShipFromCityName
NString


ItemShipFromStateProvince
NString


ItemShipFromPostalCode
NString


ItemShipFromPostalCountry
NString


ItemShipFromLocationCode
NString


ItemShipFromExternalReference
NString


ItemShipFromTaxIdentifierNumber
NString
 
ItemShipFromJurisdiction
NString
 
ItemShipFromTaxCertificateType
NString
 
ItemShipFromTaxCertificateNumber
NString
 
ItemShipFromTaxBasis
NString
 
ItemShipFromTaxRate
NString
 
ItemShipFromSenderURL
NString


ItemCarrierTelephoneNumberTelecomCountryCode
NString


ItemCarrierTelephoneNumberTelecomAreaCode
NString


ItemCarrierTelephoneNumberPhoneNumber
NString


ItemCarrierFaxNumberTelecomCountryCode
NString


ItemCarrierFaxNumberTelecomAreaCode
NString
 
ItemCarrierFaxNumberPhoneNumber
NString


ItemCarrierEmailAddress
NString


ItemCarrierAlternativeCommunicationMethod
NString


ItemCarrierAddressLine
NString


ItemCarrierCityName
NString


ItemCarrierStateProvince
NString


ItemCarrierPostalCode
NString


ItemCarrierPostalCountry
NString


ItemCarrierLocationCode
NString


ItemCarrierExternalReference
NString


ItemCarrierTaxIdentifierNumber
NString
 
ItemCarrierJurisdiction
NString
 
ItemCarrierTaxCertificateType
NString
 
ItemCarrierTaxCertificateNumber
NString
 
ItemCarrierTaxBasis
NString
 
ItemCarrierTaxRate
NString
 
ItemCarrierSenderURL
NString


ItemShipperTelephoneNumberTelecomCountryCode
NString


ItemShipperTelephoneNumberTelecomAreaCode
NString


ItemShipperTelephoneNumberPhoneNumber
NString


ItemShipperFaxNumberTelecomCountryCode
NString


ItemShipperFaxNumberTelecomAreaCode
NString
 
ItemShipperFaxNumberPhoneNumber
NString


ItemShipperEmailAddress
NString


ItemShipperAlternativeCommunicationMethod
NString


ItemShipperAddressLine
NString


ItemShipperCityName
NString


ItemShipperStateProvince
NString


ItemShipperPostalCode
NString


ItemShipperPostalCountry
NString


ItemShipperLocationCode
NString


ItemShipperExternalReference
NString


ItemShipperTaxIdentifierNumber
NString
 
ItemShipperJurisdiction
NString
 
ItemShipperTaxCertificateType
NString
 
ItemShipperTaxCertificateNumber
NString
 
ItemShipperTaxBasis
NString
 
ItemShipperTaxRate
NString
 
ItemShipperSenderURL
NString
A_SalesOrderItemText1 to many





CustomerRequiredInstructions NString


ShipperInstructions
NString


ConsigneeInstructions
NString

 CarrierInstructions
NString


ImportInstruction NString


CustomerServiceInstructions NString


RoutingInstruction
NString
A_SalesOrderItemPrElement

1







PricePerUnit
NString
 

 

PriceCurrencyCode
NString
 

 

PriceBasis
NString
 

 

PriceBasisUnitofMeasure
NString
A_SalesOrderScheduleLine

1

 






ScheduleDateRequestedDeliveryOn


NDateTime


ScheduleDateConfirmedPickUpOn


NDateTime




Calculation and Validation

N/A

eDocument mapping

N/A

GeneralSyensqo XML (Intermediate Target)SAP eDoc Standard Mapping (Source)Custom Mapping (Source)
S-NRFlow (SD/FI/MM/ALL)Target FieldTarget Field DetailsConditionSyensqo XML NodeSyensqo XML FieldSAP eDoc Standard NodeSAP eDoc Standard FieldFixed ValueCustom Logic




















Processing Logic

  1. Receive OrderChange API
  2. Look up the sales order number of the change using the Purchase Order number in OrderChange API (see Sales Order Look Up Logic)
    1. If sales order is found, go to step 3
    2. if sales order is not found, generate error message ‘no sales order found for PO number’ and update in AIF. Follow Error Handling procedure
  3. For each line item (A_salesOrderItem_ PurchaseOrderLineItemNumber) on the OrderChange API, check if A_SalesOrderItem_ActionRequest = DELETED exists
    1. If yes – find the corresponding line item(s) on the sales order from 2a, extract Order Items View data and update Line Status as ‘DELETED’
    2. If A_SalesOrderItem_ActionRequest = DELETED does not exists, go to step 4.

4. For each line item (A_salesOrderItem_ PurchaseOrderLineItemNumber) on the OrderChange XML, find the corresponding sales order line item and compare the data as per ‘Fields for Comparison’ table. If there are differences between them, populate the ‘Staging table'


Sales Order Look Up Logic using Purchase Order Number

Purchase Order Field in API structureLogic to Fetch Sales Order
A_SalesOrderHeader_CustomerPurchaseOrder

Sales Order = VBAK-VBELN where

VBAK-BSTNK =  A_SalesOrderHeader_CustomerPurchaseOrder

  

Order Items View (To be used in ERP-2326 New Order Modification Fiori App)  

Line

Product Details

Quantity in PU

Due Date

Pricing

Line Status

VBAP-POSNR

Buyer: <VBAP-KDMAT>

Seller: <VBAP-MATNR>

VBAP-KWMENG  " " VBAP-VRKME

<VBEP-EDATU>

where:

VBEP-VBELN = VBAK-VBELN
VBEP-POSNR = VBAP-POSNR

VBEP-BMENG <> 0 or blank

 

NetPrice: VBAP-NETPR " "  VBAP-KPEIN

See Line Status Logic


 Line Status Logic

  1. Check delivery status of the sales order line item.
    1. If VBAP-LFGSA=A (not yet processed), set Line status = Modif (can be done manually in SAP)
    2. If VBAP-LFGSA = B or C, set Line status = Modif (delivery already done in SAP)
  2. Check rejection if the sales order line item is rejected or not (VBAP-ABGRU = blank)
    1. if the sales order line item is not rejected, VBAP-ABGRU = blank, Modif (can be done manually in SAP)
    2. if the sales order line item is rejected, VBAP-ABGRU is not blank, Modif (item is rejected in SAP)

How to find changes requested from the OrderChange XML from Elemica

Comparison is made between a subset of the OrderChange XML fields and their corresponding values in the Sales Order. For the fields where the activation flag is ticked, where there is a difference, these fields are collated into a staging table (a database table) and passed into the Order Modification Fiori App (ERP-2326 New Order Modification Fiori App) structured into both a Fiori Launchpad notification (see notification logic section) and to update the App with the specific data of the sales order that needs to be changed 

Fields for Comparison:  OrderChange API vs Sales Order Line Item Fields

API FieldSales Order FieldActivation Flag
A_SalesOrderItem_RequestedQuantityVBAP-KWMENGX
A_SalesOrderItem_RequestedQuantityISOUnitVBAP-VRKMEX
A_SalesOrderItemPrElementPricePerUnit

VBAP-NETPR

X
A_SalesOrderItemPrElementPriceCurrencyCode

VBAP-KPEIN

X
A_SalesOrderScheduleLine_ScheduleDateRequestedDeliveryOnVBEP-EDATU

X


Staging table

This will be a database table, not user maintained but programmatically maintained with the sales order and the new values of the fields to be changed. This will be used by the ERP-2326 New Order Modification Fiori App to generate the sales orders where customer has requested changes and the new values 

Content of this table older than 30 (tbc) days should be automatically deleted (program to do this to be defined by Technical team as part of general house keeping)

Sales Order Number

(VBAK-VBELN)

Sales Order Line Item

(VBAP-POSNR)

Modification Request Date

(Date API XML is received)

Quantity (VBAP-KWMENG)

Unit of Measure

(VBAP-VRKME)

Delivery Date

(VBEP-EDATU)

Price

(VBAP-NETPR)

Price Currency

(VBAP-KPEIN)

Processed flagProcessed DateProcessing StatusProcessing Status Rejection Reason text
12341001.01.2027 2300

1220
x02.01.2027Modif: Processed
12341001.01.2027
KG


x02.01.2027Modif: RejectedDelivery created
45671001.02.2027
 01.03.2027

x02.02.2027Modif: Processed
























Additional Notes related to Staging Table

  1. For each Sales Order and Sales Order line items, values in columns Sales Order Number, Sales Order Line Item, Modification Request Date, Changed Field and New Value are used to update the Order Items contents in App Detailed View of the User Interface built in ERP-2326 New Order Modification Fiori App
  2. For each Sales Order and Sales Order line items, values in columns the Processed flag, Processed Date, Processing Status and Processing Status Rejection Reason text are updated from ERP-2326 New Order Modification Fiori App


Notification Logic

For every OrderChange message received, trigger a Fiori Launchpad notification to the CSR

Logic to find CSR for a sales order

Read VBPA-PERNR (get SAP user ID from this) where::

VBPA-VBELN = Sales order number

VBPA-PARVW = 'SE' for Sales Employee


Notification text: 

Title: EDI Order Modification Notice

Subtext: A modification for Order  <Sales Order> has been received

Clicking on the notification should take CSR into the details of the requested change (details in ERP-2326 New Order Modification Fiori App


Delta or Full Load Requirements

Interface Alert & Monitoring

The Odata service will be monitored through AIF as part of the monitoring strategy for the project.

Language Requirements

N/A

User Interface Requirements

N/A
 

Sequencing

N/A


Volumetrics

Approximately 300 Order Change requests per month

Performance Consideration

The design of the interface and related custom table(s) must be able to support the volume of  messages received.

Error Handling

Error handling for this interface to align with the error handling process for interfaces as defined for SyWay (exact approach / process yet to be defined and below are indicative only to be refined based on the defined approach)

Integration errors:

All errors occurring during mapping rule execution and during posting to be added to the application log and AIF in a readable and user understandable format. These errors should trigger incident creation in SyRa (tbc)

Data errors or errors in S4 during translation, logic execution etc:

These should trigger a Fiori launchpad notification to the CSR highlighting the error in an understandable format in addition to logging the error in AIF (to be defined exactly how users will access and reprocess these failed messages)

Testing

How to Test

Test Conditions and Expected Results

IDConditionExpected Results
1OrderChange XML received from SAP CPICustom API processes received OrderChange XML into the specified data structure 
2OrderChange XML from SAP CPI maps to Custom API structureCustom API structure is mapped successfully from received OrderChange XML
3Custom API executes defined logics and lookups in S/4HANA and returns a sales orderDefined logics and lookups in S/4HANA executed correctly and sales order is found and returned 
4OrderChange XML received for a sales order not yet created in SAP S/4HANALook up logic executed but no sales order is returned. Follow error handling procedure for sales order not found
5OrderChange XML received having line with ActionRequest = DELETEDOrder Item View generated with line status set as DELETED
6Sales Order found from OrderChange message has line items that is not rejected

In Order Item View, Line Status is set as Modif (change can be updated in SAP)

7Sales Order found from OrderChange message has line items that is rejected


In Order Item View, Line Status is set as Modif (item is rejected in SAP)
8Sales Order found from OrderChange message has line items that is delivered

In Order Item View, Line Status is set as Modif (delivery already done in SAP)

9Sales Order found from OrderChange message has line items that is not yet delivered

In Order Item View, Line Status is set as Modif (change can be updated in SAP)

10OrderChange XML is received with data that is same as the existing sales order (i.e. no change)

Comparison results in no difference between the OrderChange message and existing sales order. No data is passed on to staging table

Test Considerations/Dependencies


Other Information


Development Details

Package

Package NameParent Package




Other Development Objects

Object TypeObject NamePurpose/High Level LogicDesign Rationale Reference









Appendix

See also


No files shared here yet.

Change log

Version Published Changed By Comment
CURRENT (v. 27) Apr 28, 2026 12:31 TORRES-ext, Benedict
v. 26 Apr 28, 2026 12:12 TURAN-ext, Mert
v. 25 Apr 28, 2026 07:30 ABOLAJI-ext, Luqman
v. 24 Apr 22, 2026 16:27 ABOLAJI-ext, Luqman
v. 23 Apr 21, 2026 16:02 ABOLAJI-ext, Luqman
v. 22 Apr 21, 2026 15:08 ABOLAJI-ext, Luqman
v. 21 Apr 09, 2026 12:03 ABOLAJI-ext, Luqman
v. 20 Apr 09, 2026 11:52 WEINERT-ext, Patrick
v. 19 Apr 07, 2026 20:21 ABOLAJI-ext, Luqman
v. 18 Apr 04, 2026 20:42 ABOLAJI-ext, Luqman

Go to Page History