7.8. Fomularios y CGI: Comunicación con el servidor
7.9.2 Imágenes Sensibles Procesadas en el Servidor Web
The first example describes a simple demo setup for using the change controller to react on changes done for Freight Orders of a specific type.
1) Create an example Freight Order Type ZCCD in the TM customizing. Path: SAP Transportation Management Transportation Management Freight Order Management Define Freight Order Types (you can copy an existing Freight Order Type and name it accordingly).
2) Create a new condition ZENH_QUAN_TOL_DET with the following parameters:
Condition : ZENH_QUAN_TOL_DET
Description : Enh. Quantity Tolerance Det. Condition Condition Type : /SCMTMS/CC_QUAN_TOL
Define the following content for the decision table of the condition: Quantity Change of Weight
in default weight unit of measure
Qty Change
> 50 X (Relevant Quantity Change) <=50 False
Save and simulate the new condition. It will consider a quantity change (in this case a quantity increase) of more than 50 kg as a relevant quantity change that the change controller shall later react on. Quantity changes below 50 kg will be considered as not relevant. The result of this Quantity Tolerance condition will be used in the following for the determination of a suitable change controller strategy.
3) Create a new condition ZENH_DATE_TOL_DET with the following parameters:
Condition : ZENH_DATE_TOL_DET
Description : Enh. Date Tolerance Det. Condition Condition Type : /SCMTMS/CC_DATE_TOL
Origin of Condition : Condition Based on BRFplus Decision Table Define the following content for the decision table of the condition:
Maximum Delta of Date Changes
Date Chg. Is between 0 and 4000 “ “
Is between 4001 and 8000 2 (Non-Critical Change)
> 8000 1 (Critical Change)
Save and simulate the new condition. It will consider a date change (in this case a time increase) of more than 8.000 minutes as a critical date (time) change that the change controller shall later react on. Date changes between 4.001 and 8.000 minutes will be considered non-critical changes. Changes between 0 and 4.000 minutes are considered as no change. The result of this Date Tolerance condition will be used in the following for the determination of a suitable change controller strategy. 4) Follow the IMG path to the Process Controller SAP Transportation Management
SCM Basis Process Controller and define the Change (Process) Controller Strategies ZENH_CHAC1 – ZENH_CHAC7 each of service type TOR_CHACO (the type for asynchronous processing). For each strategy n (n = {1, … , 7} assign the following standard methods (they just serve as a demonstration and you can of course play around with it and define your own sequences of methods for each strategy):
ZENH_CHACn Change Strategy n DEF_REACT Def. reaction to date, location, quantity changes
ZENH_CHACn Change Strategy n CHECK_CAPA Check Capacities ZENH_CHACn Change Strategy n FIX_TOR Fix Freight
Document 5) Create a new condition ZENH_CC_DET with the following parameters:
Condition : ZENH_CC_DET
Description : Enh. Change Cont. Strategy Det. Condition Condition Type : /SCMTMS/CC_TOR_STRAT
Origin of Condition : Condition Based on BRFplus Decision Table Define the following content for the decision table of the condition:
Indicates whether a quantity has been changed for this TO
TO Type
Indicates whether a date change has happened and classifies this
CC Strat.
False ZCCD “ “ DEF_CHACO
False ZCCD 1 (Critical Change) ZENH_CHAC1
False ZCCD 2 (Non-Critical Change) ZENH_CHAC2
X (Relevant Quantity Change Determined)
ZCCD “ “ ZENH_CHAC3
X (Relevant Quantity Change Determined)
ZCCD 1 (Critical Change) ZENH_CHAC4
X (Relevant Quantity Change Determined)
ZCCD 2 (Non-Critical Change) ZENH_CHAC5
Save and simulate the new condition. It will consider a date change (in this case a time increase) of more than 8.000 minutes as a critical date (time) change that the change controller shall later react on. Date changes between 4.001 and 8.000 minutes will be considered non-critical changes. Changes between 0 and 4.000 minutes are considered as no change. The result of this Date Tolerance condition will be used in the following for the determination of a suitable change controller strategy. 6) Use the created conditions in the customizing settings for the Freight Order Type
ZCCD from step 1) to make the following entries in the required fields: Default Change Strategy DEF_CHACO
Change Strategy Det. Cond. ZENH_CC_DET
Quantity Tolerance Cond. ZENH_QUAN_TOL_DET Date Tolerance Condition ZENH_DATE_TOL_DET
With these settings, changes for Freight Orders of type ZCCD will use the standard Change Strategy DEF_CHACO as the default strategy. Condition ZENH_CC_DET will be used to determine a Change Strategy depending on the types of changes and related entries in its decision table. The other two conditions that we have created will be used to determine the relevance of quantity and date/time changes by checking the configured tolerances.
In the example mentioned above a quantity change was done for a Freight Order of type ZCCD, i.e. the gross weight of the first item was changed from e.g. 645 KG to 900 KG. According to condition ZENH_QUAN_TOL_DET created in step 2 this change is considered a relevant quantity change. The result of this condition is then passed to the Change Controller Strategy Condition ZENH_CC_DET. In the example there was just a quantity change but no date (time) change detected. This situation matches line 3 in the decision table of condition ZENH_CC_DET that leads to the usage of Change Strategy ZENH_CHAC3 (just like shown in the example above).
The second example is based on the first one and describes a simple demo setup for using the change controller to react on quantity changes done for a Forwarding Order (instance of BO TRQ) that has unplanned unfixed Freight Units (instances of BO TOR) assigned. The Freight Units shall be adjusted to the new quantity entered in the Forwarding Order.
1) Create an example Freight Unit Type ZCCU in the TM customizing. IMG Path: SAP Transportation Management
Transportation Management Planning Freight
Unit Define Freight Unit Types (you can copy an existing Freight Unit Type and name it accordingly).2) Enhance the decision table of Condition ZENH_CC_DET from step 5) of the first example with the following entry:
X (Relevant Quantity Change Determined)
ZCCU “ “ ZENH_CHAC7
3) Follow the IMG path to the Process Controller SAP Transportation Management
SCM Basis Process Controller and define the Change (Process) Controller
Strategy ZENH_CHAC7. Assign the following standard method to the strategy:ZENH_CHAC7 Change Strategy 7 REBUILD_FU Rebuilds unplanned, unfixed FUs
This strategy will execute standard method REBUILD_FU for rebuilding Freight Units based on quantity changes done for the related Forwarding Order from where the Freight Units were created.
4) Use the created conditions in the customizing settings for the Freight Unit Type ZCCU from step 1) to make the following entries in the required fields:
Default Change Strategy DEF_CHACO Change Strategy Det. Cond. ZENH_CC_DET
Quantity Tolerance Cond. ZENH_QUAN_TOL_DET Date Tolerance Condition ZENH_DATE_TOL_DET
With these settings, changes for Freight Units of type ZCCU will use the standard Change Strategy DEF_CHACO as the default strategy. Condition ZENH_CC_DET will be used to determine a Change Strategy depending on the types of changes and related entries in its decision table. The other two conditions that we have created will be used to determine the relevance of quantity and date/time changes by checking the configured tolerances. In this specific example strategy ZENH_CHAC7 will be found and executed when a quantity change is done to the Forwarding Order that a Freight Unit of type ZCCU relates to.
5) Follow the menu path Application Administration Planning (General Settings) Freight Unit Building Rule. Create a Freight Unit Building Rule ZCCU_FUBR with document type ZCCU that was created in step 1). Use the following settings:
Description Enhancement Freight Unit Building Rule
Document Type ZCCU
Incompatibility Settings [space]
Freight Unit Building Strategy Consolidate per Request (Compatible Parts)
Critical Quantity Gross Weight
On tab strip Advanced Settings choose FUBR_AUTO as the Process Controller Strategy. On tab strip Planning Quantities make the following entry:
Planning Quantity for Freight Unit Building
Gross Weight Unit of Measure for Split
Quantity
KG
Split Quantity 1.000
6) Follow IMG path SAP Transportation Management Transportation Management Forwarding Order Management Forwarding Order Define Forwarding Order Types and define a new Forwarding Order Type ZFWO.
You can copy e.g. an existing Forwarding Order Type, name it ZFWO and assign Freight Unit Building Rule ZCCU_FUBR to it. Moreover set the flag Automatic Freight Unit Building so that Freight Units are built when saving a newly created Forwarding Order of this type.
7) You can now create a simple Forwarding Order of type ZFWO with e.g. a single product item that contains a Gross Weight Quantity of e.g. 2.570 KG. Save the Forwarding Order and take a look at the created Freight Units via tab strip Document Flow. With the given example configuration you should receive exactly one Freight Unit that carries the complete quantity.
8) Edit the example Forwarding Order and adjust the Item Gross Weight Quantity to e.g. 3.240 KG. Save this change and display (or refresh the eventually still open UI for your example Freight Unit) the Freight Unit again. The Change Controller Strategy found for the Freight Unit has detected the quantity change in the underlying Forwarding Order and adjusted the Freight Unit quantity accordingly.