cancel
Showing results for 
Search instead for 
Did you mean: 

Matchcode dependent on a user selection

Former Member
0 Kudos

Hi,

I'm making a Web DynPro that shows an input form and a button to perform a search.

For some fields of the input form I need to show a matchcode. The problem is that the function that the matchcode will use to perform the search is dependent on a field that is selectable by the user in the same view. This field is represented by a DropDownByIndex control.

Now, let's assume that the user has selected a value and the matchcodes are shown accordingly to that value.

This raises two issues:

- When the user selects a different value, the matchcodes should change / be "refreshed"

- If the user selects the null value, the matchcodes should disappear

I'm tackling the first issue by reinvoking the same exact piece of code that I use to create the matchcode the first time, hoping that that will "overwrite" the previous matchcode. But, even if that works, I'm still clueless about the second issue.

This is a readapted version of the code that I use to show the matchcode. I'm putting it here to show the dependency to the selection of the dropdown list (DROP_DOWN_ELEMENT_SELECTION).

	  if (wdContext.currentDROP_DOWN_ELEMENT() != null) {
		  // CREATE / OVERWRITE THE MATCHCODE
		  IWDAttributeInfo[] ovsStartUpAttributes = {   				  
				  wdContext.nodeSearch_Customer().getNodeInfo().getAttribute("MAPPED_ATTRIBUTE")            
		  };

		  IWDOVSContextNotificationListener listener =			 
			  wdThis.wdGetRFCClientManagerCompInterface().getMatchCodeListenerByRFCName("MATCH_CODE_SEARCH_CUSTOMER",DROP_DOWN_ELEMENT_SELECTION);

		  IWDOVSProvider ovsProviderSearchCustomer = 
			  WDValueServices.createOVSProvider(
					  wdThis.wdGetRFCClientManagerCompInterface().getMatchCodeInputNodeByRFCName("MATCH_CODE_SEARCH_CUSTOMER", DROP_DOWN_ELEMENT_SELECTION),
					  wdThis.wdGetRFCClientManagerCompInterface().getMatchCodeOutputNodeByRFCName("MATCH_CODE_SEARCH_CUSTOMER", DROP_DOWN_ELEMENT_SELECTION),
					  listener,
					  wdThis.wdGetRFCClientManagerCompInterface().getMatchCodeConfiguratorByRFCName("MATCH_CODE_SEARCH_CUSTOMER", DROP_DOWN_ELEMENT_SELECTION)
			  );

		  WDValueServices.addOVSExtension(MATCHCODE_ID,
				  ovsStartUpAttributes,
				  ovsProviderSearchCustomer,
				  null);
	  }
	  else {
		  // TODO: REMOVE THE MATCHCODES
	  }

If someone knows something about it or needs more info, please step forward.

Thanks to everyone who drops an answer.

Pietro

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Solved.

Former Member
0 Kudos

Nobody has an idea on this one? 😕