You are on page 1of 31

Version 1.

0 – July 2020

CUSTOMER

Cookbook for Dock Appointment Scheduling


Integration with External Systems
Integration of dock appointment scheduling functionality in SAP
Logistics Business Network with external systems using APIs

Applicable Releases:

SAP Logistics Business Network 2.0


SAP Cloud Platform
SAP S/4HANA 1910 Extended Warehouse Management
SAP Extended Warehouse Management 9.5 on SAP NetWeaver

Topic Area:

SAP Logistics Business Network, freight collaboration option – Dock Appointment


Scheduling
TABLE OF CONTENTS
HISTORY OF CHANGES .................................................................................................................................. 4
GETTING STARTED ......................................................................................................................................... 5
About this Document ................................................................................................................................. 5
SOLUTION IMPLEMENTATION ....................................................................................................................... 6
SAP LBN APIs in SAP API Business Hub ................................................................................................ 6
SOA Enterprise Service Consumers and Service Provider Creation ................................................... 7
Provider API for Dock Appointment Requests (GenericAppointment_In)................................. 7
Consumer API for Appointment Change Notification (GenericAppointment_Out) ................. 11
Provider API for Dock Appointment Cancellation (GenericAppointmentCancellation_In) 15
APPLICATION LOGIC IN EXTENDED WAREHOUSE MANAGEMENT ...................................................... 17
Business Process ..................................................................................................................................... 17
Automatic Implementation ................................................................................................................. 18
Provider API for Dock Appointment Request (GenericAppoinment_In) ........................................ 19
Manual Implementation ...................................................................................................................... 19
Enhance Transportation Unit ............................................................................................................. 19
Application Logic - UI Integration for LBN API Calls in EWM Warehouse Management Monitor
(Transaction /SCWM/MON) ........................................................................................................................ 21
Automatic Implementation ................................................................................................................. 21
Manual Implementation ...................................................................................................................... 22
Application Logic – Appointment Confirmation.................................................................................... 25
General Information ............................................................................................................................ 25
Setting up bgRFC inbound destination............................................................................................. 26
Automatic Implementation ................................................................................................................. 27
Manual Implementation ...................................................................................................................... 27
Setup Integration ...................................................................................................................................... 30

2
Figure 1 SAP API Business Hub: API Package for LBN Freight Collaboration option ............................... 6
Figure 2 Solution Architecture – LBN Integration with SAP TM and EWM via APIs .................................. 7
Figure 3 Create a New Enterprise Service Consumer ................................................................................ 8
Figure 4 Choose Service Generation Source ............................................................................................. 8
Figure 5 Generate Service Consumer by External WSDL - Local File ....................................................... 9
Figure 6 Generated Service Consumer by WSDL GenericAppointment_In ............................................. 10
Figure 7 SOAMANAGER: Consumer Proxy ZLBNCO_GENERIC_APPOINTMENT_IN ........................... 10
Figure 8 Create a New Consumer Proxy ................................................................................................... 11
Figure 9 Choose Service Provider ............................................................................................................ 12
Figure 10 Generate Service Consumer by external WSDL - Local File ...................................................... 13
Figure 11 Specify a Service Name .............................................................................................................. 14
Figure 12 Generated Service Consumer by WSDL GenericAppointment_In .............................................. 15
Figure 13 Create a New Enterprise Service Consumer ............................................................................... 16
Figure 14 Service Consumer generation by WSDL URL ............................................................................. 16
Figure 15 Service Consumer (Proxy) <prefix>CO_GENERIC_APPOINTMENT_CAN ............................... 17
Figure 16 SOAMANAGER: Consumer Proxy .............................................................................................. 17
Figure 17 Class Diagram for EWM - LBN-DAS Integration ......................................................................... 19
Figure 18 Mapping Table for Supply Chain Unit and (Docking) Location .................................................... 21
Figure 19 Type Adjustment to Generate Proxy Classes for GenericAppointmentCancellation_In ............. 21
Figure 20 EWM Monitor Customizing: Standard Monitor Nodes for TUs to Add LBN-DAS Extensions ..... 22
Figure 21 EWM Monitor Customizing: define node profiles for TU ............................................................ 23
Figure 22 Node Profile list structure /SCWM/S_WIP_SR_TU_HDR .......................................................... 23
Figure 23 Define Object Class Methods for Appointment Creation and Cancellation Request ................. 24
Figure 24 New Monitor Methods Inbound TU to Call LBN APIs GenericAppointment_In and
GenericAppointmentCancellation_In ............................................................................................................... 24
Figure 25 New Monitor Methods Outbound TU to Call LBN APIs GenericAppointment_In and
GenericAppointmentCancellation_In ............................................................................................................... 25
Figure 26 Transaction SRT_MONI showing outgoing and incoming SOA messages for
GenericAppointment_In | GenericAppointment_Out | GenericAppointmentCancellation_In .......................... 30
Figure 27 Updated Outbound TU after Appointment Confirmation (GenericAppointment_Out) ................. 30

