I have a requirements that if there is and invoice for quantity 20 and the customer has returned 10 and then another 5 (therefore, leaving only 5 of the original 20 left to return), I need to populate the quantity on the next return with the 5 remaining, not the original 20 when referencing the original invoice.
I know ABAP code is going to need to be written, but I need some direction on where to do this. I have tried the user exists and modifying the SAP code.
Also, reactions from the system:
1) When the user goes to create the 3rd return, the quantity on the return should be 5.
2) The user should be able to change this to anything equal to or lower than the 5. If they change it to 6 or more, I need an error telling them that 15 of the 20 have already been returned.
I hope this makes sense.