cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down box behaving strangly for DC based WD program

Former Member
0 Kudos

Hi Experts,

I have created 2 WD programs - WD1 and WD2. WD2 uses WD1 as used DC. I have done proper context mapping for one field called Activity. The field Activity is a drop down box which is getting populated based on some R/3 RFC.

Field Activity has some Code and Description

Code   Description
E          Business Trip
M         Conference

Programming in WD1

	
  public void wdDoInit()
  {
... some code which includes setting of getActivity ..
.. 
wdComponentAPI.getMessageManager().reportSuccess(
		" in review Activity  "
			+ wdContext.currentContextElement().getActivity());

Here the value is getting populated as "E" for Activity for some pernr and tripnumber for WD1.

Programming in WD2

public void onActionReview(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionReview(ServerEvent)
    wdComponentAPI.getMessageManager().reportSuccess("new_activity "+ wdContext.currentContextElement().getActivity());

Here the value is getting populated as "Business Trip" for activity for same pernr and tripnumber in WD2.

When I am selecting the drop down box and again selecting activity as "Businee Trip" the value is getting populated as "E" for activity same pernr and tripnumber.

I am wondering what is wrong with my code. Initially the value is getting populated incorrectly as "Business Trip" in WD2. However after clicking on drop down arrow and then selecting the same value again the field is getting populated as "E" correctly.

Pls help

Regards,

Gary

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Issue did not get sorted out

former_member214651
Active Contributor
0 Kudos

Hi,

After you click on the Dropdown and select the value, check what have you written in the code fo setting in the Activity field from the R/3 i.e

If there are 2 fields in the R/3 table for the values and key, check if you are setting he value of Key instead of the value.

Regards,

Poojith MV