07-21-2007 7:03 AM
Hi all,
I am making some smartform in HR and whenever user is generating the form, I am storing all the dynamic fields in a ztable and assigning this set of values a unique key in the table so that whenever a user wants to generate the same smartform in future again, he can do so by using this unique key.
Now my concern is that I am storing all the dynamic fields like personal area text and designation text etc. in that z table. Whenever i am using the unique key to generate that form, its going into that z table and fetching the values from there on the basis of unique keys. Imagining that there are 50000 records in that table, will it be better performance wise it I just store the key codes of fields like personal area text and designation text etc. and while generating the form, and fetching the values wrt. key, I get the texts from different tables using these key codes of fields like personal area text and designation text etc. or it makes no difference if i store complete personal area text and designation text etc in the ztable and while genetating form i can get all the values from that single line of ztable using the key???
Another concern which i have is that wheather an inner join is better or 3-4 'Select Single' statments are better performance wise? - In other words suppose if I want to pull out single record - different fields from different tables of one personal number, should I use select single on all those table or is join better n that case too????
Thanks
Ribhu
07-21-2007 7:11 AM
Hi
First fetch the PERNR's into a ITAB.
for all entries of this ITAB
write select statements to individual tables and fetch the data into separate internal tables.
then loop this ITAB.
and under this loop read all the internal tables.. on eby one and fetch the texts.
this is performance wise better
instead of writing select single..for each table within the loop of Pernr's ITAB.
<b>Reward points for useful Answers</b>
Regards
Anji
07-21-2007 7:28 AM
That is taken care of Anji, My question is 'Is select single more better or Inner join". I am talking about only one single line of record which will ultimately be passed on to smartform. - in this case Only one or two fields - records from different tables will give the single record for passing into smart form. So in this case I should use join statment or select single 's ????
Thanks
Ribhu
null