The present invention relates to novel compounds of formula (A) and (B) as modulators of GPR-119, methods of preparing them, pharmaceutical compositions containing them and methods of treatment, prevention and/or amelioration of GPR-119 mediated diseases or disorders with them.