cancel
Showing results for 
Search instead for 
Did you mean: 

Fill a dropdown based on value selected in another

Former Member
0 Kudos

Hello Experts,

Well first of all am sorry to post this question in spite of many threads existing over the same. I did go through all of them & couldnt quite make my mind as to how I could proceed.

My scenario is an online interactive form so I dont need to go for the Web Services functionality. I need to be able to trigger an action when I select a value from the 1st dropdown & then capture this action within Web Dynpro ABAP. I tried selecting a Exit* event with the first dropdown & then selected the language as Java Script. I then created an action by name Exit within Web Dynpro ABAP & assumed that the system would automatically trigger the ONACTIONEXIT eventhandler method. But this isn't happening.

Is my assumption wrong? The reason why i came up with this approach was coz I was capturing the CLICK event of a button in the Adobe form by creating an eventhandler method by name ONACTIONCLICK.

Regards,

Uday

Accepted Solutions (0)

Answers (1)

Answers (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi,

I tried as per Chintans advice in [here|;. I have placed a TextField & submit button within my form and within the Dropdowns exit event am capturing the selected value through JavaScript & trying to trigger the Submit button. I have put the below mentioned coding within my dropdowns exit event.

xfa.host.messageBox("value is :"+this.rawValue);
TextField1.rawValue = this.rawValue;
submitToSAP1.execEvent("click");

I do get a MessageBox with the selected text, the TextField does get populated with the text but the submit button isnt getting triggered!

I have also put the below coding within my Web Dynpro components WDDOMODIFYVIEW method to just be completely sure...

METHOD wddomodifyview .
  DATA: lr_interactive_form TYPE REF TO cl_wd_interactive_form,
        lr_method_handler TYPE REF TO if_wd_iactive_form_method_hndl.

  CHECK first_time = abap_true.
  lr_interactive_form ?= view->get_element('IF1').
  lr_method_handler ?= lr_interactive_form->_method_handler.
  lr_method_handler->set_legacy_editing_enabled( abap_true ).
ENDMETHOD.

But things aren't still working out... Anyone please advise as to why this button might not be working. (The button is of type Regular)

Regards,

Uday

uday_gubbala2
Active Contributor
0 Kudos

Hi Experts,

I finally managed to resolve the issue. I followed the approach suggested by Chintan in the thread which I was talking about. I had to change my layout type from xACF Layout to ZCI Layout.

The problem was that I was somehow not being able to trigger the click event of the submit button through JavaScript coz of this layout type. I thought that this might be coz of the xACF required software not being installed on my system but surprisingly I can interact with another adobe form which is having the same xACF layout. Anyways just thought to update the other members that shifting to ZCI layout helped resolve my problem.

Regards,

Uday