Skip to Content
Technical Articles

Working with Value Help in SAP Cloud Platform Business Rules

Business rules have always been a brilliant tool to automate decisions or achieve validations or define complex regulatory or compliance rules etc. This tool has evolved over time and again with change in platforms ranging from ABAP to Cloud. With recent innovations and change in strategy, SAP Cloud Platform Business Rules is to become the central tool to author, manage and extend rules.

This means that business rules modelling in cloud has to be enhanced with best-in-class features and capabilities from all these different rules technologies – and the enhancement has to be made such that it ultimately eases the development effort of business users and application developers. One area of improvement was the need of value help while authoring rules that are (a) based on fields which have some predefined values in the backend system or (b) based on a fixed set of approved values based on organisation and department. For examples: country codes, currencies, financial document types, product ids from backend ERP or Ariba systems or list of country specific benefits from SuccessFactors etc.

As business rules are highly customizable and changeable based on organisation’s need and market trends, it is important to have such features (like value help) which ensures that business users don’t have to remember or contact the backend expert to search for these value list instead they are smartly available for them while modelling or updating the rules.

In this blog, I am going to explain you on how to work with value help in SAP Cloud Platform Business rules. To start with, here are some quick information:

  1. value help is available for the attribute in data object
  2. value help is offered in two ways (a) static and (b) dynamic.
    • Static value list is manually defined while authoring attribute
    • Dynamic value list is fetched from the backend configured system which could be any SAP, non-SAP, cloud or on-premise system. For this, the backend system must expose OData or REST-service that would be consumed by business rules to obtain the required value set.

Let’s start …

STATIC VALUE LIST

  1. To model static value help, navigate to attribute of the data object and switch to Value Help tab

 

  1. Click on Edit (on top-right corner) and click on + button to add a new row.
    Then, select the Value List option to create static value list

 

  1. Click on Value Help row. It will lead you to the screen from where you can create, save and update the key-value pairs for your value list.

Note: Once you create a value help pair, you cannot change the value(key). You can only change the description. When you want to model the rule, you will see both key-value and when you select one pair, the key gets shown and persisted.

 

  1. If the attribute has value help assigned to it, then you will see “Select from value help” option on the top while editing the rule using auto-suggestion option.

 

  1. On selecting that option, you will see static value list in the new pop-up.
    note: you can search for the value or description like AGR or Argentina based on the exact text.

 

  1. Once you select, the value (or the key) gets selected and persisted in the business rule

 

DYNAMIC VALUE LIST

  1. If you want to use dynamic value list, then you first have to create destination. This can be done from SAP Cloud Platform cockpit.

 

  1. Next, you have to configure the system in SAP Cloud Platform Business Rules. To do so, you can use Configure Systems views –> add a new system –> give any name of your choice –> give the same destination name as created above and keep context-path as empty, as shown

 

  1. Navigate to the attribute of the data object. Switch to Value Help tab and add a new value help with Service URL Mapping option

 

  1. Enter the information of the service URL that would be triggered to fetch the values

 

rest how you use auto-suggestion for dynamic value help is the same:

 

This feature is available in all factory accounts and trial. Try it out for and let me know if you face any issues or need any further assistance with this feature. For more information, you can read the help documentation

 

 

 

 

6 Comments
You must be Logged on to comment or reply to a post.
  • Hi Archana,

    Thank you for guiding how to use look ups in Business Rules.

    I tried setting up a static lookup but when I try to add the values in the decision table, I am able to enter the values which are not a part of the lookup. Would the lookup not restrict the user to pickup the value from the value help created?

     

    Regards,
    Sruti

    • Yes, Value help association to data-object attribute does not mean that you can use only value help. You can choose the values via value-help or enter static value or also a dynamic value.

       

  • Hi Archana,

    I tried creating a Dynamic Value Help following your blog and the SAP help documentation.

    The value help does not work for me and when I debug more I see the below error.

    I have ensured that the destination is configured correctly and I do not use the managed system name in the URL while defining the value help.

    It would be great if you could point if I am missing something.

    <?xml version=“1.0” ?><error xmlns=“http://schemas.microsoft.com/ado/2007/08/dataservices/metadata“><code></code><message xml:lang=“en”>counting the entity was unsuccessful</message></error>
    –batch_791b7320-71a3-4723-938e-2332b84808cb
    Content-Type: application/http
    Content-Transfer-Encoding: binary

    HTTP/1.1 400 Bad Request
    DataServiceVersion: 1.0
    Content-Type: application/json
    Content-Length: 127

    {“error”:{“code”:“bpm.rulesrepo.enum.invalidexternalvalue”,“message”:{“lang”:“en”,“value”:“Managed System is not configured”}}}
    –batch_791b7320-71a3-4723-938e-2332b84808cb–

     

    Can you also tell if I make a column as Dynamic Value help, can I enter values which are not a part of the value help?

     

    Regards,

    Sruti

  • Hello Sruti,
    Ofcourse you can use any other value even if you have configured for Dynamic Value.
    From the error message, it shows that you have not configured the system via Configure Systems (step 8 in my blog) – can you confirm if you have done that. Please raise the issue in LOD-BPM-RUL if the issue still persists after you have ensured that you have diligently followed my blog!

  • Hi Archana,

    Thank you for your response.

    Is forcing the user to pick the value from the Value Help on the road map? We have a business requirement where the user should enter a value which is valid.

    We have created/configured the system as described in the blog but it is not working. We will raise a ticket for the same.

    Regards,
    Sruti