on 2005 May 30 9:58 AM
Hello,
Ive created a Table as Result of BAPI_EMPLOYEE_GETDATA with 5 Colums Firstname, Lastname, Birthday, Birthmonth, Birthyear.
I would like to display only rows with actually Birthmonth.
Can anyone please help me?
Thanks in advance,
Raissa
Hi,
I think ur requirement will be acheived if u put that remove element in the else part of the code instead of the IF part.
Otherwise create one more value node.
then
for(int i = 0;i<wdCOntext.node<new node>.size();i++)
{
if(wdContext.node<binded node>.getElementat(i).current<binded node elemtn>.getBirthmonth().equals("")
{
IPrivate<viewname>.I<node element name> elem = wdContext.node<new node>.create<nodeelement name>;
elem.set<attr>();
wdCOntext.node<new node>.bind(elem);
}
}
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
small modofication in Bharathwaj's post.
Instead of using bind method in if statement, use addElement(<element>) method of value node.
So, it allows you to add multiple values.
corrected code is given below.
for(int i = 0;i<wdCOntext.node<new node>.size();i++)
{
if(wdContext.node<binded node>.getElementat(i).current<binded node elemtn>.getBirthmonth().equals("")
{
IPrivate<viewname>.I<node element name> elem = wdContext.node<new node>.create<nodeelement name>;
elem.set<attr>();
wdCOntext.node<new node>.addElement(elem);
}
}
Regards,
Bhavik
Thanks,
but where can i give condition to check birthmonth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you are using a value node, then give condition while u r assigning rowelements to this node.
Else if you are directly binding the modelnode to the table give the condition after you have called the RFC.
Ex
for(int i=0;i<wdContext.nodeCompanycode_List().size();i++)
{
if(wdContext.nodeCompanycode_List().getCompanycode_ListElementAt(i).getComp_Code().equals("0001"))
{
wdContext.nodeCompanycode_List().removeElement(wdContext.nodeCompanycode_List().getCompanycode_ListElementAt(i));
}
}
Hi Raissa,
If u want to display only birth month u can right click on the container UI element ,select Apply Template -> Table-> select the context attributes u want.
In case if u want a row to be displayed only if it has a birth month ..
then bind the table with a value node and create a element of the value node and set value for it only if
wdContext.nodeData.currentDataElement.getBirthmonth() == <to the value u need>
is satisfied.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you do create binding for the table, select only those fields that u need to display in the table.
And give condition to check whether birthmonth contains a value or null and display accordingly.
If you are using a value node, then based on the condition (if null) you may display them, and if you use modelnode, then you can remove the elements that contain null values for birthmonth, using "removeElement" method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
11 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.