cancel
Showing results for 
Search instead for 
Did you mean: 

Simple query on WD Development (Drop down box creation and executing RFC)

Former Member
0 Kudos

Hi Experts,

I have to develop one screen which should be exactly similar to MSS Employee Search iView.

The user (MSS User) will login. System will fetch the pernr for the user from backend. One iview will be displayed to the user.

The iView will have two drop down boxes. The user will click on the first drop down box and select some entry. Based on this RFC will be executed and some back end data will be fetched and displayed to the user in form of a table.

I have explained the requirement in a very simple manner here. The exact requirment is more complex.

Can you please let me know

1) how I can create drop down boxes

2) how I can execute the RFC when user selects some particular entry of drop down box.

Regards,

Gary

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For this, the solution is in simplest way:

a) Create 2 nodes : A and B; A containing one attribute and B contiaining one attribute

b) In View, using apply template: create two drop down by key elements

c) In the init method: Populate node A

d) Create event for drop down A; in event method, Call RFC;

e) The values returned by RFC, populate in node B

Regards,

Ganga

Answers (2)

Answers (2)

Former Member
0 Kudos

There is no easy way to create the Search iView from scratch. I have given up. Suggested another solution to customer using drop down boxes

Former Member
0 Kudos

Hi,

Follow these steps:

1. Create one value node for example: UsersNode with cardinality 0...n selection 1..n.

2. Create two context attributes UserId, UserName under this node.

3. Now create DropDownByIndex UI element and bind UserName attribute of UsersNode to "texts" property of this UI element.

4. In the wdDoInit method of UserView populate the users into this node as below.

(Note: Users list is coming from some model output node UsersModelNode)


for(int iCount=0;iCount<wdContext.nodeUsersModelNode.size();iCount++)
{
  IPrivateUsersView.IUsersNodeElement element=wdContext.createUsersElement();
  element.setUserId(wdContext.nodeUsersModelNode().getUserModelNodeElementAt(iCount).getUserId);
  element.setUserName(wdContext.nodeUsersModelNode().getUserModelNodeElementAt 
  (iCount).getUserName);
  wdContext.nodeUsersNode.addElement(elemnt);
}

5. Now at runtime Users list will be displayed in the DropdownByIndex UI elemnt.

6. Create one method in the controller like "executeRetrieveUserDetailsModel" with one parameter userId. And write the code to execute the UserDetailsModel by passing the userId as input.

7. Create one action "SelectUserDropdown" in the view and bind this action to DropDownByIndex UI elemtns onSelect property.

8. This action will be invoked when user selcts the dropdown at runtime. So write the code in this action as below.


wdThis.wdGetUsersCompController.executeRetrieveUserDetailsModel(
wdCotnext.currentUsersNodeElement().getUserId);

Regards,

Charan