The last of a 3 part series on configuring an end-to-end SCEM scenario. In this paper I complete the SCM configuration and return to ECC to finish up the scenario.
We continue where we left off and begin in the SCM system by defining the event handler type.
•
Execute Define Handler Types
•
Click “New Entries” to add your new EH Type
–
Enter Event Handler type name and description
(ZEH_SALESORDERLINE)
–
Select BPT as defined in (S3) (ZBPT_SORDER)
–
Set logging options as required
–
Save
•
What’s up next for the definition of the EH Type?
–
Expected Event Profile
•
Event code definition
–
Status Attribute Profile
•
Status value definition
–
Rule Set
•
Need the values from above to make the rules
–
External Table ID
–
BW Profile
–
EH Update Activity
</p>
•
Execute “Define Code Set Customizing”
•
Click “Application Object Code Set” and “New Entries”
–
Add AOT as defined in (E5B / E5D) (ZAOT_SORDER_LINE)
–
Description
–
Data type => C
–
Code ID Length => 16
•
Save
•
Execute “Define Code Set Customizing”
•
Click “Tracking ID Code Set” and “New Entries”
–
Add Tracking ID as defined in (E5E) (SO_LINE)
–
Description
–
Data type => C
–
Code ID Length => 16
•
Save
•
Execute “Define Internal Event Codes and Internal Event
Code Groups”
•
Click “Internal Event Codes” and “New Entries”
–
SO_CREATED
–
SO_COMPLETE
–
DEL_CREATED
–
DEL_PICKED
–
DEL_PACKED
–
DEL_PGI
–
INV_CREATED
–
POD_CREATED
–
DEACTIVATE
–
CREDIT_ON
–
CREDIT_OFF
•
Use Default Icon value
•
Save
•
Execute “Define External Event Codes and How They Are
Mapped”
•
Click “External Event Code Sets” and “New Entries”
–
SO_CREATED
–
SO_COMPLETE
–
DEL_CREATED
–
DEL_PICKED
–
DEL_PACKED
–
DEL_PGI
–
INV_CREATED
–
POD_CREATED
–
DEACTIVATE
–
CREDIT_ON
–
CREDIT_OFF
•
Save
•
Must match expected events tag list (E11C) and any
unexpected events coded for in the Event Types on ECC
•
Select the External Event Code Set and Double click
“External Event Code ID and Mapping”
•
Click “New Entries” and enter the applicable External
Event Code Id (E11C) relating to the External Event Code ID selected above.
•
Repeat this for all External Event Code Ids defined in
(S6B)
–
SO_CREATED
–
SO_COMPLETE
–
DEL_CREATED
–
DEL_PICKED
–
DEL_PACKED
–
DEL_PGI
–
INV_CREATED
–
POD_CREATED
–
DEACTIVATE
–
CREDIT_ON
–
CREDIT_OFF
•
Save
•
Execute “Define Profiles for Expected Events”
•
Click “Update Expected Event Profiles” and “New
Entries”
•
Enter profile name and description (ZEEP_SALESORDERLINE)
•
Double click “Update Profile Groups” while still
editing your profile as defined in (S7A)
•
Click “New Entries”
•
Add the following values
–
Group => 10
–
Generate => Checked
–
Description
•
Save
•
Select the Profile Group created in (S7B) and double
click “Update Profile Items”
•
Click “New Entries”
•
For each Expected event as defined in (E11C) Add the
following values
–
Item Number => Unique number indicating order of
placement
–
Generated from => Value from ECC (E11C)
•
Clicking F4 here prompts your for The application
system (S2) and the AOT (S5A)
•
It then fires up the list as defined in (E11C)
–
Expected Event Date: Rule: From Application System
–
Check all Expected Event Functions
•
Save
•
The Expected event profile, it’s groups and items now
look as shown below
•
We still need to come back later to add the EE Monitor
Activity which drives the EE Overdue Monitor program. See (S13C)
</p>
•
We need to define our various parameters
–
Control (S8B)
–
Info (S8C)
–
System – If you need to index values in the database
•
Define Parameter Mapping (S9)
•
Execute “Define Control, Info, and Rule Processing
Parameters”
•
Click the “Control Parameters” option and click “New
Entries”
•
Add entries similar to those defined in (E8C)
–
CUSTOMER_AG
–
SALES_ORG
–
CREATE_DATE
–
CREATE_TIME
–
ITEM_CAT
•
Save
</p>
•
Execute “Define Control, Info, and Rule Processing
Parameters”
•
Click the “Info Parameters” option and click “New
Entries”
•
Add entries similar to those defined in (E9C)
–
CREATE_USER
–
MATERIAL
–
PRICE
–
SOLD_TO_NAME
•
Save
•
Execute “Define Parameter Mapping”
•
Click “Define Mapping Profile” and click “New Entries”
•
Add Mapping Profile Name (ZMP_SALESORDERLINE) and
Description
•
Save
•
Select the Mapping profile defined in (S9A)
(ZMP_SALESORDERLINE)
•
Double click “Control Parameter Mapping” and click “New
Entries”
•
Repeat the following for all control parameters as
defined in (E8C) / (S8B)
–
Enter Parameter value as defined in (E8C)
•
Clicking F4 here prompts your for The application
system (S2) and the AOT (S5A)
•
It then fires up the list as defined in (E8C)
–
Parameter Type => Control Parameter
–
Parameter is the value defined in (S8B) that matches
that chosen above from (E8C)
–
Mapping Mode => Direct Value Takeover
•
Save
•
Select the Mapping profile defined in (S9A)
(ZMP_SALESORDERLINE)
•
Double click “Info Parameter Mapping” and click “New
Entries”
•
Repeat the following for all info parameters as defined
in (E9C) / (S8C)
–
Enter Parameter value as defined in (E9C)
•
Clicking F4 here prompts your for The application
system (S2) and the AOT (S5A)
•
It then fires up the list as defined in (E9C)
–
Select Parameter Type => Info Parameter
–
Parameter is the value defined in (S8C) that matches
that chosen above from (E9C)
–
Mapping Mode => Direct Value Takeover
•
Save
•
Double click “Assign Profile to Mapping Area” and click
“New Entries”
–
Enter Application System as defined in (S2) (SAPECC)
–
Enter AOT as defined in (S5A) (ZAOT_SORDER_LINE)
–
Enter Mapping Profile as define in (S9A)
(ZMP_SALESORDERLINE)
•
Save
</p>
•
To define your Status Attributes execute “Define Status
Attributes” and Click “New Entries”
•
For each Status Attribute (as shown in slide “The
Scenario – Status Values”) Enter your Status Attribute Name, type (Definable
value) and Description
–
ZSA1_CREATED
–
ZSA2_IR
–
ZSA3_BP
–
ZSA4_IN
–
ZSA5_POD
•
Save
•
For each status attribute you need to enter an
attribute value by selecting the attribute and double clicking “Status
Attribute Values” and “New Entries”
•
Enter the value, description and Icon for each
•
Created: ZSA1_CREATED
–
CREATED
•
IR: ZSA2_IR
–
IR
–
IR_CREDIT
–
IR_NO
–
IR_LATE
•
BP:
ZSA3_BP
–
BP
–
BP_DEL
–
BP_PICK
–
BP_PACK
–
BP_NO
–
BP_LATE
•
IN: ZSA4_IN
–
INVOICED
–
IN_NO
–
IN_LATE
•
POD: ZSA5_POD
–
POD_NO
–
POD
–
POD_LATE
•
To define your Status Attribute Profile execute “Define
Status Attribute Profiles” and Click “New Entries”
•
Enter your Status Attribute Profile Name and
Description (ZSAP_SALESORDERLINE)
•
Save
•
Select the Status Attribute Profile created in (S12A)
and double click “Status Attribute Profile Items”
•
Click New Entries and Add the Status Attribute Names
created in (S11A) and default values from (S11B)
•
Save
</p>
•
Execute “Define Activities for the Expected Event
Monitor”
•
Double-Click “Multitask EE Monitor Activities” and “New
Entries”
–
Activity => ZEEM_OVERALL
–
Description
•
Save
•
Execute “Define Profiles for Expected Events”
•
Double click the EE Profile that was created in (S7A)
(ZEEP_SALESORDERLINE)
•
Insert the EE Monitor Activity created in (S13A)
(ZEEM_OVERALL)
•
Save
•
Execute “Define Rule Sets” and click “New Entries”
•
Enter rule set name and description (ZRS_SALESORDER)
•
Save
•
We now need to go and create rule conditions (S14B) and
the relevant multi-task activities (S14C/D)
•
Double click “Rule Condition Functions” and click “New
Entries”
•
Enter condition name, description and Function module
name
•
Create function module as a copy of
/SAPTRX/RULE_COND_TEMPLATE
–
ZRC_CREDIT_ON, Z_SAPTRX_EVM_CREDIT_ON
–
ZRC_DEL_CREATED, Z_SAPTRX_EVM_DEL_CREATED
–
ZRC_DEL_PACKED, Z_SAPTRX_EVM_DEL_PACKED
–
ZRC_DEL_PGI,
Z_SAPTRX_EVM_DEL_PGI
–
ZRC_DEL_PICKED, Z_SAPTRX_EVM_DEL_PICKED
–
ZRC_INV_CREATED, Z_SAPTRX_EVM_INV_CREATED
–
ZRC_POD_CREATED, Z_SAPTRX_EVM_POD_CREATED
–
ZRC_SO_COMPLETE, Z_SAPTRX_EVM_SO_COMPLETE
•
Double click “Multitask Activities” and “New Entries”
•
Add activity and description for each required
multitask activity
–
SO_COMPLETE
–
CREDIT_ON
–
DEL_CREATED
–
DEL_PICKED
–
DEL_PACKED
–
DEL_PGI
–
INV_CREATED
–
POD_CREATED
•
For each Activity defined in (S14C) you need to define
the tasks by selecting the activity and double clicking “Tasks” and clicking
“New Entries”
•
Update the status entries using activity STATUS_SET
•
Select the Rule set line created in (S14A) and double
click “Rules” and click “New Entries”
•
For each event that you wish to create add a sequence
number, rule name, description, the applicable condition and the activity
–
We create a generic activity to update the EE dates
(EVM_EE_UPDATE). Enter this step as the True rule
</p>
•
As a continuation of (S4) we now are in a position to
complete the event handler type definition
•
Execute “Define Event Handler Type” and double click
the EH type that you created in (S4)
–
Rule set (S14A)
–
Status Attribute Profile (S12A)
–
Expected Event Profile (S7A)
</p>
•
While in the applicable event handler type double click
“Unexpected Event Codes”
•
Enter the applicable internal event code (S6A)
–
CREDIT_ON
–
CREDIT_OFF
•
We are now at a place where we can test our process
from Sales Order create to Sales Order Completed
•
In the coming paragraphs I’ll go through the
integration with the delivery, invoice and POD Idoc
We now move back in to ECC to configure the Delivery event
messages. Note that we do not have to created an event handler for the delivery
(unless we wanted to track status of the delivery) we just have to create event
messages that will get posted to the sales order line event handler.
•
Copy ESC_DELIV => ZBPT_DELIV
•
Enable EMsg Send and disable EH Create
•
Create new defined BPT for BPT created in (e100). Set
to Active
•
Select the BPT and double click “Define Event Types” to
define event types:
–
DEL_CREATED
–
DEL_PACKED
–
DEL_PGI
–
DEL_PICKED
•
Define the applicable EM relevance function modules and
event extractor function modules as was done for SO_CREATED in Steps E13 – E18
•
Definition: LE_SHP_DELIVERY_PROC
•
Implementation: Z_SAPTRX_LE_SHIPPING
•
Method: SAVE_AND_PUBLISH_DOCUMENT
Call communication function
CALL FUNCTION '/SAPTRX/EVENT_MGR_COMMUNICATE'
EXPORTING
business_process_type = 'ZBPT_DELIV'
table_container = datacontainer
EXCEPTIONS
parameter_error = 1
emr_determination_error = 2
not_em_relevant = 3
OTHERS = 4.
•
Copy ESC_SD_INVOICE => ZBPT_SD_INVOICE
•
Enable EMsg Send and disable EH Create
•
Create new defined BPT for BPT created in (e200). Set
to Active
•
Select the BPT and double click “Define Event Types” to
define event types:
–
INV_CREATED
•
Define the applicable EM relevance function modules and
event extractor function modules
•
Definition: BADI_SD_BILLING
•
Implementation: Z_SAPTRX_SD_INVOICE
•
Method: INVOICE_DOCUMENT_ADD
–
Change BPT to that defined in (E200) ZBPT_SD_INVOICE
We will now configure an event using an IDoc (EVMSTA)
•
Create function module Z_SAPTRX_SEND_IDOC
Data: z_mess_type LIKE edp13-mestyp VALUE 'EVMSTA',
z_idoc_type LIKE bdicontrol-idoctp VALUE 'EVMSTA02',
z_hdr_seg LIKE edid4-segnam VALUE 'E1EVMHDR02',
z_tid_seg LIKE edid4-segnam VALUE 'E1EVMTID'.
e1evmhdr02-evtid =
gc_event_podcreated.
e1evmhdr02-evtdat = sy-datum.
e1evmhdr02-evttim = sy-uzeit.
e1evmhdr02-evtzon = lv_timezone.
z_idoc_data-segnam = z_hdr_seg.
z_idoc_data-sdata = e1evmhdr02.
APPEND z_idoc_data.
e1evmtid-trxcod = 'SO_LINE'.
CONCATENATE 'VB' vbeln posnr
INTO e1evmtid-trxid.
z_idoc_data-segnam = z_tid_seg.
z_idoc_data-sdata = e1evmtid.
APPEND z_idoc_data.
•
WE20 (Outbound Partner Profile)
–
Message Type: EVMSTA
–
Basic Type: EVMSTA02
Step S302 - IDoc-Inbound Partner Profile
•
SCM: WE20 (Inbound Partner Profile)
–
Message Type: EVMSTA
–
Process Code: EVMI
And that’s it. Full scenario configured.
Testing
Create and order and take it all the way through to
Invoice and then call the POD function module. During the process follow the
status of your event handler using transaction /SAPTRX/EH_LIST.