on 03-27-2020 10:47 AM
Hello Experts,
I want to validate the some code list like Distribution Channel , Division which are code list. So i am trying to Validate through SDK but i don't know how i can do. Is it possible to check validation through scripting if some one pass the wrong data through ERP and record should not be created and raise error message.
Hi,
May be you can have try with CodeList reuse library delivered as part of "AP.PlatinumEngineering" namespace. A sample code would be as follow where you can get all possible values for DivisionCode data type and then you can just validate if value received from ERP is matching with the one form CodeList.
import ABSL;
import AP.PlatinumEngineering;
import AP.Common.GDT;
var DataType = "DivisionCode";
var AllowedCodes = Codelist.Get(DataType,"http://sap.com/xi/AP/Common/GDT");
Thanks
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Unfortunately, there is no official documentation available for PlatinumEngineering namespace based libraries. Its all hit and trial for now. 🙂
Hi Sanjay,
As I understand , you want to validate the value of say Distribution Channel or Division on C4C when the value is passed from ERP to make sure, ERP only pass the allowed values and if ERP pass the wrong value then you want to raise an error.
I think SDK is the wrong place to do this validation if you want to check for the values coming from ERP. This validation should happen in the Middleware (CPI or PI) and Middleware should log this error. (because you mentioned if ERP is sending wrong value for Sales area (SO,Division,Distribution Channel). C4C Documents offer the Integration Error tab where error due to integration can be seen & this is something can be used on C4C to show meaningful error to user.
Ideally Code List mapping is the correct way to handle the ERP & C4C value mappings for integrated scenarios - where you maintain what values from ERP should map to what values in C4C. This makes sure, whatever value ERP passes, C4C always consider the correct value as maintained in C4 System.
On Contrary, If you want to raise error based on Sales Area selected by user so that wrong sales area is not passed to ERP - then that is something should be handled in C4C and possible options are
1) Code-list mapping - which ensure correct values are passed to ERP for C4C codelist
2) Code List restriction so that user is not shown a value they shouldn't be selecting ( You restrict the division and distribution channel values via code list restriction on business role so that C4C user is shown and therefore can select only the values allowed to them.)
3) KUT validation Rule - based on other condition you want to validate user's selection of Sales area.
SDK to be used only if none-of the above can be used.
Thanks,
Suchita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sanjay,
There's no reason why this shouldn't work. Create a ValidationOnSave Event on the BO Root Node and check for values. It would however cause the web service to fail if a false value is returned.
- Cian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.