on 04-13-2006 2:30 PM
Hi All,
An ALV can be set into editable state by
1. setting the layout attribute "edit" to 'X' and also by
2. calling the method "set_ready_for_input" of cl
guialv_grid.
The SAP documentation in the sample program BCALV_EDIT_01 says that
<u><i><b> You switch between "editable and not ready for input" and
"editable and ready for input" using method SET_READY_FOR_INPUT.</b></i></u>
i didn't quite understand the feature "editable and not ready for input". Even if i don't
call the method "set_ready_for_input" i'm able to edit the ALV, then what is the necessity
of calling this method.
Vijay,
You can set the EDIT feature in two ways.
1. Layout level - all the fields will be in edit mode.
2. FIELDCATA leve - only those fields for which you set EDIT = 'X' will be in edit mode.
Now, the method in question is used to toggle between edit and read only mode at run time. Just like ME22n transaction.
You can even set the EDIT functionality at the CELL level with in a column using STYLES.
Regards,
Ravi
Note : If this solves your issue, please close the thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the below code set the grid editable for the fields with option edit = 'X' only it is required for initial.
CALL METHOD g_grid->set_ready_for_input
EXPORTING i_ready_for_input = 1.[/code]
you can switch edit off with the below code..
CALL METHOD G_GRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 0.
Regards
vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi vijay
In the documentation it is defined that editable and not ready for input is that it will be in the editable mode but not active by default the editable feature is present but not activated using method SET_READY_FOR_INPUT the feature is activated initially.
hope u might have understood...if not please let me know.
priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priya,
It seems there is a little confusion in understanding my question or may be i'm not able to understand ur explantion. I'm again repeating the same.
Even if we don't activate the edit feature by using the method set_ready_for_input, we'll be able to edit the grid by setting the "EDIT" of the layout structure to 'X', isn't it?. As we are able to edit the grid with out calling the method "set_ready_for_input"(i.e, in the deactivated state) then what is the necessity to call this method?
Hi,
it is just a call for Initially. but when you want to turn it off you need to call the same method. if you set layout-edit = 'X' then the whole grid is editable .
how will you turn it off, it is only possible via this method or using styles conditionally can make it edit off.
the method can be used in two ways.
to make grid edit or non edit.
Regards
vijay
Vijay,
Although the EDIT option (Enabled using FIELDCAT / LAYOUT) is enabled, its not ready for input (DISABLED at runtime).
IF you enable it, its enabled at both places.
Without Switching on the EDIT at layout / fieldcat level, I don't think you can use the method at runtime.
Regards,
Ravi
Note : Please mark the helpful answers
Ravikumar,
This is what i'm trying to explain, it is just enough to set the edit attribute of layout/fieldcat to make the grid ready for input at runtime. By going through the replies i came to a conclusion that the method set_ready_for_input is only used for switching purpose at runtime. Correct me if i'm wrong.
Vijay,
You are absolutely right.
If you want to have EDIT functionality all the time, set it at the LAYOUT / FEIDCAT level.
If you want to toggle between the modes, set it at the LYAOUT / FIELDCAT level and then call the method wherever you want to switch. Assume I have CHANGE/DISPLAY button on the toolbar and the user wants to toggle between the modes, that is when you will use this.
Please close the thread, if the issue is closed - Also mark all the helpful answers.
Regards,
Ravi
Message was edited by: Ravikumar Allampallam
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.