3
HISTORY OF CHANGES
The following table provides an overview of the most important changes that have been made in the latest
versions.

Document Version Release Date Important Changes

1.0 July 2020 Initial version

4
GETTING STARTED

About this Document

This cookbook provides the information on integration of dock appointment functionality available in SAP
Logistics Business Network (SAP LBN) with one of the following backend applications:

• SAP Extended Warehouse Management (SAP EWM)


• Extended Warehouse Management (EWM) on SAP S/4HANA
• SAP Transportation Management (SAP TM)
• Transportation Management on SAP S/4HANA.

For this integration, SAP LBN offers APIs to perform the following:

• Create an appointment request in SAP LBN (GenericAppointment_In)


• Cancel an appointment request in SAP LBN (GenericAppointmentCancellation_In)
• Send the appointment information from SAP LBN to the external system
(GenericAppointment_Out)

This guide supports the following integration scenarios for SAP EWM and EWM on SAP S/4HANA:

• Create an appointment request from EWM Transportation Unit (TU)


• Cancel an appointment request from EWM TU
• Receive an appointment confirmation from SAP LBN and store the data on the EWM TU
• Cancel a confirmed appointment

This guide supports the following integration scenarios for SAP TM and TM on SAP S/4HANA:

• Receive an appointment confirmation from SAP LBN and store the data in the TM Freight Order (FO)
• Cancel a confirmed appointment

The creation or cancellation of an appointment request in SAP LBN based on a TM FO is already supported
in SAP TM standard (subcontracting process) and therefore not covered in this how-to-guide.

5
SOLUTION IMPLEMENTATION

SAP LBN APIs in SAP API Business Hub

To connect your TM on SAP S/4HANA or EWM on SAP S/4HANA with the dock appointment scheduling
functionality in SAP LBN, you must create an implementation in your S/4HANA system towards the
consumer and provider APIs.

The following SAP LBN dock appointment scheduling APIs are published in SAP API Business hub
https://api.sap.com/ in the API Package SAP Logistics Business Network, freight collaboration option:

• Consumer API for Dock Appointment Scheduling


• Provider API for Dock Appointment Scheduling
• Provider API for Dock Appointment Cancellation

The following is the direct link to the SAP LBN APIs:


https://api.sap.com/package/LbnFreightCollaborationTenderingSubcontracting?section=Artifacts

In addition, the LBN API calls must be integrated in your EWM/TM solution.

Figure 1 SAP API Business Hub: API Package for LBN Freight Collaboration option

6
Figure 2 Solution Architecture – LBN Integration with SAP TM and EWM via APIs

SOA Enterprise Service Consumers and Service Provider Creation

Provider API for Dock Appointment Requests (GenericAppointment_In)

The system calls the appointment request API, GenericAppointment_In in SAP LBN from EWM with an
outbound SOAP message. An event in EWM, such as a completion of planning of a TU, triggers the
message creation and sends it to the cloud solution.

To create a new enterprise consumer service, perform the following:

7
1. Download the WSDL file from https://api.sap.com/api/GenericAppointment_In/overview and create the
service consumer in the backend system via transaction SPROXY.

Figure 3 Create a New Enterprise Service Consumer

2. Choose the Generation Source as External WSDL/Schema

