creation of custom extractors

26
7/24/2019 Creation of Custom Extractors http://slidepdf.com/reader/full/creation-of-custom-extractors 1/26 Creation of Custom extractors Introduction Extractors: Extractors are used to extract data from a source system and to transfer the data to the BI system. They are also used for direct access to the source data from the BI system. Sap has provided standard extractors for the purpose of extracting the data but in some situations they won’t be suffice to our requirements or if we want to fetch the data from the tables. So! in all these scenarios we go for creating custom extractors.

Upload: mahesh-paleti

Post on 21-Feb-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 1/26

Creation of Custom extractors 

Introduction

Extractors:

Extractors are used to extract data from a source system and to transfer the data to the

BI system. They are also used for direct access to the source data from the BI system. Sap has

provided standard extractors for the purpose of extracting the data but in some situations they

won’t be suffice to our requirements or if we want to fetch the data from the tables. So! in all

these scenarios we go for creating custom extractors.

Page 2: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 2/26

Extractors ma"e use of the datasources defined in S#$ for the data extraction. So! for creating

the custom extractor! first we need to create a datasource.

DataSource%

&ataSource is a set of fields that provide the data for a business unit for data transfer into

BI. 'rom a technical viewpoint! the &ataSource is a set of logically(related fields that are provided

to transfer data into BI in a flat structure )the extraction structure*! or in multiple flat structures )for

hierarchies*.

There are four types of &ataSource%

• &ataSource for transaction data

• &ataSource for master data

o &ataSource for attributes

o &ataSource for texts

o &ataSource for hierarchies

When to create a new DataSources:

• Business +ontent does not include a &ataSource for your application.

• ,ou want to implement a delta method on your generic &ataSource that cannot be

implemented by using the generic delta functionality )timestamp! date and sequence etc*.

• The application does not allow you to create additional application specific generic

extractors )+-($#! 'I(S and IS*.

• ,ou use your own programs in the S#$ system to populate your own tables.

• ,ou have to extract data from several &B tables when%

Page 3: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 3/26

o /sing a view is not possible because of insufficient 0-I1

o -nly some fields are relevant to these tables

o &ata has to be enriched with information not available in the B2 system

Creating a new Generic DataSource – Procedure:

• 3o to transaction 4S-5 for creating a datasource. Select a datasource type )li"e

Transaction data or 6aster data attributes or Texts* and assign a technical name to it.

• +hoose 7+reate’ push button! now the screen for creating the generic delta will be displayed

Page 4: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 4/26

• +hoose an application component to which the &ataSource is to be assigned and enter the

descriptive texts.

Page 5: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 5/26

8ere! we have three ways to fill9extract data into the generic datasource we have created.

They are

:* Extraction from &B ;iew

5* Extraction by 'unction modules

<* Extraction from S#$ =uery

1) Extraction from DB iew:

Page 6: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 6/26

+hoose Extraction from DB View , if you want to extract data from a transparent table or a

database view. Enter the name of the table or the database view. #fter generation! you get a

&ataSource whose extract structure is congruent with the database view or the transparent table

view.

Ste! 1% +reating a view%

3o to transaction SE11 and assign a technical name for view and choose 7Create’ button. In

the following screen! provide the description and necessary fields for data extraction and

also provide 70oin conditions’ as well as 7Selection conditions’.

Page 7: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 7/26

Ste! "% 1ow in #S$" transaction! provide the view name )created above* and save the

datasource then S#$ will automatically create an extraction structure which will be

congruence with &B view.

Page 8: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 8/26

 Extraction structure generated by S#$ in congruence with the &B view

Ste! %: 2hen we choose to 7Sa&e’ the datasource! a screen appears in which we can edit the

fields of extract structure. 8ere! we have the options li"e 7Select’! 78ide’! 7Inversion’ and

7'ield only’ each for a different use.

Selection% 2hen scheduling a data request in the B2 Scheduler! you can enter the

selection criteria for the data transfer. 'or example! you may want to

determine that data requests are only to apply to data from the previous

month. If you set the Selection indicator for a f ield within the extract structure!

the data for this field is transferred in correspondence with the selection

criteria in the scheduler. So! in short they act as selection criteria for data

extraction in 4S#< transaction.

Page 9: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 9/26

Hide field: ,ou should set this indicator to exclude an extract structure field from the

data transfer. #s a result of your action! the field is no longer made available

in B2 when setting the transfer rules and generating the transfer structure.

 Inversion: 4everse postings are possible for customer(defined "ey figures. 'or this

reason! inversion is only possible for certain transaction data &ataSources.

These include &ataSources that have a field that is indicated as an inversion

field! for example! the field update mode in the &ataSource >'I?#$?<. If this

field has a value! then the data records are interpreted as reverse records in

B2. Set the Inversion indicator if you want to carry out a reverse posting for

a customer(defined field )"ey figure*. The value of the "ey figure is then

transferred in inverted form )multiplied by @:* into B2. 

Field only: ,ou can enhance data by extending the extract structure for a

&ataSource using fields in append structures. The indicator Field only known

in Exit  is set for fields of an append structure. In other words! by default

