Thank you Raymond.
The description is well explained and satisfies my needs.
But while implementing it is throwing syntax error(e.g., GD_EXIT is not avail, But there is one variable called G_EXIT). But somehow it got implemented and now when executing the program it is going dump when it reaches the BAPI call. So, my functional consultant told me to revert the changes since it is impacting the custom code.
Thanks,
Priya