Hi Muhammad,
1. SWOTOBJID is an identifier of a business object. It contains business object type and business object ID. You can use this information to run tests on a BO or to modify data etc...
2. SWO_QUERY_KEYFIELDS returns structure of key fields of a business object.
3. You can test standard and your own business objects in transaction SWO1. If you run it, you can see the key fields assigned to the business object.
4. Anything is possible! Use standard functionality to retrieve the required information. You can use SE37 and search for FM/BAPis with prefix BAPI_* or use transaction BAPI to find required module.
Regards,
Pavel