Skip to Content
0
Former Member
Jun 28, 2007 at 08:01 PM

How to pass value from view to component controller

9 Views

Hi Experts,

I have to pass value of certain parameters from view to component controller. My problem is like this. I have created two buttons on the view. When the user will press one button, one set of value should be passed to component controller and then to R/3. When the user selects other button other set of values should pass from view to component controller and then to R/3.

The code looks like as below:

public void onActionButton(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionButton(ServerEvent)

Date dt = new Date(System.currentTimeMillis());

bp.setInputdate(dt);

wdThis.wdGetTimesheetCompController().executeZbapi_Cat_Stech00_Getdetail_Input();

//@@end

}

public void onActionNextWeek(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionNextWeek(ServerEvent)

Date dt1 = new Date(System.currentTimeMillis());

long dateMillis = dt1.getTime();

long dayInMillis = 1000 * 60 * 60 247;

dateMillis = dateMillis + dayInMillis;

dt1.setTime(dateMillis);

bp.setInputdate(dt1);

wdThis.wdGetTimesheetCompController().executeZbapi_Cat_Stech00_Getdetail_Input();

//@@end

}

When I am doing this values are getting passed from view to component controller. Can you please let me know what is going wrong here?

Regards,

Gaurav