on 11-05-2014 5:06 AM
Hello,
I am creating a custom data model in SAP MDG in flex mode. The requirement is that that a customer cannot be assigned more than one payment term. How can I achieve this through validations or any other method if possible?
Any tutorial or link or tcode will be highly helpful. Appropriate answers would be awarded points.
Your statement is a little confusing: you are saying that you are creating a custom data model but you are working with "customer" object. Do you mean you are enhancing the standard Customer data model with a custom field?
I hope you are not trying to avoid BP by creating a custom model for customer only. This might sound appealing at the moment, but you will face serious issues later when your system needs to be upgraded. As I suggest to anyone who struggles with BP, please don't resist it. Instead, learn how BP works as that will be of great benefits on the long-term.
For your question, there are many ways to do it. The most obvious is to write a validation rule that checks for only one payment method and if the user selected more than one then issue an error message. This might not be the most user friendly (as you are telling them their mistake after allowing them to pick multiple values). Another cleaner approach is to enhance the feeder class of the UIBB to only accept one field (implement the validation in the GET_DATA method of the feeder class). A third solution that I prefer if you are going to enhance the feeder class is to display a dummy single-char field that contains a list of all payment terms. You can create a domain to list them all. Then, in the feeder class GET_DATA, copy the content of that field into the payment term field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinayak
Do you mean that you want to default one particular payment term for every customer. If yes then use derivation function and use logic for Customer Account Group payment Terms and make it read only in UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.