these fields are not passed onto the extractor from the field list and selection

table. &eselect the indicator 7'ield -nly’ Anown in Exit to enable the Service

 #$I to pass on the append structure field to the extractor together with the

fields of the delivered extract structures in the field list as well as in the

selection table.

 

Page 10: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 10/26

Ste! '% #fter editing the fields of extraction structure! then save the datasource. 1ow!datasource is ready for extraction. 3o to the transaction #S(% and give the datasource nameand execute it to extract the data.

Page 11: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 11/26

") Extraction * +unction modu,es

 Ste! 1: +opy the standard function group )4S#* to another function group )name should start

with *. Then! select only that function module which is needed )i.e.

Page 12: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 12/26

Page 13: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 13/26

+opy that function module to another function module.

Page 14: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 14/26

Ste! ": -pen the function module through the SE%- transaction and do not change any

parameters except for the T#BES parameter. &eclare your enhancement structure for

the Tables parameter 7E./.D(/(’.

Page 15: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 15/26

Ste! %: In the 7Source code’ tab! ma"e the following changes to the code. &eclare the ranges

according to your requirement and fill them in the code at )--$ #T s?s?if(

t?select I1T- l?s?select 28E4E fieldnm C D#E&#D.* by changing the field names.

Process of extraction through function modu,e:

  The above function module is called up several times during an extraction process.

a) Initia,i0ation ca,,: -nly the request parameters are transferred from themodule here. It cannot transfer data at this point.

) +irst read ca,,: The extractor delivers the data typed with the extractionstructure to an interface table. The number of rows expected is specified in arequest parameter )I?6#SIE*.

Page 16: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 16/26

c) +urther read ca,,s: The extractor delivers the data connected to the lastpac"age! again in a pac"age with I?6#SIE rows.

d) ast ca,,: The function module is now called until the exception1-?6-4E?&#T# is produced. 1o more data can be transferred in the call inwhich the exception is produced.

Page 17: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 17/26

Ste! ': 1ow! save and activate the function module as well as function group.

Ste! 2: 3o to the transaction 4S-5 again and open the datasource we already created.

Ste! 3: In the datasource! provide 7#pplication type’ 7Texts’ and clic" on the 7Extraction *

function modu,e’ button. 8ere! provide the function module we have ust created and

the enhancement structure associated with it.

Page 18: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 18/26

%) Extraction * S(P 4uer*

  Extraction by S#$ query is done through an I1'-SET. So! first we need to create an

infoset and provide the same in 4S-5 transaction for the extraction of the data.

Ste! 1: +reate an Infoset conforming to your requirements.

  Creation of Infoset:

Before start creating Infoset! we need to create the user grou!s )which basically groups

together users with similar tas"s to perform and also have same reporting requirements*.

+reate the user group through the transaction S45%.

Page 19: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 19/26

+lic" 7Create’ button to create it. $rovide the description of this /ser group in the pop(up

screen opened and clic" on 7Save’ button to save the user group.

3o to the transaction S45" and choose a name for the infoset and clic" on the 7Create’

button to create.

Page 20: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 20/26

-n clic"ing the 7+reate’ button! a pop(up opens. 3ive the description and specify the

basis table to oin and then press 7-A’. 'or using other types data sources )apart from

table oin* in the following screen! please refer to the document provided in the reference

section.

In the next screen! base table along with navigator will be displayed. 2e can also insert

new tables to oin them by the path Edit(FInsert table or clic" on 7Insert table’ button on

application toolbar. By default! oining conditions between tables will be displayed.

Page 21: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 21/26

'or maintaining the infoset! clic" on Infoset button. # popup opens as"ing what fields

should be there in field groups. Select radio button Create em!t* fie,d grou!s and press

-". In the next screen! empty field groups will be created.

If we don’t want to use system created field groups! we can delete them by clic"ing on

the button 7De,ete fie,d grou!’ and create new field groups by clic"ing on the 7Create’

button’. 1ow! drag and drop the required fields from left pane to the field group.

Page 22: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 22/26

1ow! clic" on the 7Generate’ button to generate the infoset and assign this generated

infoset to the user group through the S45" transaction. +hec" the 7+hec" box’

corresponding to the user group created above.

Page 23: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 23/26

 

Ste! ": 3o to the transaction #S$" again and choose a datasource name to create and clic" on

the 7+reate’ button.

Ste! %: In the next screen! choose the application component and description texts. #fter that!

clic" on the button 7Extraction from 6uer*’ and there provide the Infoset name we have

created.

Page 24: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 24/26

Ste! ': 2hen we clic" on the 7Sa&e’ button! new screen will be displayed. There choose the

selection fields and hide fields according to the requirement.

Page 25: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 25/26

• Extraction of the data% -nce new datasource is created through any of the methods

explained above! it is ready for the extraction. So! for extracting the data from the new

datasource! go to the transaction 4S#< and give the datasource name and provide desired

selection criteria.

Page 26: Creation of Custom Extractors

7/24/2019 Creation of Custom Extractors

http://slidepdf.com/reader/full/creation-of-custom-extractors 26/26

•  #ll the records satisfying the desired selection criteria will be extracted and displayed