cancel
Showing results for 
Search instead for 
Did you mean: 

PLD formula for territory / document total conditional

Former Member
0 Kudos

Dear All,

I am working on a Sales Quotation PLD and the requirement is as under :

2 text field e.g Field_329 and Field_344 is available in which the name of the persons are there respectively. I have a formula created also which is for Field_346 (Formula is Field_345>=100000) and Field_347 ( Formula is Field_345<=100000) wherein Field_345 is Document Total from OQUT table.

Now field_329 is linked Field_346 and Field_344 is linked to Field_347.

This solves the problem of having a condition to display 2 text fields based on the formula of >=100000 and <=100000. Its working perfect.

Now a want to put a additional condition or formula on the same field of Field_329 and Field_344 wherein it would get displayed based on the territory which is give in the formula. For example I want Field_329 to get displayed only for territory 10,12,18 and not for others. Now as I have already used and linked field_329 with Field_346 how can i put additional linkage or condition.

My whole concept is that the text field should get displayed in two conditions which is based on Document total and the territory of the Business Partner.

Please advise

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Add the field for Territory. eg F_351 Using the OCRD.Ter

Add another 3 formula fields to evaluate the value that returns in the territory field - F_351 = 10, F_351 = 12, F_351 = 18. These will evaluate to 0 if false and 1 if true.

Add another formula field which sums the 3 new formula fields e.g. F_352F_353F_354 = 1 i.e. if the territory is in the range you want, it is true.

This field can then be linked to your field.

If you want to evaluate a field based on two formulae, then create another formula field to compare the two formula fields you want to use. If both need to be true them use =2, if one or both needs to be true then use >1, then link this final formula.

It is a bit complex, so do some testing & see how you go

Former Member
0 Kudos

Your conditional formulae results are 0 for false and 1 for true. If you nest these, i.e. have multiple, you sum the results and use that as evaluation e.g. if ((doctotal>100000) + (territory = 18) + (territory = 10) )= 2 would be true if 2 of the 3 conditions are true. THe sum is 1 if only one is true and 3 if all are true.

Former Member
0 Kudos

Dear Gordan & Julie,

Thanks for your reply.

Gordon it would be not practical to use a UDF because if system is not able to do then I have no option but to make a separate PLD which I don't want to do as already there are many customized PLD in the system.

Julie I would be thankful if you can give me a detail of how that can be done as per your mentioned thread. I did not fully understood your suggestion.

Please advise.

Regards,

depika

Former Member
0 Kudos

Depika,

Julie's suggestion is the same with my first not recommended solution. You need to add many hidden fields to get the required Conditional Formula.

Former Member
0 Kudos

Although it is possible, it would be a very awkward solution. Because PLD does not support SQL, you would need at least 3 more fields for one condition test. To link this field to 3 Territorials and the current condition, you may need more than 12 fields.

It is better use UDF to achieve your goal.

Thanks,

Gordon