Figure 4 Choose Service Generation Source

8
3. Choose the Local File as the WSDL/Schema Source.

Figure 5 Generate Service Consumer by External WSDL - Local File

4. Specify a service name and namespace suffix. Adapt to your naming convention if needed.

5. Specify the package, transport, and so on. Finalize the service consumer creation.

9
6. Activate the new service consumer that also generated dynamic data types.

Figure 6 Generated Service Consumer by WSDL GenericAppointment_In

Create Logical Port for Consumer Proxy

Using transaction SOAMANAGER create a logical port for consumer proxy


<prefix>CO_GENERIC_APPOINTMENT_IN. This is required for the configuration of the connection in cloud
connector and the System Connections app in SAP LBN.

Figure 7 SOAMANAGER: Consumer Proxy ZLBNCO_GENERIC_APPOINTMENT_IN

10
Consumer API for Appointment Change Notification (GenericAppointment_Out)

The system calls the appointment request API, GenericAppointment_In in SAP LBN from EWM with
an outbound SOAP message. An event in EWM, such as a completion of planning of a TU, triggers the
message creation and sends it to the cloud solution.

To create a new enterprise consumer service, perform the following:

1. Download the WSDL file from https://api.sap.com/api/GenericAppointment_Out/overview and create


the consumer proxy in the backend system via transaction SPROXY.

Figure 8 Create a New Consumer Proxy

11
2. Choose the Kind of Service Provider as External WSDL/Schema.

Figure 9 Choose Service Provider

12
3. Choose the Local File as the WSDL/Schema Source.

Figure 10 Generate Service Consumer by external WSDL - Local File

4. Choose the downloaded file in the next screen.

5. Specify a service name and namespace suffix. Adapt to your naming convention if needed.

13
Figure 11 Specify a Service Name

6. Specify the package, transport, and so on. Finalize the service consumer creation.

7. Once the service is created, change the ABAP type of the elements AppointmentStartDateTime
and AppointmentEndDateTime to STRING and activate the proxy.

14
Figure 12 Generated Service Consumer by WSDL GenericAppointment_In

Provider API for Dock Appointment Cancellation (GenericAppointmentCancellation_In)

When an EWM Transportation Unit (TU) is updated with an appointment ID from SAP LBN, the system
creates a dock appointment in SAP LBN for the reference document TU.

When a TU is deleted in EWM, to trigger the cancellation request for the dock appointment in SAP LBN, you
must call the appointment cancellation request API. To enable this, the system uses an outbound SOAP
message from EWM to SAP LBN CPI (GenericAppointmentCancellation_In).

15
1. Download the WSDL file from https://api.sap.com/api/GenericAppointmentCancellation_In/overview
and create the service consumer in the backend system via transaction SPROXY.

Figure 13 Create a New Enterprise Service Consumer

2. Specify the WSDL/Schema URL

Figure 14 Service Consumer generation by WSDL URL

3. Service Consumer (Proxy) <prefix>CO_GENERIC_APPOINTMENT_CAN.

16
Figure 15 Service Consumer (Proxy) <prefix>CO_GENERIC_APPOINTMENT_CAN

Create Logical Port for Consumer Proxy

Using transaction SOAMANAGER create a logical port for consumer proxy


<prefix>CO_GENERIC_APPOINTMENT_CAN. This is required for the configuration of the connection in
cloud connector and the System Connections app in SAP LBN.

Figure 16 SOAMANAGER: Consumer Proxy

APPLICATION LOGIC IN EXTENDED WAREHOUSE MANAGEMENT

Though you can already create dock appointments in SAP LBN with reference to the freight orders in SAP
TM, creating dock appointments based on documents from external systems such as SAP TM or SAP EWM
was not standardized. With the APIs in SAP API Business Hub for SAP Logistics Business Network, freight
collaboration option, this integration is possible.

Business Process

The system calls the provider API for a dock appointment request in SAP LBN (GenericAppointment_In)
from EWM using an outbound SOAP message. An event in EWM, such as planning completion of a TU,
triggers the message creation and sends it to the cloud solution.

