Skip to Content

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

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!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 13, 2010 at 11:36 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

      WHERE foreign_type IS NOT INITIAL

      AND foreign_id IS NOT INITIAL.

      lw_body_new_elements_count = lw_body_new_elements_count + 1.

      ENDLOOP.

      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.