Sorry, I did not answer your question.
The reason I looked for is as below
1. I need to perform certain validation on database if it is called
2. If it is called from any parent procedure, the validation may not
Previously I was passing a parameter Y/N.
Now by using the @@NESTVALUE , I am able to achive this.