The system enables this through a new status Ready for LBN Appointment Planning. When this new status
is set, the system triggers the appointment request API GenericAppointment_In with a PPF action. The
scheduling condition of PPF action checks the status of the TU whenever it is saved. When it finds the new
status, it triggers the message creation and send it to SAP LBN.

17
It may not be a good idea to trigger the appointment request already when the TU is created. As TU will not
have any deliveries, carrier, dates and other prerequisite data. Also, when the first delivery is assigned, this
does not mean that the volume of the TU may remain like this. Therefore, sending the
GenericAppointment_In SOA message at TU creation, for an incompletely planned TU, will lead to lots of
messages towards LBN, that would be possibly rejected, or, if not rejected, would trigger lots of unnecessary
updates and workload, not only in the LBN system.

In this guide the simple approach is described to issue the request for Dock Appointment creation in LBN-
DAS from within the EWM Warehouse Management Monitor (Transaction /SCWM/MON).

That is, the list structures of the monitor node profiles for the Transportation Unit in WMS Monitor are
enhanced by the additional LBN-DAS fields, and new methods are created to create and send the SOA
messages for LBN GenericAppointment_In and GenericAppointmentCancellation_In.

As described in the API documentation of


SAP LBN APIs in SAP API Business Hub, there are some mandatory fields that must be filled with valid
values in the SOA message. You must also provide a valid docking location ID and the SAP LBN ID of the
shipper and the carrier for which the dock appointment shall be created.

As SAP EWM comes with an on-premise dock appointment scheduling solution already and as the TU object
in SAP EWM already consists of the Appointment Number and Loading Point fields, you can reuse the
data model of SAP EWM dock appointment scheduling. Note that if these fields in the TU are updated from
the inbound SAP LBN dock appointment (via the EWM Adapter implementation), the TU becomes invalid
and the system raises error messages.

Therefore, we recommend that you create a custom append structure for the TU database table and create a
new custom database table to map the Docking Locations and Loading Points to the EWM warehouse
number and doors.

You must define the same Docking Locations and Loading Points in LBN as well. You can only use
carrier and shipper business partners with a valid LBN ID (identification type LBN001), that are already
onboarded in SAP LBN.

Automatic Implementation

The coding is available as ABAPGit ZIP file. You can directly import the changes using ABAPGit.

If you do not want to use ABAPGit, you can extract the ZIP file and create the development objects manually
as described below.

If you do not want to implement the full scope, you must adapt the ABAPGit -ZIP first and then remove the
irrelevant files. Please refer to the manual implementation section for more details.

18
Figure 17 Class Diagram for EWM - LBN-DAS Integration

Provider API for Dock Appointment Request (GenericAppoinment_In)

The implementation to trigger the provider API GenericAppointment_In involves the following:

• Data structure enhancements to the EWM Transportation Unit


• Custom master data tables for Warehouse Number and Docking Location assignments
• Enhancements to the EWM Warehouse Management Monitor

Manual Implementation

Create a package for the development objects and function groups for the maintenance table and monitor
function modules or use existing ones.

Enhance Transportation Unit

Transportation Unit header must be enhanced by the SAP LBN specific appointment data mentioned below,
which comes to S/4HANA system through the Application Logic – Appointment Confirmation
LBNGenericAppointment_Out API. The EWM Adapter updates these fields in the TU header.

DDIC Elements – Domains and Data Elements

Create a new domain ZLBN_DO_STATUS to display the Appointment Status Codes in SAP LBN:

• 01 Appointment Request Created


• 03 Confirmed
• 04 Rejected
• 05 Freight Order Cancelled

19
• 06 Cancelled by Operator
• 07 Cancelled by Carrier

Create a data element ZLBN_DE_STATUS using the new domain ZLBN_DO_STATUS.

Create a data element ZEWM_DE_APPTID using the domain /SCMTMS/BTD_ID that is used in common with
the TM integration for appointment confirmation

DDIC Elements - Structures

Create a new append structure ZEWM_LBN_DAS to EEW include /SCWM/INCL_EEW_TU_HDR:

• ZZLBN_APPT_ID TYPE ZEWM_DE_APPTID (CHAR 35)


