Hi Reetu,
for unstranded libraries, you can use --outSAMstrandField intronMotif option.
For stranded libraries, you would need to add the XS flag to the BAM file after mapping.
You can use this script from STAR distribution as an example of how to do it:
extras/scripts/tagXSstrandedData.awk
Cheers
Alex