on 09-03-2009 4:39 AM
hello
I have a table with sales header details. I have a select button in my screen. After I select a row and click the select button it should display the sales details in another table for the corresponding selected row. If I dont select a row and click the select button it should display an error message.
Please let me know how to do it.
thanks
regards
krishna
Hi
If you go to the property of table , there is a Event "OnLeadSelect".You can define a action and mention in OnLeadSelect of table.
Inside the method write the following code:
int selectedINumber = wdContext.nodeOrder_List().getLeadSelection();//Order_list is the node name to which table is binded
String selectedOrderNumber = wdContext.nodeOrder_List().getOrder_ListElementAt(selectedINumber).getOrder_Number();//using this line you can select particular value from the row.
If you are using BAPI , then you can pass selectedOrderNumber to it and execute the bapi and display the data in the next table
Thanks
Susmita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
Option 1: Incase you have nested nodes as in Parent & Child nodes mapped to the two tables, you can use the On Lead Select option of Parent table and correspoding data on child table can be displayed.
Option 2: If there is a common field in the two table nodes nodeTest and nodeOther.
int i_leadselection;
i_leadselection = wdContext.nodeCtx_vn_Test().getLeadSelection();
if(i_leadselection>=0)
{
for(int j=0; j<wdContext.nodeOther().size(); j++)
{
if(wdContext.nodeTest().getOtherElementAt(j).getCommonField().equalsIgnoreCase(wdContext.nodeCtx_vn_Test().getTestElementAt(i_leadselection).getCommonField()))
{
//display the field in the table
// for this you might need another dummy node to store the matching records
}
}
}
else
{
display the message to select a row
}
Regards,
Preksha
You can get the lead select value and check if that is null and then display an error message.
Thanks,
GLM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will have to use the following line of code
wdContext.nodeRoadmapSteps().getLeadSelection()
In the above piece of code "nodeRoadmapSteps()" is the node which is mapped to the table. This line returns a integer value corresponding to the selected row in the table. Check the value returned by this statement.
Thanks,
GLM
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.