| Status |
| |
|---|---|---|
| Owner | AROKIARAJAN-ext, Francis | |
| Stakeholders | ||
| Jira Request ID | ERP-640537 Outbound Delivery Distribution (LE to EWM) | |
| Jira Development ID | ERP-640 Outbound Delivery Distribution (LE to EWM) |
High- Level Specification
| Parameter | Value |
|---|---|
| Application System | SyWay S/4Hana ROW, S/4Hana China, S/4Hana CUI4HANA |
| 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. At the time of outbound delivery creation, system will try to allocate the batch based on the predefined rules
.- If any one of the line item batches not available during outbound delivery creation then Outbound delivery need to update (LIKP-VLSTK as ““) When the delivery is saved.
- Once all Line item batches are updated/determine during outbound delivery change then Outbound delivery need to update (LIKP-VLSTK as “A“) When the delivery is saved.
and distribution from S/4HANA to EWM is triggered when saving the delivery.
Enhancement to Check Distribute Outbound Delivery:
Once all the batches line item have been allocated to batches in outbound delivery , then allow to distribute the outbound delivery to EWM (Report: WS_MONITOR_OUTB_DEL_DIST)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. If no item has a batch (LIPS-CHARG is initial for all relevant items), update the delivery header field LIKP-VLSTK to blank (“ ”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 (document category
LF), across all shipping points unless otherwise restricted.relevant to Embedded EWM - Out of scope: Other delivery (Inbound deliveries, returns, shipments, stock transport deliveries unless explicitly included.Organizational scope: Global unless restricted via customizing IM outbound deliveries, return deliveries..etc).
Step | Description | Comment |
|---|---|---|
| 1 | Create Outbound Delivery Manually | An Automated check during Outbound Delivery processing that inspects all line items. if any item is for a batch‑managed material and the batch field is empty for EWM Relevant SLOC, the system must prevent distribution to EWM. |
| 2 | Create Outbound Delivery Via Batch Job | An Automated check during Outbound Delivery processing that inspects all line items. if any item is for a batch‑managed material and the batch field is empty for EWM Relevant SLOC, the system must prevent distribution to EWM. |
| 3 | Create Subcontracting Outbound Delivery | An Automated check during Outbound Delivery processing that inspects all line items. if any item is for a batch‑managed material and the batch field is empty for EWM Relevant SLOC, the system must prevent distribution to EWM. |
Assumptions
& Dependencies
- Materials that participate are batch‑managed (
MARA-XCHPF = 'X'). - Plants/storage locations are EWM‑relevant (/SCWM/TMAPSTLOC - mapped to EWM based on Plant/SLOC 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
To Implement an automated check during Outbound Delivery processing that inspects all line items. If no item has a batch (LIPS-CHARG is initial for all relevant items), update the delivery header field LIKP-VLSTK to blank (“ ”).
Proposed Technology to Use
User Exit (Classic):
- Include:
MV50AFZ1 - Exit:
USEREXIT_SAVE_DOCUMENT_PREPARE - Pros: Simple and widely used for delivery save logic.
- Cons: Procedural; ensure no conflict with other enhancements.
- Include:
BAdI (Preferred Modern):
- BAdI:
LE_SHP_DELIVERY_PROC - Method(s):
CHANGE_DELIVERY_HEADERorSAVE_DOCUMENT_PREPARE(depending on exact need) - Pros: Object-oriented, multiple implementations, filter capability (e.g., shipping point).
- BAdI:
Implicit enhancement / Exit in
SAPMV50Aflow:- Only if prior options are constrained.
Recommendation: Use LE_SHP_DELIVERY_PROC with method SAVE_DOCUMENT_PREPARE to evaluate items and set header before commit.
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).
Note: For batch split, the main item’s batch is expected to be blank; validate each batch split subitem instead.
- Enhancement Spot:
ES_LE_SHP_EXTEND - BADI:
LE_SHP_CHECK_DISTRIBUTION - Interface:
IF_LE_SHP_CHECK_DISTRIBUTION - Method:
CHECK_DISTRIBUTION(parameters includeDELIVERY_DOCUMENT_IN,DELIVERY_DOCUMENT_ITEMS_IN,MESSAGES,DISTRIBUTION_NOT_ALLOWED_OUT).
Data Source Data Source Considerations| Table | Field Name | Comments/Calculation/Field Manipulation |
|---|---|---|
LIKP | VBTYP | delivery Header (Document Category) |
LIPS | MATNRVLSTK | delivery header items (StatusMaterial) |
LIPS | CHARG | delivery items (Batch) |
LIPS | WERKS | delivery items (Plant) |
LIPS | MATNRLGORT | delivery items (Storage Location) |
MARA | XCHPF | Material Master (Batch Management Indicator) |
Data Validation Considerations
| Table | Field Name | Comments/Calculation/Field Manipulation |
|---|---|---|
| LIKP | VBTYP | If LIKP-VBTYP = 'J" then only apply the following conditions |
| LIPS | MATNR | To check Material Batch Management Indicator (MARA-XCHPF) as 'X' then apply the following conditions |
| LIPS | WERKS & LGORT | If LIPS-WERKS & LIPS-LGORT is EWM Relevant then only apply the following conditions |
Custom Tables
Not Applicable
Master Data
| Field | Description | Data Type/Length | Validation rule/ Value Help |
|---|---|---|---|
Configuration Table
| Field | Description | Data Type/Length | Validation rule/ Value Help |
|---|---|---|---|
Selection Screen Enhancement
| Field Name | Description | Select: | Data Type/Length | Default Value/ Validation rule/ Value Help | Selection 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
SELECTforMARA-XCHPFwithFOR ALL ENTRIES. - Early exit as soon as one batch is found.
Error Handling
- Info message (optional):“No batch allocated in any batch-relevant item; header status set to blank.: “Batch missing on at least one batch-managed item; distribution to EWM blocked”
- No hard error. Do : Do not block save unless explicitly required.
- Logging: Add to application log (
BAL) with objectLEand sub objectDELIVERY.
Testing
How to Test
All items batch-relevant, none with batch:
- Expect:
LIKP-VLSTK = ' 'set on save.
- Expect:
Mixed: batch-relevant + non-relevant items; none of the relevant have batch:
- Expect:
LIKP-VLSTK = ' 'set.
- Expect:
At least one batch-relevant item has
CHARGset:- Expect:
LIKP-VLSTKunchanged.
- Expect:
All items non-batch-relevant:
- Expect:
LIKP-VLSTKunchanged (business can choose to still set blank—confirm).
- Expect:
After PGI:
- Ensure enhancement does not reset the field post-PGI (confirm trigger points).
Mass change / background job:
- Batch job processing should apply same logic.
Test Conditions and Expected Results
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
| ID | Condition | Expected Result | |||
|---|---|---|---|---|---|
| TS1 | Block distribution when one item missing batch: Create a 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 ( | 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 ( | Distribution proceeds; ODO appears in EWM monitor /SCWM/MON or /SCWM/PRDO. | ID | Condition | Expected Result
Test Considerations/Dependencies
Other Information
Development Details
Package
| Package Name | Parent Package |
|---|---|
Enhancement Implementation
| Enhancement Type | Standard Definition Name | Custom Implementation Name | Design Rationale Reference |
|---|---|---|---|
Other Development Objects
| Object Type | Object Name | Purpose/High Level Logic | Design 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 | ZFI | ZMM | ZPS | ZCO | ZSD | ZBC | ZFI | ZCA |
|---|---|---|---|---|---|---|---|---|
| TABLES | ZFIT | ZMMT | ZPST | ZCOT | ZSDT | ZBCT | ZFIT | ZCAT |
See also
| Attachments | ||||||
|---|---|---|---|---|---|---|
|
Change log
| Change History | ||
|---|---|---|
|
