ale for functionals
TRANSCRIPT
-
8/6/2019 ALE for Functionals
1/70
EDI - ALE/IDoc
-
8/6/2019 ALE for Functionals
2/70
EDIEDI
The basic EDI structure is given belowThe basic EDI structure is given below
-- Each partnerhas their own internal software systemsEach partnerhas their own internal software systems
-- Special EDI adapters have to be implemented which will be able to interface withSpecial EDI adapters have to be implemented which will be able to interface withthe internal system as well as communicate with the value added networkthe internal system as well as communicate with the value added network
Partner BInternal
SystemEDI Software EDI Software
Partner AInternal
SystemVAN
VAN
-
8/6/2019 ALE for Functionals
3/70
EDIFACTEDIFACT
EDIFACT stands for EDI For Administration, Commerce and TransportationEDIFACT stands for EDI For Administration, Commerce and Transportation
EDIFACT Interchanges consist ofmessages which are in turn composed of dataEDIFACT Interchanges consist ofmessages which are in turn composed of datasegmentssegments
The segments themselves consist of data elementsThe segments themselves consist of data elements
Interchange
Message MessageMessageIchange Header Ichange Header
Data
Segment
Data
Segment
Data
Segment
Message
Header
Message
Header
Data
Element
Data
Element
Data
Element
-
8/6/2019 ALE for Functionals
4/70
ALE!! What is it ??
It is a set ofIt is a set of
Tools,
programs and
data definitions
that provides the mechanism forthat provides the mechanism for
distributing functionality and data acrossdistributing functionality and data across
multiple system.multiple system.
-
8/6/2019 ALE for Functionals
5/70
What Data can be Exchanged ?What Data can be Exchanged ?
Transaction DataSD, MM, FI, CO,etc.
Master Data
Material, Customer, Vendor,etc.
Control DataOrganizational Reference Information
Plants, Sales Orgs,etc.
Data required to enable tightly coupled,distributed applications
Separate HR, SeparateTreasury,etc.
-
8/6/2019 ALE for Functionals
6/70
Application
Data
Master
IDOC DetermineReceipients
Filter/Convert
Data, Create IDOCComm.
IDOC
Application
Functions
Filter/Convert
Data
Comm.
IDOC
Carrier
Application
Layer
Application
LayerDistribution/ ALE
Layer
Distribution/ ALE
LayerCommunication
Layer
Communication
Layer
Application
In a Nut ShellIn a Nut Shell
-
8/6/2019 ALE for Functionals
7/70
Control recordData Record
Status Record
IDOC
IntermediateDocument
Anatomy of an IDoc
-
8/6/2019 ALE for Functionals
8/70
The very first record of an IDoc package is alwaysa control record. Thestructure of this control record of the structureEDIDC and describes the contents of the datacontained in the package.
Control RecordControl Record
-
8/6/2019 ALE for Functionals
9/70
All records in the IDoc, which come after the
control record, are the IDoc data. They are allstructured alike, with a segment information partand a data part, which is 1000 character inlength, filling the rest of the line.
Data RecordData Record
-
8/6/2019 ALE for Functionals
10/70
Status RecordStatus RecordInformation about the IDoc statuslike:IDoc identification number
Status number - table verifiedIDoc typeDirectionData and time stamp
-
8/6/2019 ALE for Functionals
11/70
Outbound Processing
-
8/6/2019 ALE for Functionals
12/70
Outbound processingOutbound processing
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDOCs
Comm. layer
asynch. RFCor
EDI
CLinks C
Comm. layer
-
8/6/2019 ALE for Functionals
13/70
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
Comm. layer
asynch. RFC
or
EDI
LinksC
Querying the ModelQuerying the Model
asynch. RFCor
EDI
Comm. layer
C
- ALE supplies APIs (function modules) toallow applications to query the model
Is anybody interested in my message type?
Optional: what filter objects are theyinterested in?
-
8/6/2019 ALE for Functionals
14/70
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
-- The application creates the IDOCThe application creates the IDOC
-- Technically it is stored as anTechnically it is stored as aninternal tableinternal table
-- Passed to ALE via an APIPassed to ALE via an API(function module)(function module)
LinksC
Handover IDoc to ALEHandover IDoc to ALE
asynch. RFCor
EDI
C
Comm. layer
-
8/6/2019 ALE for Functionals
15/70
Receiver determinationReceiver determination
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
asynch. RFC
or
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
-- If the application has no specifiedIf the application has no specified
recipientsrecipients ALE refers to the customerALE refers to the customer
distribution model to determinedistribution model to determinethemthem
Data not relevant to receiverData not relevant to receiver(according to model) is removed(according to model) is removedin ALE layer.in ALE layer.
-
8/6/2019 ALE for Functionals
16/70
Segment filterSegment filter
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
asynch. RFC
or
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
-- The filter is dataThe filter is data--independentindependent
-- IDOC segments that are notIDOC segments that are notrequired can be removedrequired can be removed
-- The filter is message and receiverThe filter is message and receiver--specificspecific
-
8/6/2019 ALE for Functionals
17/70
Field value conversionField value conversion
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
asynch. RFC
or
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
-- The contents of individualThe contents of individual
fields can befields can be
translated to new valuestranslated to new values
suppressedsuppressed
-- The filter is message andThe filter is message and
receiverreceiver--specificspecific
-
8/6/2019 ALE for Functionals
18/70
Version changeVersion change
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
Comm. layer
asynch. RFC
or
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
-- IDOCs can be changed to olderIDOCs can be changed to olderversionsversions
-- Systems with different releaseSystems with different releaselevels can communicatelevels can communicatewithout additional applicationwithout additional applicationlogiclogic
-
8/6/2019 ALE for Functionals
19/70
Make LinksMake Links
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
CCLinks
asynch. RFCor
EDI
C
Comm. layer
-- Links are written between IDOCLinks are written between IDOC
andand
Application object containedApplication object containedin IDOCin IDOC
CommunicationCommunication--Layer'sLayer's
"Transaction"Transaction--ID"ID"
-
8/6/2019 ALE for Functionals
20/70
Dispatch controlDispatch control
Application
posting
Need to
create IDOC?
Create master
IDOC
Customer
DistributionModel
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatch
controlDatabase
M
Application documentposted simultaneously
with IDocs
C
asynch. RFC
or
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
-- Technical comms parameters areTechnical comms parameters are
defineddefined
-- EDI or aRFC (asynch. remoteEDI or aRFC (asynch. remote
function call)function call)
-- Send immediately or cumulateSend immediately or cumulate
and send via batch joband send via batch job
If batch, packet size isIf batch, packet size is
determineddetermined
-
8/6/2019 ALE for Functionals
21/70
Inbound Processing
-
8/6/2019 ALE for Functionals
22/70
Inbound Processing.Inbound Processing.
Application
posting
Field value conversion
ALE layer
Input
control
Database
A
Simultaneously updateIDOC's status
Comm. layer
asynch. RFC
or
EDI
Version change
Segment filter
C
A
Post application
document
Process IDOCSerialization
-
8/6/2019 ALE for Functionals
23/70
Input ControlInput Control
Application
posting
Field value conversion
ALE layer
Input
control
Database
A
Simultaneously updateIDOC's status
Comm. layer
asynch. RFCor
EDI
Version change
Segment filter
C
A
Post application
document
Process IDOCSerialization
-- For each message type and senderFor each message type and sender
one can defineone can define
when to processwhen to process(immediate/batch)(immediate/batch)
whether to call applicationwhether to call application
directly or start customerdirectly or start customer
workflowworkflow
who should get work items inwho should get work items in
case of errorcase of error
-- Incoming IDOC packets are passed toIncoming IDOC packets are passed to
applicationapplication
-
8/6/2019 ALE for Functionals
24/70
Application InputApplication Input
Application
posting
Field value conversion
ALE layer
Input
control
Database
A
Simultaneously updateIDOC's status
Comm. layer
asynch. RFCor
EDI
Version change
Segment filter
C
A
Post application
document
Process IDOCSerialization
-- Inbound IDOCs are passed toInbound IDOCs are passed to
the application via athe application via a
standardized functionstandardized function
interfaceinterface
-
8/6/2019 ALE for Functionals
25/70
SerializationSerialization
Application
posting
Field value conversion
ALE layer
Input
control
Database
A
Simultaneously updateIDOC's status
Comm. layer
asynch. RFCor
EDI
Version change
Segment filter
C
A
Post application
document
Process IDOCSerialization
-- When processing the
When processing theinbound IDOC, theinbound IDOC, the
application can call an ALEapplication can call an ALE
API (function module) toAPI (function module) to
check that the IDOC has notcheck that the IDOC has not
been overtakenbeen overtaken
If change No. 1 arrivesIf change No. 1 arrives
after change No. 2, theafter change No. 2, the
IDOC containing it hasIDOC containing it hasbeen overtaken (by thebeen overtaken (by the
IDOC containing theIDOC containing the
later change)later change)
-
8/6/2019 ALE for Functionals
26/70
Basic Configuration ElementsBasic Configuration Elements
Create and allocate Logical System
Define Ranges (Idocs,Ports,etc )
Define RFC Destinations
DefinePorts
Maintain Customer Model
CreatePartnerProfiles
-
8/6/2019 ALE for Functionals
27/70
Logical SystemLogical System
TCODE:
BD54
-
8/6/2019 ALE for Functionals
28/70
Allocate Logical System to the clientAllocate Logical System to the client
SALE > BASIC SETTINGS > SET UP
LOGICALSYSTEM >ASSIGN LOGICAL
SYSTEMTOTHE CLIENT
TCODE:
SCC4
-
8/6/2019 ALE for Functionals
29/70
Maintaining RFC DestinationsMaintaining RFC Destinations
TCODE:
SM59
-
8/6/2019 ALE for Functionals
30/70
Displaying and Maintaining PortsDisplaying and Maintaining Ports
AA portport isis aa logicallogical representationrepresentation ofof aa
communicationcommunication channelchannel inin SAPSAP withwith
thethe datadata communicatedcommunicated beingbeing IDocsIDocs.
TCODE:
WE21
-
8/6/2019 ALE for Functionals
31/70
PartnerProfilesPartnerProfiles
TCODE:
WE20
-
8/6/2019 ALE for Functionals
32/70
PartnerProfilesPartnerProfiles--OutboundOutbound
-
8/6/2019 ALE for Functionals
33/70
PartnerProfilesPartnerProfiles--InboundInbound
-
8/6/2019 ALE for Functionals
34/70
Distribution ModelDistribution Model
TCODE:
BD64
-
8/6/2019 ALE for Functionals
35/70
Filter ObjectsFilter Objects
BD95BD59
-
8/6/2019 ALE for Functionals
36/70
Idoc SegmentsIdoc Segments
TCODE:
WE31
-
8/6/2019 ALE for Functionals
37/70
Idoc TypesIdoc Types
TCODE:
WE30
-
8/6/2019 ALE for Functionals
38/70
How to Attach SegmentsHow to Attach Segments
-
8/6/2019 ALE for Functionals
39/70
MessageTypesMessageTypes
WE81WE82
-
8/6/2019 ALE for Functionals
40/70
FM Assignment to MessageType and IDoc typeFM Assignment to MessageType and IDoc type
TCODE:
WE57
-
8/6/2019 ALE for Functionals
41/70
Process CodesProcess Codes
WE41WE42
-
8/6/2019 ALE for Functionals
42/70
Process Codes in Inbound and OutboundProcess Codes in Inbound and Outbound
TCODE:
WE64
-
8/6/2019 ALE for Functionals
43/70
Filling an EDIDD structureFilling an EDIDD structure
Header (55bytes) SDATA (1000bytes)
. SEGNAM .EDIDD
Z1SEGField1 Field2 Field3 Field4
10 ABC
MOVE Z1SEG to EDIDD-SEGNAM
MOVE 10 to Z1SEG-FIELD1
MOVE ABC to Z1SEG-FIELD2
MOVE Z1SEG to EDIDD-SDATA
-
8/6/2019 ALE for Functionals
44/70
General Programming rulesGeneral Programming rules
Design Guidelines for creating IDOC data records:
Left-justified filing of IDOC Fields
Replacing SAP codes with ISO codes
currency keys
country keys
unit of measure
shipping instructions Converting Currency Amounts
-
8/6/2019 ALE for Functionals
45/70
LeftLeft--justified Fillingjustified Filling
All fields must be left-justified
Character fields:
automatic
Non-character fields:
Condense statement must be used
Check IDOC documentation to find out which fieldsrequire a condense
All types unequal to char, cuky, clnt, accp, numc,dats, tims or unit require a condense
-
8/6/2019 ALE for Functionals
46/70
Code ConversionsCode Conversions
Replacing SAP codes with ISO codes
Currency keys: currency_code_sap_to_iso
Country keys: country_code_sap_to_iso
Units of measure: unit_of_measure_sap_to_iso
Shipping instructions: sap_iso_package_type_code
Conversion of currency amounts
currency_amount_sap_to_iso
-
8/6/2019 ALE for Functionals
47/70
ChangePointersChangePointers
BD61BD50
-
8/6/2019 ALE for Functionals
48/70
ChangePointers ContinuedChangePointers Continued
BD52BD60
-
8/6/2019 ALE for Functionals
49/70
IBM Global Services
Copyright IBM Corporation 2003ABAP | Confidential | ALE For ABAPers .ppt | 7/15/2011Slide 49
Steps for distributing Master data using SMD tool.
1. Activate change pointers for the message type
Transaction BD50
The message type for which master data is to be downloaded has to be activated. This will create an entry in
table TBDA2.
2. Activate change pointers generally
Transaction BD61
3. Define change relevant field for the message type
Transaction BD52
For master data to be distributed to other systems change document fields are defined in
transaction BD52 so that change pointers are written only for the particular fields. This
will create an entry in table TBD62.
4. Define function module to process change pointers.
Transaction BD60
This will creates an entry in table TBDME
5. Create IDOC from change pointers.
Transaction BD21 Program RBDMIDOC
In production system a periodic job will be scheduled to execute the RBDMIDOC program, which is actually run
by BD21 transaction, with a variant containing the right message type.
The other ALE setup like RFC Destination(SM59), Port definition(BD211), Partner Profile(BD20) & Distribution
model(BD64) needs to be done to create a Idoc successfully.
-
8/6/2019 ALE for Functionals
50/70
Inbound Program DevelopmentInbound Program Development
INBOUND_IDOC_PROCESS
IDOC
ALE layer
IDOC_INPUT_
Read IDOC data
Post Application data
Send Success info back to ALE layer
ALE configuration PartnerProfiles
Process Code
Functionmodule attribute
Functionmodule registry
Workflow Task
Call function
Return Variables
If ERROR, trigger
Version change
Segment filter
Field conversion
-
8/6/2019 ALE for Functionals
51/70
FM For Inbound EDIFM For Inbound EDI
TCODE:
BD67
-
8/6/2019 ALE for Functionals
52/70
ALE For Transactional dataALE For Transactional data -------- Output DeterminationOutput Determination
NACE
-
8/6/2019 ALE for Functionals
53/70
Output DeterminationOutput Determination ---- Access SequenceAccess Sequence
-
8/6/2019 ALE for Functionals
54/70
Output DeterminationOutput Determination ---- Output TypesOutput Types
-
8/6/2019 ALE for Functionals
55/70
Output TypesOutput Types ---- DetailsDetails
-
8/6/2019 ALE for Functionals
56/70
Output TypesOutput Types ---- Partner FunctionsPartner Functions
-
8/6/2019 ALE for Functionals
57/70
Output TypesOutput Types ---- Processing RoutinesProcessing Routines
-
8/6/2019 ALE for Functionals
58/70
Output TypesOutput Types ---- ProceduresProcedures
-
8/6/2019 ALE for Functionals
59/70
Output TypesOutput Types ---- Procedures ControlProcedures Control
-
8/6/2019 ALE for Functionals
60/70
Output TypesOutput Types ---- Condition recordsCondition records
-
8/6/2019 ALE for Functionals
61/70
SerializationSerialization
Receiver
1
2
1
2
Object X,
changed twice:
First IDOC
overtaken
Comm. LayerSender
!?
Input from IDOC 1
must be prevented
in ordernot to loseinformation from
IDOC 2
-
8/6/2019 ALE for Functionals
62/70
SerializationSerialization
Check, if IDOC has been overtaken
Use function module IDOC_SERIALIZATION_CHECK
react to overtaken IDOCs according to your needs
Prerequisite is the definition of a serializationobject
-
8/6/2019 ALE for Functionals
63/70
List Of All IDocs Created. (Default, Additional, EDI)List Of All IDocs Created. (Default, Additional, EDI)----WE02WE02
Transactions ForMonitoring and Processing IDocs.Transactions ForMonitoring and Processing IDocs.
-
8/6/2019 ALE for Functionals
64/70
Selection Program For Issuing OutputSelection Program For Issuing Output ----WE15WE15
-
8/6/2019 ALE for Functionals
65/70
Process All Selected IDocs. WE14Process All Selected IDocs. WE14
-
8/6/2019 ALE for Functionals
66/70
Test Tool For Idoc ProcessingTest Tool For Idoc Processing
-
8/6/2019 ALE for Functionals
67/70
Select IDocs BD87Select IDocs BD87
-
8/6/2019 ALE for Functionals
68/70
Idoc Search ForBusiness Contents (Database). WE09Idoc Search ForBusiness Contents (Database). WE09
-
8/6/2019 ALE for Functionals
69/70
Status Conversion With Trfc Execution. BD75Status Conversion With Trfc Execution. BD75
-
8/6/2019 ALE for Functionals
70/70
QuestionsQuestions