• ZZLBN_APPT_STATUS TYPE ZLBN_DE_STATUS (CHAR 2)
• ZZLBN_DOCKLOC TYPE CHAR20 or /SCWM/DSDOCKLOC
• ZZLBN_LOAD_POINT TYPE CHAR20 or /SCWM/DSLOADPOINT
Note

This Include will be visible in DB tables /SCWM/TUNIT or in the monitor list structure for the TU
/SCWM/S_WIP_SR_TU_HDR.

DDIC Elements – DB Tables (optional – needed only when database is used)

1. Create DB table ZEWM_LBN_LOCAT with the following fields:

o MANDT TYPE MANDT


o LGNUM TYPE /SCWM/LGNUM
o SCU TYPE /SCMB/OE_ENTITY
o LOCATION_ID TYPE /SCMTMS/LOCATION_ID
2. Mark all fields as KEY.

3. Set the delivery class to A.

4. In the technical settings, set the data class to APPL0 and the size 0 (or choose a different size
category if applicable).

Maintenance View:

1. Create a function group ZLBN_VIEW to generate the maintenance view.

2. Create a Maintenance View ZEWM_V_LBN_LOCAT for the table ZEWM_LBN_LOCAT as defined above.

20
Figure 18 Mapping Table for Supply Chain Unit and (Docking) Location

Function Group ZLBN_APPT

Create new function modules to call the generated proxy classes of the Service Consumers generated as
described in chapter Error! Reference source not found.:

• ZLBN_SEND_APPT_REQUEST Send Appointment Request for TU to LBN-DAS


• ZLBN_SEND_APPT_CANCELLATION Send Appointment Cancellation Request for TU to LBN-DAS

Additional Information for Function Modules ZLBN_SEND_APPT_REQUEST and


ZLBN_SEND_APPT_CANCELLATION

1. Before creating the function module, create a function group ZLBN_APPT and create the function
module in this function group
2. Adjust the type of lo_proxy according to the proxy class that has been generated during service
consumer generation.

Figure 19 Type Adjustment to Generate Proxy Classes for GenericAppointmentCancellation_In

Application Logic - UI Integration for LBN API Calls in EWM Warehouse Management Monitor
(Transaction /SCWM/MON)
Automatic Implementation

The coding is available as ABAPGit ZIP file. You can directly import the changes using ABAPGit.

If you do not want to use ABAPGit, you can extract the ZIP file and create the development objects manually
as described below.

However, the configuration needed for adding the calls to the dock appointment scheduling API in SAP LBN
in the EWM monitor must be done manually, as described in the manual implementation.

21
Manual Implementation

Create a function group ZLBN_EWMMON for the monitor function modules or use an existing one.

Function Group ZLBN_EWMMON

Create new function modules for the monitor methods to trigger sending appointment request and
cancellation. Copy the code from the ABAPGit zip file:

• ZLBN_MON_SEND_APPTREQ
• ZLBN_MON_SEND_APPTCANCREQ
Enhancement of TU fields in the monitor list structures for the TU Node Profiles (Appointment ID, Statuses,
Docking Location/Loading Point)

Monitor methods to send appointment request and appointment cancellation request

Customizing:

1. Navigate to SCM Extended Warehouse Management > Extended Warehouse Management >
Monitoring > Warehouse Management Monitor > Customize Monitor Tree

Figure 20 EWM Monitor Customizing: Standard Monitor Nodes for TUs to Add LBN-DAS Extensions

2. Navigate to SCM Extended Warehouse Management > Extended Warehouse Management >
Monitoring > Warehouse Management Monitor > Define Nodes > Node Profiles:

Header Node Object List Table Type List Function Module


Profile Class

22
SR000003 TU /SCWM/TT_WIP_SR_TU_HDR /SCWM/WIP_TU_HDR_OUT
Outbound
TU
SR000022 TU /SCWM/TT_WIP_SR_TU_HDR /SCWM/WIP_TU_HDR_IN
Inbound TU

Figure 21 EWM Monitor Customizing: define node profiles for TU

