cancel
Showing results for 
Search instead for 
Did you mean: 

Appending New item to drop down .. drop down data comes from R3

Former Member
0 Kudos

Hi,

We have deployed ESS 1.0 BP. In leave request application we select the leave request type(PL, CL, SL) from drop down menu.

Here privelige Leave is by default selected... but we need to remove PL from default and add hipen(-) so that user has to compulsory select the leave type from drop Down,

Now the problem is as this list comes from R3 .. so how can we add new item to this drop down menu. Whether its needed to be done R3 side or do i need to modify Leave request Application. If i need to modify this leave request application than h0w can append hipen to the already list coming in drop down menu...

Can any person specify in detail from where this configuration is needed to be done..?

Regards,

Jigar OZa

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Leave types can be configured in SPRO transaction.

regards,

ganga

Answers (3)

Answers (3)

Former Member
0 Kudos

Added - in HR table

Former Member
0 Kudos

Hi,

For example the leave types are coming in the below model node from R/3.

LeavesModelNode - Model Node

LeaveType - Model Context Attribute

And the data in this model node is

- Privlige Leave

- Casual Leave

- Sick Leave

Now create one Value node with the same structure as below in the Component Controller.

LeavesValueNode - Value Node

LeaveType - Context Attribute

Populate your extra value here

IPublicTestComp.ILeavesValueNodeElement element=wdContext.createLeavesValueNodeElement();
element.setLeaveType(" - ");
wdContext.LeavesValueNode ().addElement(element);

Now Populate the values from model node to value node as below

for(int i=0;i<wdContext.nodeLeavesModelNode.size();i++)
{

IPublicTestComp.ILeavesValueNodeElement element=wdContext.createLeavesValueNodeElement();
element.setLeaveType(wdContext.nodeLeavesModelNode().nodeLeavesModelNodeElementAt(i).getLeaveType());
wdContext.LeavesValueNode ().addElement(element);
}

Now map this LeavesValueNode to your View Controller and bind to your dropdown list also.

Regards,

Charan

Former Member
0 Kudos

Since list is coming from R/3 , so you need to make changes in R/3 .

amit

Former Member
0 Kudos

Hi,

curently following data is coming to one data type which is bound to one context.. it has following data

- Privlige Leave

- Casual Leave

- Sick Leave

Now i need to add hipen.. so how can do this programatically in Webdynpro..

Curently by default it has Privlige Leave selected..

In init() i tried adding hypen by followig method :

wdContext.currentAwartCustomzing.setSbtxt("-")

But the drop down removed Privlige Leave and in that place it added " -"

Is thre any way to append to this "-" to drop down

Regards,

Jigar oZa

Former Member
0 Kudos

Hi,

Place following code instead of just : wdContext.currentAwartCustomzing.setSbtxt("-")

wdcontext.nodeAwartCustomizing().inValidate();

AwartCustomizingElement el=wdcontext.nodeAwartCustomizing().createAwartCustominingElement();

wdcontext.nodeAwartCustomizing().addElement(el);

el.setSbtxt("-");

el=wdcontext.nodeAwartCustomizing().createAwartCustominingElement();

wdcontext.nodeAwartCustomizing().addElement(el);

el.setSbtxt("PL");

el=wdcontext.nodeAwartCustomizing().createAwartCustominingElement();

wdcontext.nodeAwartCustomizing().addElement(el);

el.setSbtxt("CL");

el=wdcontext.nodeAwartCustomizing().createAwartCustominingElement();

wdcontext.nodeAwartCustomizing().addElement(el);

el.setSbtxt("SL");

regards,

ganga