cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down box requirement-Need to filter values

Former Member
0 Kudos

Hi,

I have a drop down box requirement in which I need to show reason codes for IT0008.

I' am linking the same to field PA0008-PREAS. But it is selecting all the reason codes from

the table.

How to show only those codes applicable to IT 0008.

Thanks,

Aravind

Accepted Solutions (1)

Accepted Solutions (1)

ChrisSolomon
Active Contributor
0 Kudos

These "filtered lists" are one of the biggest reasons I end writing half the generic services for HCM P&F that I write (other close runners include firle validations and effective date check....haha). If you are doing HCM P&F, the way to do this is using a generic services.....and yes, I have done this for pay changer reason code (PREAS) before.

Answers (2)

Answers (2)

Former Member
0 Kudos

as Otto points out, filter the data first. In WDA, I'm passing a Text/Value table to my dropdown with the appropriate values.

all you have to do is populate the table & bind it to the context node:


  DATA: node_info TYPE REF TO if_wd_context_node_info.
  DATA: it_table TYPE wdr_context_attr_value_list.
.
.
.
.
  node_info->set_attribute_value_set(
     name      = 'PROJ_TYPE'
     value_set = it_table ).


OttoGold
Active Contributor
0 Kudos

1) filter the data in ABAP and next bind the field to the filtered table in the context

2) get all the data from the context and filter it using JavaScript

My advise is use the (1) because it will take like 5 minutes, the second one is slow to develop, slow to run and may cause many other unwanted things (like JS debugging)