Skip to Content
Author's profile photo Former Member

How to restrict F4 help for more than one SAP BI Report?

There are documents already published on how to restrict F4 help values in BI Report queries. But in case where you have to do this for more than one query we can make this dynamic and same BADI implementation can be called for all the reports for which this is required.

Business scenario

We were working on retail SAP BI implementation and we have a requirement of having different levels of article hierarchy in selection screen in most of the reports that we have developed. Now the requirement was to populate the second level of hierarchy based on the first level  and third level based on the second level.

So for example this first level of hierarchy is Department.

Department will have Values as below

1

2

3

4

Now if the next level is division it will have values like

101

102

103

201

202

2013

Now if the user enters Department 1, for division F4 help he should only see below values

101

102

103

Now this has to be done for many reports.

Solution:

We can create a parameter table in SAP BI and call it  “ZBI_F4_HELP”.

Below will be the fields in the table

Image 1.jpg

I_Query = Technical Name of the Query

I_IOBJNM = Technical Name of the Info-Object

I_VNAM = Technical Name of the Variable by which the info-object is restricted

I_DESC = The level of the Info-object (In our scenario for Department it will be 1 for division it will be 2)

The screenshot below shows the sample entries.

Image 1.jpg

So from above screenshot what we want is when Query ZRT_MP01_Q046_A is executed, we want the F4 values for variable for 0MATERIAL_0CM_CDT2 should populated based on value for variable for 0MATERIAL_0CM_CDT1 and value for 0MATERIAL_0CM_CDT3 should be populated based on the variable value for 0MATERIAL_0CM_CDT2.

The code in BADI will look something like below.

Image 1.jpg

We first read entries from the parameter table ZBI_F4_help for the given query.

Now we have to read the relevant row for the given info-object and populate variable values accordingly.

Sample code is given below for 2 levels. The values for second level is read from material master.

Image 1.jpg

Image 1.jpg

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.