I have posted this question two times but i'm not getting the solution for that reason i'm again posting this question.
First i have done the reading of two sobject fields dynamically.
The two sObjects are
Dynamically reading fields from objects and stored in below two statements
Set<String> incidents = new Set<String>();//adding incident fields List<String> SelectedFields = new List<String>()//adding case fields dynamically
I'm trying to read fields dynamically from incidents and SelectedFields reference objects and mapping incident fields to the Case fields dynamically
First field in incidents reference object is map to the first field in SelectedFields reference object and vice versa.