on 2013 Aug 21 5:39 AM
Hi Experts,
I have a webdynpro ABAP ALV report. In the ALV table there are 2 columns: CarrierCode and CarrierName.
CarrierCode column is editable and CarrierName is display only.
When the user changes CarrierCode entry and places the cursor to the next cell, the CarrierName value must be updated ( using select query on a table) immediately. I have tried ON_CLICK event handler but it does not get triggered when I click on next cell.
The definition of ON_CLICK is as below:
ON_CLICK After Click in Cell of ALV Output
So it should have worked. What could be the problem?
I have tried ON_DATA_CHECK and it triggers only when I press enter. In my case users want to update the CarrierName when next cell is clicked without any enter press. Note that I don't have any buttons in any of the ALV cells.
Kindly help.
Thanks
Gopal
Request clarification before answering.
either make first field as drop-down then you can write code in on_select
or if its input field then you have to write code in on_enter and to trigger this you must hit enter..
so i will suggest you to make it ddbk..
.. Chandra..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
You can achieve through ON_CELL_ACTION event.
call the event at the time defining alv as below:
if_salv_wd_setting~set_cell_action_event (abap_true )
Rest will be the same as you doing for other alv events.
Here the ON_CELL_ACTION event will triggerd when your changing the carrier code or clicking any of the cell editor in alv.
Here you will column as one of the parameter in R_PARAM, Her u will get the respective whatever column you need, for ur case it will be carrier code.
By this u will achieve your requirement, by passing respecitive carrier code to get carrier name and resetting the whole alv table.
Hope this will be helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saravanan,
Are you sure about your suggestion?
The below code syntax you have given is incorrect.
if_salv_wd_setting~set_cell_action_event (abap_true )
I have already tried ON_CELL_ACTION using lo_value->if_salv_wd_table_settings~set_cell_action_event_enabled
but this event also triggers after I press "Enter".
Even the link below confirm the same.
http://wiki.sdn.sap.com/wiki/display/WDABAP/How+to+trigger+the+event+ON_CELL_ACTION+in+ALV
Kindly correct me if I am wrong. Send the correct code syntax if you have. Do we need to write the code in a specific webdynpro method like wddoinit? That will be really helpful.
Thanks
Gopal
Hi Gopal,
its just typo error, hope ur familiar with the syntax as below.
if_salv_wd_table_settings~set_cell_action_event_enabled( abap_true ).
The above should be declared in method where you are instantiating the ALV (Component & table) settings as like the other alv properties.
Then on cell action code should be written in any of the separate webdynpro method with type event handler, but in the same view where you are displaying the alv table,..for example
as what we are doing for ON_FUNCTION event for all alv toolbar button functions, hope ur familiar with this.
Thanks.
Hi Saravanan,
i think you did not get my question.
I have tried ON_CELL_ACTION and it does not get triggered when I just click on some other cell.
ON_CELL_ACTION gets triggered only after I press "Enter" button in a cell.
But I don't want that. What i want is. when I change content of a cell and click on some other cell then event should trigger.
Therefore ON_CELL_ACTION will not work for me. Please confirm.
Thanks
Gopal
Hi Gopal,
There is no such event which will be triggered when you click on the field.
ONENTER event is triggered when you enter value inside the field and press enter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
ON_CLICK event is for cell editor of type link_to_action. You have to press enter to update the data in the second column.
Or make the first column drop down and in OnSelect of drop down update the second column.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.