One has to fulfill his Kartvya in Life, but how can one know what is his kartavya in life ?
Kartavya means that which ought to be done, aka Karya. The duties which one ought to perform have been described in certain books called Dharma shastras dedicated towards precisely this - guiding people towards the right duty. As is said in the Srimad Bhagavad Gita, one must refer to the Dharmashastras to know his duty:
तस्माच्छास्त्रं प्रमाणं ते कार्याकार्यव्यवस्थितौ।
ज्ञात्वा शास्त्रविधानोक्तं कर्म कर्तुमिहार्हसि॥
Therefore, the scripture is your authority as regards the determination of what is to be done and what is not to be done. After understanding (your) duty as presented by scriptural injunction, you ought to perform (your duty) here.
-Srimad Bhagavad Gita 16.24
These dharma shastas spoken of here are known as smritis as has been explained in the Manusmriti:
श्रुतिस्तु वेदो विज्ञेयो धर्मशास्त्रं तु वै स्मृतिः।
ते सर्वार्थेष्वमीमांस्ये ताभ्यां धर्मो हि निर्बभौ॥१०॥
The Veda should be known as the ‘revealed word,’ (Śruti) and the Dharmaśāstra as the ‘recollections’ (Smriti); in all matters, these two do not deserve to be criticised, as it is out of these that Dharma shone forth.
These smritis like Manusmriti describe every aspect of duty ranging from the varnashrama to relations, religious duties, occupational duties, sources of income, the working of kingdoms, law relating to disputes, inheritance and many other topics.
What better source to know one’s kartavya than the Dharmashastra itself?