Scenario

Let's create a generic DataSource in SAP S/4HANA for cost center attributes. In SAP S/4HANA, a view with attributes has been defined, Z_BIW_CSKS, which is based on fields of table CSKS. The generic DataSource is created on view Z_BIW_CSKS. We will also create a generic DataSource for cost center texts, which is based on view Z_BIW_CSKT. The view Z_BIW_CSKT has been defined on a combination of fields from tables CSKS and CSKT.
It's not always needed to create generic DataSources, as SAP S/4HANA also offers many Business Content DataSources. However for our scenario, we use SAP S/4HANA as an ODP_SAP source system and create the generic DataSources in the SAP S/4HANA system.
Create Generic DataSources in SAP S/4HANA

The configuration transaction code used to set up the generic DataSource on an SAP source system (in our example SAP S/4HANA) is SBIW. This is the central transaction to customize the data transfer to SAP BW/4HANA, to enhance Business Content DataSources, or to develop generic (customer-defined) DataSources where no Business Content DataSources (for example, customer tables) exist.
A Data Source in the SAP Source System is created in an Application Component. A Data Source can be based on a DB View (View/Table), SAP Query or Function Module.
With the ODP API, a new table is created in the dictionary called ROOSATTR that contains all the extractors in the API that supports the ODP API. You can use transaction code SE16 to have a look at the content of tables.

To use a DataSource with ODP, a DataSource has to be released for ODP in the source system. Depending on system settings, this may be done automatically. To check if a DataSource has been released automatically, you run the RODPS_OS_EXPOSE program, enter the DataSource name, and choose Display Releases. If it is not listed, choose Release DataSource and answer yes to the prompt and then enter a transport request if prompted. As a consequence, the ROOSATTR table is updated (as exposed) for that DataSource.