cancel
Showing results for 
Search instead for 
Did you mean: 

TABLE QUESTION

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

susmita_panigrahi
Active Participant
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

You can get the lead select value and check if that is null and then display an error message.

Thanks,

GLM

Former Member
0 Kudos

Can you brief me more about what is lead select value.

Former Member
0 Kudos

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