+++ 6.Generic Extraction - Based on a View

Generic Extraction based on a View

                               
                Generic Extraction is sort when the standard extractors are not supporting the extraction what you need.

We will limit our discussion to Generic Extraction based on a view. We go for this option when the data to be fetched to BI is distributed in
different tables in SAP R/3.

Scenario

We need to extract the Partner Function (PARVW field) and Item number of sales document (POSNR field) in VBPA – Sales Document: Partner table and few fields present in the VBAK – Sales Document: Header Data table as detailed below.

ECC Steps

1) Check the tables for the required fields.  The fields we require from VBAK are
VBELN, VKORG, AEDAT, NETWR, WAERK and PARVW, POSNR from VBPA Table.

2) Now we create a join between these tables and for this we need to have at least one common field between them.
In SAP R/3 or ECC enter Transaction SE11 which enables you to create a table or view.  Here I am creating a view as ZVIEW_VBAK_VBPA.

https://lh4.googleusercontent.com/PHPmIVEEO8RRihr5PHUt_9BBr4mm4LeTMjd3KWZ0aLjzgWN1kd6ZnXiBGtPw_Q-5Ci_SRJKV0CDdG4AtKkHmXqaD2j-IJKG46l1MovVfiLgoQO4Y9YePhWoBc3eMFk2G4VNco0P3HQwIjzKd5w

Click on Create.

https://lh4.googleusercontent.com/ndW7o1A2iYyXT3tYGV88lfxLArSbG7-bcMUPMl-bNxe2FzHRJhXV-wWzIA0uTOvo7RfpFUOHtg1_N8uf3lAZkupYk37A88GI0vt8vllxfkqG2lmEZVqYme_bKKbihETniOZ9sVCyMx3Yyj-NSA

Select the view type. We are creating a database view. The system now displays the Maintenance view screen.In the Table/Join Conditions tab, enter the tables that you wish to build the join on.

https://lh4.googleusercontent.com/9Z4mBIU_BHDjjd1NhUpq3_fDuA_1cDMOnQAFMwZKtEwdwh6rcsB8wC16C4nbmsRefwvdzF2heg9TkI9mxZLddSECnQJ0zRewe-z-v23lv-1YOeeDDmJ-gVsRb3s_wrEUHw_ih1jUicDq1c0MSg

If you are unsure of the common fields to establish a join, then select the tables involved in the join and select ‘Relationships’ and system will automatically prompt you the relationship link between these tables.

In the ‘View Fields’ tab enter the fields that you wish to include in the View.  Please remember to include the ‘key fields’ from each of the tables in the fields selection else you will encounter an error during activation of the view.

https://lh4.googleusercontent.com/wBozB6BXHvkZizKcoRMfLqrXSwccnVB5y8husJNLnBQv9BXuDLiqTuNT-j3ryrEBbb3Oqcb_Go8vPwCCzuqhTjvgQ5BPgVTtL8cpu_nsNHezdtdkEC7vgEwQ1ZfMN_RajlXozO_SMIoZ7sZ4kA

Save the View. You will be prompted to enter the development class as well as Transport request number for the development that you are carrying.
Enter the relevant values. Click on the ‘Check’ button to check the View for inconsistencies. If there is none, Activate the view.

3) Create a Generic data-source based on the view we just created.
Use Transaction Code RSO2 to create a Generic data-source.

https://lh6.googleusercontent.com/j9aj1Azslvdj5W0X9_NMOhZuTnKbwoWEK9p6nIcFAPYTcQaR3yid6LmQ9q2aGUzYbz9WuQJQ3UJdmGxieErMd10lJ4cXzbw7CZ8ODiQBhVS70gC2tNmd1kKCwVRddwhH1X-WPSKD0eCZSNq9rw

In the next screen enter the values as required.
Application Component: Component name where you wish to place the data source in the App. Component hierarchy, in our case SD.
Text: Descriptions (Short, Medium and Long) for the data-source.
View/Table: Name of the Table/View on which you wish to create the Generic data-source, in our case ZVIEW_VBAK_VBPA.

https://lh5.googleusercontent.com/rj425EpyqQCRWOQK96xzEQqQ07EFr9SNhAClSlGetivVtAis4NtJk5xnvBZ-pwMrKHMD8XFqt-Xv1ajv6v1vVYRxXPVqOe3fv8Q5kX0vNEEz1sPEdHES_kKtBcD-usH8r9ibmEE5m-wshubShg

Save the data-source.  The Generic data-source is now displayed allowing you to Select as well as Hide field. The fields ‘hidden’ will not be available for extraction. Fields in the ‘Selection’ tab will be available for Value Selection in the Info-package during data extraction from the source system to the PSA.

https://lh5.googleusercontent.com/oWD0nxPmfpYGDh0dhJ5AG9B7u6pcXvn_D_qci8wAy-E0AP7gBoFyo-ComJkDBhHFQ7d-2DZys3Y4wqK6cGJLM7rFxv5D2Jznu6zYxAu3Tx_knZRGcqt6b0uMA56HLaGvQBDDjnxeKa8AOgBJqA

Save.
4) Checking the data in the extract checker (T code – RSA3)

https://lh5.googleusercontent.com/JWqmGdU50VwzQC8wZqOKsqtJ13JlusL0PKeGFONgUeyqRaHMy3wT_z9-cuw_tFxJExKQvGhWuAIlag-hSgUAjpl0K6ds7eARB-aYlGzJtlksZfHT1ufjvYDz-zOLZ1WSNm6YkHhbE7aA60dnKQ

Here I am extracting the records with VBELN between 4970 and 4980. (If you want to have the correct number of records extracted,
Give Data Records/Calls as 100000 and click on “Extraction”)

https://lh6.googleusercontent.com/dqBb6qnVTWVmePBWU6z8WvF7JOw3k0_kP4YYshqflp8dAuWGlVTFYOh4HRXUUJhdSWlKU6W_maJR4og8SRyE2e_2XlcSVKQSmEvAwMeyrIAY5PZjHxIniPhYi39siy2qL9WyWPaOc4cMF06ZVw

Click on ‘Display list’ to display the number of data packets available.

https://lh6.googleusercontent.com/Pu7jC3SSkkRT6hqBesjanqpPRF--PINqZzM1LTu8KEN80nW9CW80OGGd8NnLUY5G8tyhx62STjvz9FiVmGFXUaPrTYCbpjRlQtHHS55kZlayRfljKy8uph1LXgXKHZMd28mdvsZKjEmpJuYoWw

Double-click on the Data packet and the records in the data packet are displayed.

https://lh3.googleusercontent.com/3wsp2FI4oiuMf50R74S8hRZD0XmHxk8tE92izNG80VtuFVDzytJ_IdsYyP2jvbwnH9RqYobt48jzH2XTRJuu0gce1UoI0JDmtKzU03fbP9N5AAzpM2ji9Nr2KkkFmk5aMG2LegbDjLeZruxg8Q

Here we can see that each Sales Document Number has 6 entries, so between VBELN (4970-4980) we got 6*10=60 data records.

5) Go to RSA6 ( Post process Datasource and Hierarchy) and check for your Datasource.  This holds all the data-sources that are active in nature.

https://lh5.googleusercontent.com/wXBAhN8emw07s24jSfa2S5rFXBB2BRREqK_wpt6amrMoK2lBC3YSk1Zi3by5Phm1mRZSrjB-IJdo_USBnKTIcMu3JkmaVLQnjh3oSk_vXUCQKKBCh7Ffr8wAt4onWQH9p442Pf2vpsH5yv2QFg

The Steps in ECC is done.  Now we have to go for Steps in BI.