I know that we can extract data via functional module in case of generic extractor but when we use business content data source ( for ex.0MAT_PLANT_ATTR) is it possible to use functional module to extract the data?
How can we find the functional module? my requirement is I need to enhance this data source with few more attributes.
Pl help. also advise where I need to write the code?
You can check whether a standard extractor is using function module or not by looking into the table ROOSOURCE. The field "EXMETHOD" in the table should give you an idea as to what kind of an extractor is it. In your case, 0MAT_PLANT_ATTR is a FM extractor and it uses the FM MDEX_MATERIAL_MD. The "EXTRACTOR" field in the table gives you the FM that works behind the extractor. You can not change the extraction method of a standard extractor. Hope this helps.
Thanks and Regards
You can see if it FM based or not, in RSA2, or, in table ROOSOURCE (on the source system).
In general, it is not possible/advisable to change the BC extractor FMs.
Right way to go about is to use enhancements. For this case 0MAT_PLANT_ATTR, if the other attributes are coming from same material tables, you may be able to get those by enhancing the extract structure.
If not, you can enhance the extract structure, and write the code in the user-exit provided for extending master data extraction (function EXIT_SAPLRSAP_002 - check its documentation in SE37).