Status

OwnerAROKIARAJAN-ext, Francis 
Stakeholders
Jira Request IDERP-640
Jira Development IDERP-640    Outbound Delivery Distribution (LE to EWM)

High- Level Specification

ParameterValue
Application SystemSyWay S/4HANA
Business Process Reference

06.10.03.01. Manage Outbound Deliveries

Functional Overview

Outbound Delivery creation will be happened through Manual/background job, which will be run periodically to automatically determine the suitable batch (Deliveries can have more than one batch)At the time of outbound delivery creation, system will try to allocate the batch based on the predefined rules and distribution from S/4HANA to EWM is triggered when saving the delivery. 

SAP provides a standard BADI LE_SHP_CHECK_DISTRIBUTION that is called immediately before save and allows explicitly blocking distribution by setting DISTRIBUTION_NOT_ALLOWED_OUT (interface IF_LE_SHP_CHECK_DISTRIBUTION). In S/4HANA Cloud environments (and applicable to Private Cloud clean‑core designs)


Distribute Outbound Delivery:

Once all the line item have been allocated batches to outbound delivery, distribute the outbound delivery to EWM for those only relevant for deliveries with storage locations active for EWM.

Note: the distribution is for the whole outbound delivery, not for the individual delivery item.


Scope and Objectives

Objective
To Implement an automated check during Outbound Delivery processing that inspects all line items. When saving an outbound delivery, if any item is for a batch‑managed material and the batch field is empty, the system must prevent distribution to EWM (no ODO created; distribution status remains Relevant/Planned).

  • In scope: Outbound deliveries relevant to Embedded EWM
  • Out of scope: Other delivery (Inbound deliveries, IM outbound deliveries, return deliveries..etc).


Process Flow Diagram



Step

Description

Comment











Assumptions & Dependencies

  • Materials that participate are batch‑managed (MARA-XCHPF = 'X').
  • Plants/storage locations are EWM‑relevant (mapped to EWM via availability groups; standard integration active).

Security, Integrity and Controls

  • BADI implementation class must be transportable and accessible in the Private Cloud tenant.
  • No special end‑user auth needed beyond standard LE/EWM authorizations.


Configuration Requirements

Not Applicable


Language Requirements

Not Applicable

Special Requirements

Not Applicable


Design Rationale

Functional Requirements

When saving an outbound delivery (Document Category 'J'), if any line items (include Batch Spilt line also) Storage Location is relevant EWM and a batch‑managed material and the batch field is empty, 
the system must prevent distribution to EWM (no ODO created; distribution status remains Relevant/Planned).

  • Enhancement Spot: ES_LE_SHP_EXTEND
  • BADI: LE_SHP_CHECK_DISTRIBUTION
  • Interface: IF_LE_SHP_CHECK_DISTRIBUTION
  • Method: CHECK_DISTRIBUTION (parameters include DELIVERY_DOCUMENT_IN, DELIVERY_DOCUMENT_ITEMS_IN, MESSAGES, DISTRIBUTION_NOT_ALLOWED_OUT). 

Data Source Considerations


TableField NameComments/Calculation/Field Manipulation
LIKPVBTYPdelivery Header (Document Category)
LIPSMATNRdelivery items (Material)
LIPSCHARGdelivery items (Batch)
LIPSWERKSdelivery items (Plant)
LIPSLGORTdelivery items (Storage Location)
MARAXCHPFMaterial Master (Batch Management Indicator)



Data Validation Considerations

Include an overview of the data validation requirement. Can be deleted if not needed.

TableField NameComments/Calculation/Field Manipulation
LIKPVBTYPIf LIKP-VBTYP = 'J" then only apply the following conditions
LIPSMATNRTo check Material Batch Management Indicator (MARA-XCHPF) as 'X' then apply the following conditions 
LIPSWERKS & LGORTIf LIPS-WERKS & LIPS-LGORT is EWM Relevant then only apply the following conditions  




Custom Tables

Not Applicable

Master Data

<Title Custom Table 1>

<Include an overview of the table and what it’s used for>

FieldDescriptionData Type/LengthValidation rule/ Value Help









Configuration Table

Title Configuration Table 1

Include an overview of the table and what it’s used for

FieldDescriptionData Type/LengthValidation rule/ Value Help








Selection Screen Enhancement

