Skip to Content

Restricting the value help in the variables screen of a BW query

If you have been looking for a way to restrict the list of values returned by F4 selection help on the selection screen of a BW query then there is finally a easy solution to this.

With BW 7.3 support pack 3 the BADI RSR_VARIABLE_F4_RESTRICT_BADI is finally working and can be used to restrict the value displayed on F4 help.

For the implementation please refer to the good documentation in IMG for the enhancement.

Here is a short illustration of the implementation.

Step 1- Create Enhancement implementation

Step 2- There are three options for creating the implementation class.

a-      Create empty class

b-      Copy example class

c-      Inherit from example class

For using option ‘c’ you would need to create your own example class first as the example class provided is declared as final.

Step 3- Choose a filter value for the BADI implementation.

Step 4- There are three methods in the implementation class.

Refer to the documentation for more details of the methods.

Step 5- Maintain the code of the implementation.

Example code. 

  IF i_vnam EQ ‘0D_FC_P21’.
    READ TABLE i_t_compid WITH TABLE KEY table_line = ‘0D_FC_AE_VAR_Q02’ TRANSPORTING NO FIELDS.
    IF sy-subrc = 0.
      l_s_range-iobjnm = i_iobjnm.
      l_s_range-sign   = ‘I’.  “including
      l_s_range-option = ‘BT’. “between
      l_s_range-low    = ‘FC001’. ” in internal format
      l_s_range-high   = ‘FC005’.
      APPEND l_s_range TO c_t_range.
      l_s_range-iobjnm = i_iobjnm.
      l_s_range-sign   = ‘I’.  “including
      l_s_range-option = ‘CP’. “Contains pattern
      l_s_range-low    = ‘FC01*’. ” in internal format
      CLEAR l_s_range-high.
      APPEND l_s_range TO c_t_range.
    ENDIF.
  ENDIF.

Related SAP Notes

Note 1461962 – Enhancements with SAP NetWeaver BW 7.02

As per this note this functionality is available from BW 7.02 (SAP NW BW 7.0 EHP2)

Note 1416952 – F4 BAdI

As per this note this new BADI can be used from SAP NetWeaver BW 7. 01 (SAPKW70109) or SAP NetWeaver BW 7. 30 (SAPKW73003)

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply