Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 

Here in this blog , i would like to share my experience with code values check provided by BOPF Framework, as we all know BOPF frame work enables developer to develop application in a unique approach.Of course it also provides with lot of  generic  features which makes developer life easy.similarly it provides generic way to validate BO Node field values against the value range in the data domain.Feeling happy in writing a blog for BOPF.  

BOPF provides the generic validation class /BOFU/CL_V_CODE_VALUES ,Which shall be  inherited in order to implement the validation check against the Domain value range for the BO node attribute.

As we can see this generic class implements /BOBF/IF_FRW_VALIDATION, So it is recommended to implement BOPF validation to the respective node by inheriting the class :wink: . and the method GET_VALIDATION_CONFIGURATION which is an abstract method need to be redefined.

Let me quickly take through 3 easy steps on how to implement the validation.

Creating Action validation :

     i have created a action validation for the node 'PR_ITEM' , it is been modeled  to trigger the validation on the instance update of the node PR_ITEM.


          Now lets implement the abstract method GET_VALIDATION_CONFIGURATION, this methods keeps track of the information of the node attributes to which the field value are to be validated. i do some dirty coding some times :wink: .Here we bind the node attribute and the data domain object of the node attribute and give it back to the validation. Note: Data Domain is mandatory for the node attribute in order to perform this validation ,also i have tried only with the fixed value range of the domain but not with the domain value table.

     In the above image i have defined the 'MAT_TYPE' and Domain 'ZMAT_TYPE' , so when ever the field MAT_TYPE is provided with the values which is not maintained in the Domain values , BOPF will not allow the instance to update.


          So finally we have implemented code values check to a node attribute let test the application on the test ui and we will how BOPF reacts to it.

In the below image ,Attribute MAT_TYPE has 4 possible values in domain fixed values.

and when we try to input some other values rather than the possible 4 entries , validation stops the instance update process with error message as shown in below snip.


          So  the code values check helps in validation of the node attribute with quick and easy implementation with generic implementation,Thanks for reading and am not so expertise in writing a blog but i think this blog at least  give some overview knowledge in BOPF code values check.Like wise BOPF provides other lot of features which definitely helps in let me come up with some other new BOPF topic on my next blog,Happy Blogging !!!. :smile:

Labels in this area