This section will give the details on the selection screen parameters, parameter type and whether it’s obligatory or not. This section can be used to define the Import Export parameters for Function Module or User Exit or Screens. Can be deleted if not needed.

Field NameDescription

Select:

Option or Parameter

Check box or Radio button

Import or Export

Data Type/LengthDefault Value/ Validation rule/ Value HelpSelection Logic













Processing Logic

To apply the following Logic at METHOD (CHECK_DISTRIBUTION) in interface (IF_LE_SHP_CHECK_DISTRIBUTION) 


1) To check the Scope to Outbound Delivery only based on Document Category (J) of Delivery. If LIKP-VBTYP <> 'J" then RETURN. otherwise continue

  
 2) Loop all items of delivery to check EWM Relevant and batch-managed material based on Plant & Storage Location combination and Material master Batch Management Indicator (MARA-XCHPF)  
  
    If  batch-managed material (MARA-XCHPF) = "X" then check Batch not allocated  in Delivery item.

    If it is not allocated then update Block distribution as TRUE otherwise FALSE 


3) If there is Block distribution as TRUE then

    Update DISTRIBUTION_NOT_ALLOWED_OUT = TRUE

                 MESSAGE =  "Batch missing on at least one batch-managed item; distribution to EWM blocked" with MSGID="VL' MSGNO = '000' MSGTY = 'E'.  
    
  

Volumetrics

Not Applicable


Performance Considerations

  • Use in-memory item tables where possible.
  • Single SELECT for MARA-XCHPF with FOR ALL ENTRIES.
  • Early exit as soon as one batch is found.



Error Handling

  • Info message : Batch missing on at least one batch-managed item; distribution to EWM blocked
  • No hard error: Do not block save unless explicitly required.
  • Logging: Add to application log (BAL) with object LE and sub object DELIVERY.


Testing

How to Test

Create Outbound Deliveries (manual or via background jobs) with multiple line items, driven by EWM-relevant storage locations, supporting both Batch-Managed and Non-Batch-Managed materials.

Note: EWM distribution is applicable only when the Storage Location is EWM-relevant.


Test Conditions and Expected Results

IDConditionExpected Result
TS1

Block distribution when one item missing batch:

Create a Outbound delivery (LF) with two items; Item 10 batch‑managed, CHARG empty; Item 20 batch‑managed, CHARG filled and Save Outbound Delivery.


Distribution to EWM is prevented, error message shown; EWM ODO not created.
TS2

Allow distribution when all batches allocated:

Create a Outbound delivery (LF) with two items; where all batch‑managed items have CHARG filled and SAVE Outbound Delivery.

Distribution proceeds; ODO appears in EWM monitor /SCWM/MON or /SCWM/PRDO.
TS3

Re‑distribution after correction:

Change Outbound Delivery for outbound delivery previously distributed Erroneously (From TS1) and allocate Batch & SAVE Outbound Delivery.

Distribution proceeds; ODO appears in EWM monitor /SCWM/MON or /SCWM/PRDO.

TS4

Non‑batch material:

Create a Outbound delivery (LF) with two items;  Where all items non‑batch materials only and SAVE Outbound Delivery.

Distribution proceeds; ODO appears in EWM monitor /SCWM/MON or /SCWM/PRDO.


Test Considerations/Dependencies

List any considerations essential for application test planning (e.g., test this before ABC along with DEF separate from GHI). If the development encompasses a user interface, explain how to test it. List any insights as to how this component could be tested the most efficiently.


Other Information


Development Details

Package

Package NameParent Package




Enhancement Implementation

Enhancement TypeStandard Definition NameCustom Implementation NameDesign Rationale Reference









Other Development Objects

Object TypeObject NamePurpose/High Level LogicDesign Rationale Reference








Appendix

Custom Authorization Group Naming Convention

This table is based on the Syensqo development standards document. It provides the naming conventions for authorization groups to associated with custom reports and tables to comply with security requirements.

ABAP

ZFIZMMZPSZCOZSDZBCZFIZCA
TABLESZFITZMMTZPSTZCOTZSDTZBCTZFITZCAT

See also

Insert links and references to other documents which are relevant when trying to understand this decision and its implications. Other decisions are often impacted, so it's good to list them here with links. Attachments are also possible but dangerous as they are static documents and not updated by their authors.


Change log