Hello Community,
I hope you all are doing well.
I am attaching a screenshot of a use case for your reference

In the following use case what I have to achieve is,
Based on FG Code and RM CODE
Suppose, Requirement is 6 and and Possible is 21 , so order can be completed.
After completion, balance will be 15.
Then again, requirement is 6, possible is 15, so order can be completed.
After completion, balance will be 9 and so on
I want to build this logic.
Moreover, this is for one FG CODE and RM CODE
There are many FG CODES and each FD CODE has many RM CODES
I hope I made the use case clear. Please help
Thank You
~Rhitik Krishnani