Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Interactive ALV - Enable Disable fields

Former Member
0 Likes
553

Dear all,

I want to enable and disable the fields of field catalog at run time.

Example:

PRICE TYPE AMOUNT CURRENCY QUANTITY UNIT PERCENTAGE

P1 12.00 EUR 22 KG 1

If P1 changes to P2 I want to disable the fields AMOUNT & PERCENTAGE.

How I can achieve this please help.

I am calling the data_changed of class cl_gui_alv_grid but its not solving the purpose.

Kindly help

Thanks & Regards,

Divya Jain

3 REPLIES 3
Read only

Former Member
0 Likes
491

Hi

See the report BCALV_EDIT_02

Max

Read only

Former Member
0 Likes
491

In your event handler call following method with

call method CL_GUI_CFW=>SET_NEW_OK_CODE( ' ' ).

This will trigger your PAI with action ENTER. If you have any specific action on ENTER, define some dummy ok_code in your PF-STATUS and pass that dummy ok_code to above method. (You can call method to refresh ALV in your dummy ok_code).

Regards,

Mohaiyuddin

Read only

Former Member
0 Likes
491

During the run-time you can evaluate the data. So when you have a change (according to your criteria) you can change the fieldcatalog (the field "EDIT" is controlloning if the field should be editable or not). Then you should reassign the fieldcatalog or by using the method SET_TABLE_FOR_FIRST_DISPLAY with the cobination of the set new ok_code method.

With regards

George.