0
votes

I would like to ask how can I display only certain rows of a table based on a condition from another table. In other words I want to relate the tables.

More concrete, I have a table with header data. I created a hotspot for the field "Purchase Order No". I want to display the line items for a particular purchase order by clicking on the some purchase order number in the header table. The issue is the following: When I click on some purchase order number in the header table, I open the table with all line items accross all orders. How can I get only the line items for the particular order and not the whole table?

How can I do this using the class CL_SALV_TABLE? Thank you in advance and sorry for the silly question.

1
Why not just filter the table with the data before passing it to cl_salv_table=>factory / lo_table->set_data? - Philipp
I am not familiar with it, could you please provide an example? - user_unknown007
I don't really get your question too. Can you clearly explain what is your issue? - Sandra Rossi

1 Answers

0
votes

I believe you are displaying the Header data as ALV list with Hotspot set on Purchase Order Field. If so, in the event handler method of Hotspot_click, just get the selected purchase order number with the help import parameters and filter the item data based on it and call factory method of SALV class.