‎2005 May 18 4:26 PM
Hi everyone!
I have the following problem:
I created a DYNPRO with one ALV grid and several "ordinary" fields. The ALV is editable.
Now I try to sum up some fields of the ALV grid and put the sum into one of the ordinary DYNPRO fields. When the <i>data_changed</i> event is fired the sum is calculated correctly and put into the global field associated with the DYNPRO field. However, the value change is not shown on the DYNPRO.
When I press <i>ENTER</i> while the cursor is in the "ordinary" DYNPRO area and not in the ALV Grid, the data change is shown correctly. Debugging shows that no PBO/PAI for the DYNPRO is executed when the data in the ALV is changed, so I assume there is no value transport between the global field and the DYNPRO.
What am I doing wrong?
Regards, Joerg
‎2005 May 18 6:08 PM
Hi Joerg
To achieve this you should define ALV events as application events. Or you should reset the same screen using 'LEAVE TO SCREEN X' at the end of data_changed event.
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>
‎2005 May 19 8:17 AM
Hi Serdar,
You mean it is possible to "hand through" ALV events to the normal dynpro flow? How?
And one more thing, slightly off-topic: How can I put hyperlinks in my posts? When I insert a link to http://www.sdn. it shows as a huge link in one line. Can I abbreviate it somehow?
Regards, Joerg
‎2005 May 19 8:39 AM
Hi Joerg,
when you register the event data_changed you need to set the flag appl_event to 'X'.
regards
Siggi
‎2005 May 19 11:13 AM
Hi Joerg,
Here is the other way how to achieve the processing of PAI/PBO of the main DYNPRO, which contains ALV. It works fine for me, so you could consider this possibility as well. Inside the event handling method you could do this call:
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'ENTE'
IMPORTING
rc = l_rc.
You should deal rather carefully with it - put it better in a method like
HANDLE_DATA_CHANGED_FINISHED.
Instead of 'ENTE' you should use the command code defined in your dynpro and better suited for such a "refresh" functionality, but I'm afraid it can not be empty code string.
Hope this helps, regards, Sergei
‎2005 May 19 2:52 PM
Hi Joerg
Yes, defining events as application events handles events through the PAI flow where you call "cl_gui_cfw=>dispatch".
Secondly, you can insert URLs between the tag "[ url<i>=<url></i>]<i><URL text></i>[ /url]". (Omit the blanks just after "["s).
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>
‎2005 May 19 3:57 PM
Dear Joerg,
I made a lot of work with editable alv grids, but using the function REUSE_ALV_GRID_DISPLAY. This function has a property for triggering user command after editing a cell. I've checked the code behind that option and I believe you should register the following event:
call method grid->register_edit_event
exporting i_event_id = cl_gui_alv_grid=>mc_evt_modified.
Of course you also need to set a handler for this event...
Hope this helps,
Ofer
‎2005 Jul 20 8:21 AM
Ofer,
I had the same problem.. Solved by your solution.. Thanks a lot