Hi Kiran,
Could you take a look at the following KB article: http://support.openview.hp.com/selfsolve/document/KM183327
Although it refers to Test Director, the API calls and Factories are still the same and the example should work on latest versions of ALM. Hope this helps!
Thanks,
Hristo