dynamic select of unknown fields
I just started abap last monday and I'm still very new in it. I have a problem and i would appreciate if some one could detaily tell me how I could solve this problem. I have search in this forum but I haven't found any thing close to what I really want to do.
Many contracts could be tied to a single projet and also many payments could be tied to a single contract.
I am looking for a way so that I could dynamically determine the number of all contracts belonging to a particular project. There is a table called <u>prps</u> in sap. this table contains all projects data. There is also another table called <u>prhi</u> which contains all the contracts to a project. The field in prps is <u>prps-posid</u> for the the project number. The contract field in prhi is <u>prhi-posnr</u>
I have put all the project numers in a <u>range r_projetnr</u> for <u>prhi-up</u>.
Now my problem is how could I dynamically select all the contracts belonging to a project.
I would appreciate any tips on how to do this.