cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro & RFC

Former Member
0 Kudos

Hi experts!!

I am trying to implement a WD view with the following attributes:

1.Before the view is dispalyed an RFC fonction module is called with the portal's logon id as import parameter

2. The RFC's output is then displayed in the WD view within a form template where the user can edit the results and then proceed.

Below is the code i have written, but i do not get any results.

Please help!!!

try{

IWDClientUser wdClientUser = WDClientUser.getCurrentUser();

com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();

IUserAccount[] acct = sapUser.getUserAccounts();

if (acct != null)

{

String user = acct[0].getLogonUid();

wdComponentAPI.getMessageManager().reportSuccess(

"user" + user );

IPrivateFormaAitisisView.IZpt_Pistop_Epim_Enimer_InputNode node = wdContext.nodeZpt_Pistop_Epim_Enimer_Input();

IPrivateFormaAitisisView.IZpt_Pistop_Epim_Enimer_InputElement el = node.currentZpt_Pistop_Epim_Enimer_InputElement();

el.setMember(user);

wdContext.nodeZpt_Pistop_Epim_Enimer_Input().bind((Collection) el);

wdThis.wdGetEnimerotitaController().executeZpt_Pistop_Epim_Enimer_Input();

}

}

catch (Exception e){

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Iria,

Comment the code line

wdContext.nodeZpt_Pistop_Epim_Enimer_Input().bind((Collection) el);

Regards,

Gopal

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Gopal!!

Thanx for you answer.That was it!!

nikhil_bose
Active Contributor
0 Kudos

1. Does RFC Zpt_Pistop_Epim_Enimer needs only one parameter?

2. Check in executeZpt_Pistop_Epim_Enimer_Input() method that you are invalidating the output node to reflect the changes

nikhilL

Former Member
0 Kudos

Hi,

Is it coming to this part ?

wdComponentAPI.getMessageManager().reportSuccess(

"user" + user );

Try out these steps

1.Create an object of this class

nodeZpt_Pistop_Epim_Enimer_Input Pistop_input = new nodeZpt_Pistop_Epim_Enimer_Input();

2.and then bind it

wdContext.nodeZpt_Pistop_Epim_Enimer_Input().bind(Pistop_input);

3.and then execute it

wdThis.wdGetEnimerotitaController().executeZpt_Pistop_Epim_Enimer_Input();