Show TOC

 Dynamic Help Texts and Checks Using BRFplus

 

Definition

You can use rules of the type Help Texts and Checks to display messages directly in the attribute. You can select inadmissible values accordingly and provide an explanatory text for them. You can acccess SAP message classes here.

Application usage

CI - Help texts and checks

Reference object / cardinality

Attribute / 1:n

Versioned

Yes

Redefinition

Yes

Implementation class

CL_CRM_ISU_BRF_APPL_USAGE_CI

Inbound parameter

Variable according to the context generated

Return value

See table

Expression Type for Function: Decision Table

The following table contains an overview of the help texts and checks characteristics:

Column

Description

Possible Entries

Data Element

Comment

Condition

Such as attribute X

Attribute used as the basis for defining the field value

Boolean expression

Applies or does not apply

Result

ISURSLT_INVALID

Inadmissible value indicator

' ' Attribute is admissible 'X' Attribute is not admissible

CHAR1

ISURSLT_REASON_TEXT

Descriptive text for inadmissible values

Free text

String

This text is displayed for the attribute if an error occurs.

ISURSLT_MSGTY

Message category

E: Error

W: Warning

I: Information

S: Success Message

See ABAP documentation for message and message class

ISURSLT_MSGID

Message class

ISURSLT_MSGNO

Message number

ISURSLT_MSGV1

Placeholder 1

ISURSLT_MSGV2

Placeholder 2

ISURSLT_MSGV3

Placeholder 3

ISURSLT_MSGV4

Placeholder 4

Note Note

At runtime, the system processes the decision table again if an attribute created by choosing Add Context Attribute has changed.

End of the note.

Example

A product contains an attribute Requested Contract Start and an indicator Change of Supplier. If Change of Supplier is selected, the contract start must not be less than 21 days in the future.. The system creates a new rule for the attribute Requested Contract Start. The attribute Change of Supplier and the attribute Requested Contract Start are used as context-dependent input parameters and the return value ISURSLT_INVALID is calculated using a formula. The formula compares whether the contract start date is found less than 21 days in the future and returns the value 'X' for this column with an error message if this is the case. This defines the value as being inadmissible and a corresponding message is displayed behind the input field at runtime.

The decison table contains the following values in the example shown here:

Condition - Change of Supplier

Result - ISURSLT_INVALID

Result - ISURSLT_REASON_TEXT

'X' (Option selected)

Boolean value formula: 'Start date of contract' < (DT_ADD_DAYS (DT_GET_CURRENT_DATE( ), 21 )

Contract start must be at least 21 days in the future

' ' (Option not selected)

' ' (Option not selected)