Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
kevin_wilson2
Contributor


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. 

Step S4 - 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

Event Handler Type (Next Steps)


•        
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>

Step S5A - Code Set Customizing (AOT)


•        
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

Step S5B - Code Set Customizing (Tracking ID Code Set)


•        
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

Step S6A - Event Codes (Internal)


•        
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

Step S6B - Event Codes (External)


•        
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

Step S6C - Event Codes (External Mapping)


•        
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

Step S7A - Expected Event Profile


•        
Execute “Define Profiles for Expected Events”



•        
Click “Update Expected Event Profiles” and “New
Entries”



•        
Enter profile name and description (ZEEP_SALESORDERLINE)

Step S7B - Expected Event Profile (Groups)


•        
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

Step S7C - Expected Event Profile (Profile Items)


•        
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

Step S7D - Expected Event Profile (Overview)


•        
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>

Step S8A - Parameters


•        
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)

Step S8B - Parameters (Control)


•        
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>

Step S8C - Parameters (Info)


•        
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

S9A:SCM Config – Parameter Mapping (Mapping Profile)


•        
Execute “Define Parameter Mapping”



•        
Click “Define Mapping Profile” and click “New Entries”



•        
Add Mapping Profile Name (ZMP_SALESORDERLINE) and
Description



•        
Save

Step S9B - Parameter Mapping (Control Parameter Mapping)


•        
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

Step S9C - Parameter Mapping (Info Parameter Mapping)


•        
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

Step S10 - Assign Profile to Mapping Area


•        
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>

Step S11A - Status Attributes


•        
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

Step S11B - Status Attributes (Values)


•        
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

Step S12A - Status Attribute Profile


•        
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

Step S12B - Status Attribute Profile (Items)


•        
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>

Step S13A - EE Monitor Activities


•        
Execute “Define Activities for the Expected Event
Monitor”



•        
Double-Click “Multitask EE Monitor Activities” and “New
Entries”



–       
Activity => ZEEM_OVERALL



–       
Description



•        
Save

Step S13B - EE Monitor Activities (Tasks)

Step S13C - Expected Event Profile (EE Monitor)


•        
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

Step S14A - Rule Set


•        
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)

Step S15B -- Rule (Condition Functions)


•        
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

Step S14C - Rule (Multitask Activities)


•        
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

Step S14D - Rule (Multitask Activities - Tasks)


•        
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

Step S14E - Rule Set Complete


•        
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>

Step S15A - EH Type Complete


•        
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>

Step S15B - EH Type (Unexpected Events)


•        
While in the applicable event handler type double click
“Unexpected Event Codes”



•        
Enter the applicable internal event code (S6A)



–       
CREDIT_ON



–       
CREDIT_OFF

Summary


•        
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

Step E100 - BPT (Delivery)


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

Step E101 - Event Types (Delivery)


•        
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

Step E102 - BaDI (Delivery)


•        
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.


Step E200 - BPT (Invoice)


•        
Copy ESC_SD_INVOICE => ZBPT_SD_INVOICE



•        
Enable EMsg Send and disable EH Create

Step E201 - Event Types (Invoice)


•        
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

Step E202 - BaDI (Invoice)


•        
Definition: BADI_SD_BILLING



•        
Implementation: Z_SAPTRX_SD_INVOICE



•        
Method: INVOICE_DOCUMENT_ADD



–       
Change BPT to that defined in (E200) ZBPT_SD_INVOICE

Step E300 - Config (IDoc-POD)


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.


Step E301 - IDoc-Outbound Partner Profile


•        
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.

3 Comments