on 2021 Mar 19 12:49 PM
Hi,
We want to substitute the profit center in a sales order based on the product hierarchy. Our product hierarchy is 6 digits long and we only want the substitution to check the first 4 digits.
Suppose we have 2 product hierarchies: 123456 and 223456. Our substitution logic is as follows:
Step 1: if PCASUB-PRODH = 1234, PRCTR = ABC
Step 2: if PCASUB-PRODH = 2234, PRCTR = DEF
However, in the sales order, we have the entire product hierarchy filled (e.g. 123456). Our substitution logic is not working in this case. We have tried putting a * after the first 4 digits of the product hierarchy in the substitution rule: if PCASUB-PRODH = 1234*, PRCTR = ABC. This does not work.
We have also tried with the operator LIKE in the substitution rule: if PCASUB-PRODH LIKE 1234*, PRCTR = ABC. This also does not work.
Is it possible to make a substitution work for this without an user exit?
Best Regards,
Sameer S Gupte
Request clarification before answering.
Hi,
You can take part of the field only in your checks, e.g. PCASUB-PRODH :1-4: = '1234'. If this doesn't work, you have to create user-exit in substitution. Boolean rules allowed by the system without ABAP are quite limited in substitution transaction logic.
Regards,
Eli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
We did not see your answer in time. We solved this by creating sets and filling the sets with product hierarchy values with 4 & more digits in the sets. For e.g. in one set we put the following values: 1234, 12345 & 123456 and in another set we put the values 2234, 22345 & 223456. The substitution works with this logic.
Best Regards,
Sameer S Gupte
User | Count |
---|---|
113 | |
9 | |
7 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.