Hi Ravi,
I'm a bit confused about your question. Why are you creating a license with a FM? Do you need a custom license determination logic? If yes, BADI /SAPSLL/LCC_DOCUMENT, method LICENSE_TYPES_GET can be used to determine license types and/or LICENSES_GET to determine relevant licenses.
Regards
Satish