on 04-14-2014 8:36 AM
Hello,
I have the ff requirement:
1. Create an Editable ALV.
2. User can enter data by clicking append row or insert row.
- Take note that the table has no data yet, user will input the data.
3. Most of the columns should have dropdown values.
- I don't have problems with columns that have same data per row - I used dropdownbykey.
4. Here's the catch, some of the columns are dependent on the data entered in other columns.
Example: I entered country in one field, I should ONLY be seeing the users under that country in the adjacent field.
- By this time my context node is still initial because i'm still editing the row.
How can I achieve this?
I can't use dropdownbyindex because, as per the posts that I've read, the alv is already populated.
In my case, I'm yet to populate the ALV.
Thanks.
Hi,
You could use ON_DATA_CHECK event of ALV and on Insert the event will be triggered, there based on the values in previous column, you can populate the next column.
check this wiki for reference: http://wiki.sdn.sap.com/wiki/display/Snippets/Web%20Dynpro%20ABAP%20-%20ALV%20Controlling%20Standard...
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navi,
You need to create a child node DRP_DWN_LIST inside the alv data node for drop down list. So that, for each line, you can populate its own set of drop down list values.
For example:
When you add a row into alv, you can prepare the drop down list values for that line and bind it to the node DRP_DWN_LIST
Check the below thread
Hope this helps you.
Regards,
Rama
Thanks Guys for the help!
The links and the advice that you gave are all helpful.
Solution:
1. Make use of the on_data_check event.
2. Refire once again the ALV inside the event on every change of the cell, else the settings that you set (hiding of buttons and fields, editable fields, etc) will got lost.
3. Make use of node->get_static_attributes_table to get all the data in your alv.
4. Make use of the index in R_PARAM->T_MODIFIED_CELLS to update the correct row.
5. Use TYPE_KEY_VALUE instead of TYPE_KEY_CONVERT_TO_VALUE.
6. In the link, it calls lo_interfacecontroller->set_data(xx), do not call it inside the event because your alv will become non-editable.
User | Count |
---|---|
74 | |
26 | |
10 | |
10 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.