Happy to be a part of Themotomech. Let me introduce myself. Myself Abdul Rizwan from Patna. I am a proud owner of a KTM duke 200 which i have recently purchased, a month ago to be more accurate. Am happy with the way the beast is performing, but have a few concerns. Few days after purchase and riding i noticed a slight trace of oil from the left side of the engine near the place where there is a cable passing through. I ignored it and as of now i have covered around 2k kms.
Surprisingly the cable has come out now. i had informed the oil leak issue during the service and i was told it is pretty common and they are the vapors coming out of the engine. With the cable coming out now the oil leakage has increased. I am paranoid and worried that the cable might come out completely. Have attached the pic for quick reference .

The engine has started dripping oil from the opening. How do i fix it now? Suggest on what needs to be done. Awaiting your reply.

Welcome to The Moto Mech forum. Happy to help you out with the above.
That black cable which you have quoted is called as gromet rubber. It does have a set of groves which perfectly seals the engine case from inside as well as outside. When the element moves out of its grove it creates a vent for the oil to come out of the engine. Perfect sealing of the gaps is not possible.
The rubber can be refixed back on the grove. The mechanics will apply a silicon sealant paste and then fix the rubber. The paste needs to get cured completely to avoid repeating.
The rubber element will not come out on its own. The reason behind this will be the routing of the wiring harness . There will be multiple points where the harness will be fixed rigidly using a tag/ any other element during engine assembly . The holding element is fixed with the harness pulled towards it. The gromet comes out of its slot over a period of time due to to tension in the harness.
You can get it fixed at the mechanic. Ask for sealant to be applied refixed.

You can get back to me on this anytime. Happy to assist you. Hope your querie is addressed.