Before proceeding, I want to convey the motivation behind writing this blog is as follows:-
- Condition technique is a concept that is used widely in EWM, hence getting a proper understanding of this is a must.
- While doing some configuration with my colleagues, I found out some of them instantly understood how it worked, while some had a hard time understanding the concept of condition technique, therefore it motivated me to write this blog.
Let’s get started.
So, what is the concept of condition technique?
In short, the answer to that question would be, condition technique in SAP is a concept developed to define the conditional business rules for a business transaction in a generic manner.
For example, there is a certain business task that should only be executed for a very specific data set (also called condition record in terms of condition technique), this can be achieved using the concept of condition technique in SAP.
One more example from a warehousing perspective, let’s say you want to create automatic warehouse task creation in the inbound process conditionally that for some document types you want this to happen automatically while for some you want it to remain manual WT creation, this can be again achieved using condition technique.
Again, that was just an example, while configuring a warehouse, you will find that condition techniques are used very widely through the domain of SAP EWM.
Next question, what does the condition technique comprises?
So, in condition technique, there are certain attributes to it of which one should be aware of. These are basically the configuration term that one would see repeatedly while setting up condition technique, hence understanding these attributes are necessary as well, which are as follows: –
- FIELD CATALOG: A field catalog can be defined as the set of all possible applicable fields that could be used in defining fields for a condition record.
Example: We have a catalog with let’s 5 fields say, fields A, B, C, D, and E which are all possible types of data that can be used in a condition record. - CONDITION TABLE: A condition table is a grouping of the fields selected from the field catalog in order to define the condition record which is to be used in a business task as per our business rule.
Example: We have created condition tables for say:
ZCTBLE01 with fields A, B, and C.
ZCTBLE02 with fields B, C, D and E.Do not confuse field catalog with condition table as –
- Field catalog is a set of all applicable fields which can be used in a condition record.
- While, the condition table is a grouping of only those fields taken from the field catalog which we want to be used for the business task as per our business requirement. Field catalog is going to remain constant while more than one condition table can exist depending upon the type of business requirement one has.
- ACCESS SEQUENCE: Access sequence is used for ordering condition table. It means, that if we have multiple condition tables getting used in our requirement, then the order in which the system should consider going through all the used condition tables is specified through the access sequence.
Example: If we want the system to read the first condition table ZCTBLE02 first and then ZCTBLE01, then my access sequence could be as ZAS1 – 01 ZCTBLE02
02 ZCTBLE01 - CONDITION TYPE: A condition type comprises the access sequence signifying which condition table system needs to go through for validating the condition record.
The need of condition type is required as the assignment between condition type and access sequence is 1 to 1 therefore if we have multiple access sequences defined in the system, we can’t use all of the access sequences via a single condition type; hence condition type is required. Apart from this, condition types have other attributes as well which one will get to understand once they start configuring the same.
Example: Condition type ZCT1 – ZAS1 i.e. access sequence ZAS1 assigned to condition type ZCT1.
- DETERMINATION PROCEDURE: A determination procedure comprises of all the possible condition types defined in a certain order in which the system should go through those condition types.
For a certain business transaction to use the condition techniques and go through it’s attributes, the determination procedure is the entry point for that, what I mean is whenever we want to use the condition technique for a certain task, the determination procedure will always be the point from where the process will start and will go till determining the condition record which can be used to execute that certain business transaction.
Example: ZDP01 – ZCT1 i.e. condition type ZCT1 is assigned to determination procedure ZDP01.
- CONDITION MAINTENANCE GROUP: A Condition maintenance group or CMG is a grouping of those condition tables and condition types for which one can define condition records.
Example: if we define 2 condition tables ZCTBLE01 and ZCTBLE02 and 2 condition types ZCT1 and ZCT2, so in order to define condition records for these condition tables and condition types, it is required for them to be declared in CMG. In case if any of the condition table and condition type is not declared in CMG, one will not be able to define the condition records for them.
And, the final question would be how does it work?
So, basically, the way it works as follows: –
- A determination procedure is either determined by the system or we explicitly specify which determination procedure is required to be used.
- Once the determination procedure is determined, it will go through condition types for which the system needs to look for condition records.
- Once condition types are determined, the system will go through all the condition records are verify if any of the condition records satisfy our business transaction.
- if no condition record is found that satisfies our business transaction, then the next step will not be executed and the log for the same can be found in SLG1
- if a condition record is found to satisfy the requirement of a business transaction, the system will proceed with further execution.
Let’s explore this by configuring automatic warehouse task creation in the inbound process.
Pre-requisite: Automatic WT creation is done using PPF in SAP EWM, hence a little bit of awareness about configuring PPF will help a long way in understanding the condition technique.
First step would be to set up the determination procedure which is required to be used.
In our case, the required PPF action definition for auto WT creation is /SCWM/PDI_01_WT_CREATE and document in PDI – INB. Therefore, we need to determine the determination procedure for above PPF action definition and inbound document.
Here, as per below screenshot, we have assigned the determination procedure as 0DWTP.
Next step would be to identify the condition types assigned to the determination procedure.
As checked, condition type 0DWT is assigned to determination procedure 0DWTP.
One thing to notice is the application and usage in the following configuration.
Now, this would be the condition type for which need to maintain the condition record. But as discussed earlier, in order to maintain the condition record, we have to create CMG for the same.
Standard CMG for delivery-related WT creation is DLWV.
Now, if we check this CMG, we can see the maintained condition table is SAPDLV01, the condition type is 0DWT and the application is DPP. Application name and CMG will be later on required to maintain the condition records.
Now, finally, to maintain the condition records, we will go to transaction /SAPCND/GCM and will specify the application as DPP and CMG as DLWV. We’ll select the condition type 0DWT and fill the details as per requirement.
In our case, we have specified that if the PPF action definition is /SCWM/PDI_01_WT_CREATE, document type is INB, change mode is I (object created) and the warehouse is W212, then the warehouse task should get created otherwise WT creation wouldn’t take place.
One thing to notice is the condition table it picked in it is SAPDLV01 and if we check this condition table for the fields that were used to create the table, we can see the fields in this table are exactly the same as what we were presented while maintaining the condition record. In this way, a condition table is used in condition technique.
Now to test this, if we create an inbound delivery of type INB from WH W212 having PPF definition assigned /SCWM/PDI_01_WT_CREATE to its document action profile, we can check that the WT’s were created automatically.
Also, if we check the logs for this, we can see that the condition record is found and the PPF is successfully executed. That means our condition technique is working as expected.
In this way, the concept of the condition technique works.
Let me know if you have any questions or something you would like me to add to this article.
Also share your thoughts and leave a feedback as well.
Till next time, thanks for reading, and keep learning.