If you enhance the DB Table /SCWM/TUNIT using the EEW include /SCWM/INCL_EEW_TU_HDR, the
new fields will appear by standard in the monitor node profile list structure and you can use the
standard node profiles. Do not use the fields of EWM DAS.

Figure 22 Node Profile list structure /SCWM/S_WIP_SR_TU_HDR

Otherwise, you must create your own Z-node profiles and customize accordingly.

Header Node Object List Table Type List Function Module


Profile Class

Outbound ZSR00003 TU ZLBN_TT_WIP_SR_TU_HDR ZLBN_MON_TU_HDR_OUT


TU

Inbound ZSR00022 TU ZLBN_TT_WIP_SR_TU_HDR ZLBN_MON_TU_HDR_IN


TU

New Monitor Methods to Send Appointment/Cancellation Request:

Define Object Class Methods:

23
Request Object Class Method Method Function Module
Type

Send TU ZLBN01 ZLBN_MON_SEND_APPTCANCR


Cancellation EQ
Request

Send TU ZLBN02 ZLBN_MON_SEND_APPTREQ


Appointment
Request

3. Navigate to SCM Extended Warehouse Management > Extended Warehouse Management >
Monitoring > Warehouse Management Monitor > Define Object Class Methods

Figure 23 Define Object Class Methods for Appointment Creation and Cancellation Request

Figure 24 New Monitor Methods Inbound TU to Call LBN APIs GenericAppointment_In and
GenericAppointmentCancellation_In

24
Figure 25 New Monitor Methods Outbound TU to Call LBN APIs GenericAppointment_In and
GenericAppointmentCancellation_In

Application Logic – Appointment Confirmation

General Information

The application logic for appointment confirmation is divided into two parts: application-agnostic and
application-specific.

The application-agnostic part receives the data from the message and determines the adapters known as
posting adapters. The posting adapters are responsible for posing the data to the corresponding application
objects.

There are three adapters available:

• Generic DB Adapter
The generic DB adapter writes the appointment information from SAP LBN into a generic database
table. This table is used during TU creation on the EWM side to lookup the existing appointments
posted against the TM freight order (not covered in this cookbook).

• TM Adapter
The TM adapter writes the appointment information to the corresponding freight order. With the
provided implementation, the system updates the following data:

o Appointment Start Date (at stop level)


o Appointment End Date (at stop level)
o Plate Number
o Country
• Driver Details
The system does not store the appointment ID and other information from the appointment message.
If you want to store additional information, you must update the coding and the backend data structure
accordingly.

• EWM Adapter
The EWM adapter posts the appointment information to the corresponding EWM reference document.
The system updates the TU with the provided implementation, the appointment start and end date, as
well as the license plate number, country and driver information is updated.

25
As the TU object – by EWM standard - does not contain the fields to store LBN – DAS appointment
data, the TU header must be enhanced by those fields. This is described in chapter Application Logic
– Appointment Request / Cancellation.

In case of an error, each adapter returns an error code defining if the error is only temporary or not.

For temporary errors, the application-agnostic logic triggers an asynchronous processing of the posting-
adapter logic via bgRFC.

Setting up bgRFC inbound destination

Prerequisites

To set an inbound destination in bgRFC, you must have setup bgRFC already.

Steps

Go to transaction /nSBGRFCCONF and register a new inbound destination:

26
Automatic Implementation

The coding is available as ABAPGit ZIP file. You can directly import the changes using ABAPGit.

If you do not want to use ABAPGit, you can extract the ZIP file and create the development objects manually
as described below.

If you do not want to implement the full scope, you must adapt the ABAPGit -ZIP first and then remove the
irrelevant files. Please refer to the manual implementation section for more details.

Manual Implementation

Create a package for the dev objects or use an existing one.

DDIC Elements - Structures

Create a structure ZLBN_S_APPT_CMN with the following attributes:

• APPT_STATUS Type CHAR2


• ACTVTY_TYPE Type CHAR2
• LOCATION_ID Type /SCMTMS/LOCATION_ID
• LOAD_POINT_ID Type CHAR36
• APPT_START Type /SCMTMS/STOP_APPOINTMENT_START
• APPT_END Type /SCMTMS/STOP_APPOINTMENT_END
• PLATENR Type /SCMTMS/RESPLATENR
• PLATENR_CTRY Type LAND1
• DRIVER_1 Type /SCMTMS/DRIVER_NAME
• DRIVER_2 Type /SCMTMS/DRIVER_NAME

