on 03-31-2012 5:45 AM
Hello,
I have a selection screen and an ALV output view. There is a custom button 'CHANGE' in the toolbar on click of which the selected alv row becomes editable. There is another button 'BACK' which takes the control back to the selection view. Now if the user presses the 'CHANGE' button and then the 'BACK' button the selection screen is displayed and if the user enters any new selection criteria the new data is displayed but the ALV is in editable mode.
Example :
1. Selection screen : User enters Carr id as 'AA'.
2. ALV output is displayed. User chooses a record and presses 'CHANGE'. ALV Is in editable mode.
3. User presses 'BACK' button. The selection view is displayed. User enters Carr id as 'BB'.
4. ALV is displayed but instead of display only mode it is by default in edtiable mode.
The previous editable mode of the ALV didn't get refreshed. I tried using Set_read_only(abap_false) but not working. Please hel
Thanks,
Prem
You need to set the alv in readonly mode in back button action
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Srinivas and Lekha,
Thanks for your reply but as i said i have already tried to set read only but it is not working.
When the first view calls the alv view( the second view) by default it is in read only mode. It was initially in editable mode but i have written the code to set it to read only. The problem occurs after the alv is in editbale mode after click of the 'CHANGE' button. I have tried using set read only as false but it is not working . If you can give some code sample it will be of great help.
Thanks.
Only in Change button, you want ALV to be editable.
Paste your code. Is there any attribute in your node that sets read only and that is bound to any column.
In 2nd view, Handler method for inbound plug of 1st view, code it for non editable as abap_true.
In change button, use abap_false to set as editable.
when you click on back button, and again when moved from 1st to 2nd view, above handler method gets called that sets as non editable.
Your coding should be only in these places. I guess you might have coded it in modifyview or some other event. Please check it in debugging.
Hope this helps.
One more things, For all columns I guess you might have taken TEXTEDIT as cell editor. Consider Input field as cell editor.
You need to code it in plug handler method.
From 1st to 2nd view, 2nd view's respective handler should have a code to make ALV display only using above method.
Now, when ever you come from 1st to 2nd view, this handler plug method gets called and it will always display ALV in display mode.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.