cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic filled input field based on dependent dropdown value

former_member650056
Discoverer
0 Kudos

Hi Friends,

  I have a requirement in webdynpro abap , when i select value from dropdown list at that time a dependent input field base on dropdown value should automatically filled without doing any action(without pressing enter key ..etc..) .

Please suggest me .

Regards

Suvakant

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello,

for this write the code in the on_select method of the drop down. On that method read the attribute which is bind with the Drop down and based on desired condition set the value in the attribute(s) which is bind with input field(s).

0 Kudos

Hi,

This can be achived in 2 steps.

1.On Select event of the drop-down,read the selected values of the drop-down.

2.Based on the above retrived value,set the attribute bind to the INPUT feild.

Regards,

Inder

0 Kudos

Hi suvukant,

i think dropdown with supply function and singleton concept will be sutiable for your recuirement.just chec in google some many threads is there dropdown with supplyfunction with singleton concept.

Regards

JayaprakahT

sivaganesh_krishnan
Contributor
0 Kudos

hi Suvakant,

For reading the fields of the webdynpro you can use the Set attribute method for getting the values from the screen fields.

Check the codes:

Data: context_node type ref to if_wd_context_node,

  ld_pernr type pernr-pernr.

Retrieve value of webDynpro field

  context_node = wd_context->get_child_node( name = 'USER_DETAILS').

  context_node->GET_ATTRIBUTE( exporting NAME = 'PERNR'

  importing value = ld_pernr ).

Now set the the value from here and update your required field using set_attribute.

Regards,

Sivaganesh

karun_prabhu
Active Contributor
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.