cancel
Showing results for 
Search instead for 
Did you mean: 

difference between view and functional module in generic extraction?

Former Member
0 Kudos

hai,

ths is guduri[

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

It is nice to say thanks,with assigning of points(in SDN Terms),and pls close the tag, if you satisfied with the answers.

Regards

CSM Reddy

Former Member
0 Kudos

Hi Kotes,

Pls refer ths,To learn more about Generic Extraction pls read BW350 book. Gereric Extraction can be done in 3 ways.

If you go to transaction RSO2 in R/3 side, provide tech name for data source and click create.

you will get the 3 options.

1)From a DB Table

2)From a DB View

3)From Functional module/ Infoset Query

in first option you can directly give a standard or custom build talbe name. in second option you can select the necessary fields from more than one talbe(eiter standard or custom). In third option you will create a function module or Query to extract data. When creating function modules you can use standard function modules as a template e.g. RSAX_BIW_GET_DATA_SIMPLE.

see weblog : /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module

If you want to enable delta for generic extractor you choose the option delta and provide necessary settings.

Generic extraction is when your extraction is not satisfied by either BC or LIS/LO. It can be using a view / query/table/FM

Here the changed records can be isentified by :

1. Based on the date of creation or last change ( Delta based on 0Calday)

2. Based on the record number ( Numeric Pointer )

3. Based on time of change ( Timestamp)

real time examples would be

1. Master Record creation like customer ID creation

2. Timesheets in SAP PS

3. Invoive details / Sales Order Details.

Pls check this web logs for clear Idea.

/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b06...

Have a look at these threads too.

The steps for creating extractor using Function Module.

1. Create new Function group (if you have already not done so) in Se80

2. Copy Function module "RSAX_BIW_GET_DATA_SIMPLE" with suitable name.

3. Change the code that populate data.

Following table may give you the guideline for parameters.

Parameter Description

I_REQUNR (import) BW provides this request identifier. It is a system-generated identifier in the form REQU_XXXXXX. BW uses this same identifier in all function module calls that relate to a single load.

I_DSOURCE (import) The name of the generic extractor

I_MAXSIZE (import) The maximum number of records that BW expects to be in each data packet

I_INITFLAG (import) A Boolean flag that indicates if this is the initialization (first) call to the function module

I_READ_ONLY (import) A test flag not needed in most extraction scenarios

I_T_SELECT (table) This table holds any selections from the BW InfoPackage. The function module should examine these selections and only return data that matches the selections.

I_T_FIELD (table) This table holds the fields that BW requests

E_T_DATA (table) The function module fills this table with data records. These records then return to BW as data packets. This table has the same structure as the extract structure defined in the generic DataSource.

NO_MORE_DATA (exception) The function module raises this exception when no more data is available

ERROR_PASSED_TO_MESS_HANDLER (exception) The function module raises this exception if an error occurred during the extraction. It alerts BW to check for error logs.

Change following code to put the selection fields

-


Select ranges

RANGES: L_R_CARRID FOR SFLIGHT-CARRID,

L_R_CONNID FOR SFLIGHT-CONNID.

-


Change following to populate data

-


OPEN CURSOR WITH HOLD S_CURSOR FOR

SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT

WHERE CARRID IN L_R_CARRID AND

CONNID IN L_R_CONNID.

ENDIF. "First data package ?

  • Fetch records into interface table.

  • named E_T_'Name of extract structure'.

FETCH NEXT CURSOR S_CURSOR

APPENDING CORRESPONDING FIELDS

OF TABLE E_T_DATA

PACKAGE SIZE S_S_IF-MAXSIZE.

Some more links:

***Assign points if it helps.**

Regards

CSM Reddy

Former Member
0 Kudos

View is just a combination of table/s with the necessary join condition & a selection of required fields.

Function Module --> Can have logic built using ABAP codes to bring in data from various tables.Validation & checks can be done.Gives more flexibilty if the data has to undergo checks/modification/validation/filteration etc..,

Former Member
0 Kudos

Search SDN , you will lot of info in threads/blogs.

Look at this <a href="/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module !!