Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

In last blog, http://scn.sap.com/community/aif/blog/2014/12/26/enhancement-toolbar-on-view3-and-view5-for-monitori...,

I wrote how to enhance toolbar on View3. Today, i`d like enhance the editability of cells on View3.

As you know, we could set cells editable or not by Customizing,

/AIF/CUST -> Error Handling  -> Define Interface-Specific Features/Define Namespace-Specific Features -> Define Changeable Fields.

Except this, we could do more by implement BADI '/AIF/V5_CHANGEABLE_FIELDS', like according record type to set editable,

or according a certain value of other cells to set current cell editable. Let`s do it.

1, Create BADI Implementation,  '/AIF/V5_CHANGEABLE_FIELDS'.

2, There are three methods, which is independence.

4,  The Method 'INIT', it is called before every displaying data. we could write code in it like below:

 

The result as below, 'ADD_DATA1' the whole column become editable. 'ADD_DATA_KEY' is editable, due to i set it in Customizing:

 

5, The method 'GET_FIELDS_PER_RECTYPE', will be called for record type under structure in View2.

    CR_DATA containing the whole data of current message which you double click.

  

   The result as below, 'ADD_DATA2' become editable:

  

6, The method 'GET_FIELDS_PER_LINE', will be called for each data in View3. CT_DATA is current data in View3.

    How many data rows in View3, this method will be called how many times. In my example, it will be called twice.

  The result as below, 'ADD_DATA3' column, only the cell which 'ADD_DATA1' equal 'CNN' become editable :

With this BADI, you could dynamical set cells editable, it make Error Handling more flexible. :smile:

Regards,
Archer

Labels in this area