2009 Apr 11 7:27 AM
In screen there is list box name
DEPARTMENT when i click it shows the drop down list box.
there it shows all the departments.
FINANCE
COSTING
HR
HR
HR
HR
MATERIALS
MATERIALS
If i select finance and click SAVE button. It inserted into my table corresponding department field.
dept is my field. The field entry i fetched from ZTABLE-DEPT.
After entering new entry it shows
FINANCE
FINANCE
COSTING
HR
HR
HR
HR
MATERIALS
MATERIALS
I want only the list of deparment not the repeated entry. How can i overcome this. May be it basic.
Thanks and regards
arvind
2009 Apr 11 7:38 AM
Hi,
Before passing department table to VRM_SET_VALUES to get the list box drown..Do the SORT first and then use DELETE DUPLICATE ADJACENT statement to delete duplicate entries from department table.
2009 Apr 12 3:32 PM
what you can do is create an internal table with only field as department.
Now for all entries in your previous internal table copy all corresponding department in this new table.
Now sort this department internal table and delete adjacent duplicates comparing the field.
This table now gives you unique department.
Now you can refer your drop down to this internal table field.
Regards,
Lalit Mohan Gupta.
2009 Apr 13 1:10 PM
Hi,
when u click SAVE at the moment sort your internal table and apply the following select query ..
code
module drop_down input.
case ok_code.
when 'SAVE'.
select dept from <tablename> into table <itab>.
endcase.
loop at itab into <work_area>.
delete adjacent duplicate form <itab> comparing <dept>.
endloop.
thanks
ravi
2009 Apr 13 4:59 PM
Hi Arvind,
From your problem representation, as per understanding, same entries are getting repeated. And hence at the time of Save, the date is not getting saved properly.
The internal Table that you need to pass to the VRM_SET_VALUES should have a unique Key - Value pair combination. So, before calling the function module, you need to Sort the internal table by the keys of the table. And then you can delete adjacent duplicates comparing the key fields.
After the Save action, you need to call the VRM_SET_VALUES in the Process Before Output Event of the flow logic. Once again the internal table along with proper data will be passed to the UI for dropdown value list.
Hope this helps.
Thanks,
Samantak.
2009 Jun 08 11:50 AM
Hi Arvind,
Check this Program RSDEMO_DROPDOWN_LISTBOX it will solve your problem.