Showing results for 
Search instead for 
Did you mean: 

How to set a maximun of 10 items (new elements) in SAP OSA?

0 Kudos

In SAP Objective Settings and Appraisals, there is a "free enhancement" named "Add new element", I want to copy it, creating a new enhancement with an extra validation: count the number of new elements the user have created and stop with a warning message when the number of elements reach 10.

The question is: how can I count the number of VC objects (criteria level) that have been created in preparation or plan status?

We have SAP ECC 6.04 (enh. pack. 4) and SAP Enterprise Portals 7.0.

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Don't think that is possible with standard SAP. What you can do is to use the BADI 'Add upto seven elements' and customize that as per your requirement. Or you could work with this BADI itself and create a workaround.

0 Kudos

Hi Lincoln,

The solution I took, was to create a new implementation of the bAdi HRHAP00_ENHANCE_FREE and, in the method named ENHANCE_DOCUMENT, made a few changes:

- Declare a counter: DATA: lw_body_new_elements_count TYPE i.

- After the read of READ TABLE lt_hri1001 INTO lw_hri1001 INDEX 1.

I type a loop to count how many new elements have been added. When a new ellement is added, the rows of this elements in the table t_body_elements fills the fields foreign_type and foreign_id. Here is the simple loop:

CLEAR lw_body_new_elements_count.

LOOP AT t_body_elements INTO lw_body_new_elements


AND foreign_id IS NOT INITIAL.

lw_body_new_elements_count = lw_body_new_elements_count + 1.


IF lw_body_new_elements_count LT 7.

- After activate the implementation, its important to call the transaction OOHAP_BASIC and to add the enhancement to Free Enhancements. Then edit the category of the template (in the templates catalog) and to add the enhancement.

The only problem here is this method makes a validation of all new elements yo have in the same template. But is a good solution to me.

Answers (0)