Create a structure ZLBN_S_APPT with the following attributes:

• APPT_ID Type /SCMTMS/BTD_ID


• DELETED Type BOOLE_D
• .INCLUDE Type ZLBN_S_APPT_CMN

Create a structure ZLBN_S_APPT_DOC with the following attributes:

• APPT_ID Type /SCMTMS/BTD_ID


• DOC_ID Type /SCMTMS/BTD_ID
• DOC_TCO Type /SCMTMS/BTD_TYPE_CODE

27
DDIC Elements – Table Types

Create a table type ZLBN_T_APPT_DOC with the line type ZLBN_S_APPT_DOC and unique, sorted primary
key and the following key attributes:

• APPT_ID
• DOC_ID
• DOC_TCO

DDIC Elements – DB Tables (optional – only needed if DB is used)

1. Create a DB table ZLBN_APPT with the following fields:

o MANDT Type MANDT


o APPT_ID Type /SCMTMS/BTD_ID
o .INCLUDE Type ZLBN_S_APPT_CMN
2. Mark MANDT and APPT_ID as KEY.

3. Set the delivery class to A.

4. In the technical settings, set the data class to APPL1 and the size 6 (or choose a different size
category if applicable).

5. Create DB table ZLBN_APPT_DOC with the following fields:

o MANDT Type MANDT


o .INCLUDE Type ZLBN_S_APPT_DOC
6. Mark the .INCLUDE as KEY.

7. Set the delivery class to A.

8. In the technical settings, set the data class to APPL1 and the size 6 (or choose a different size
category if applicable).

ABAP Coding

For the manual approach, create the development objects according to the table below, switch to source
code editing mode and copy and paste the content of the corresponding file.

Type Name File Opt./ Req. Comment

Intf. ZIF_LBN_APPT_POST <NAME>.INTF.ABA R


P

Class ZCL_LBN_APPT_ADAPT <NAME>.CLAS.ABA R


ER P

28
Class ZCL_LBN_APPT_POST_ <NAME>.CLAS.ABA O Only needed, if appointment
DB P information should be stored
generically in DB.

Class ZCL_LBN_APPT_POST_ <NAME>.CLAS.ABA O Only needed, if LBN DAS is to be


TM P integrated with TM

Class ZCL_LBN_APPT_POST_ <NAME>.CLAS.ABA O Only needed, if LBN DAS is to be


EWM P integrated with EWM

Function Z_LBN_APPT_POST ZLBN_APPT.FUGR. R See section below for additional


Module <NAME>.ABAP information in case of manual
creation.

Additional Information for Function Module Z_LBN_APPT_POST

1. Before creating the function module, create a function group ZLBN_APPT and create the function
module in this function group.

2. Select the function module as Remote-Enabled Module.

3. Define the following interface for the function module:

4. Copy the coding as described in the table above.

29
Adapt the Inbound Agent Implementation

Open the implementing class of your service provider of the GenericAppointment_Out service and add
the following coding:

CALL METHOD zcl_lbn_appt_adapter=>post_soap_msg(


EXPORTING
input = input
).

Note

If the type of the input parameter does not match the required type of the method post_soap_adapter,
you must update the signature of the method accordingly.

Setup Integration

Setup the integration with SAP LBN similar to the other integrated LBN services.

End to End process: EWM Appointment Request - Call of EWM Adapter for Appointment
Confirmation - Update Transportation Unit with LBN Appointment - EWM Appointment Cancellation
Request

Figure 26 Transaction SRT_MONI showing outgoing and incoming SOA messages for GenericAppointment_In |
GenericAppointment_Out | GenericAppointmentCancellation_In

Figure 27 Updated Outbound TU after Appointment Confirmation (GenericAppointment_Out)

30
www.sap.com/contactsap

© 2020 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.
National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality
mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are
all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation
to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are
cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/copyright for additional trademark information and notices.

You might also like