Function Module Extractor with Delta Functionality
Hi Friends,
I have to extract the entire data of CDPOS table in R/3 , as its a cluster table I am unable to build a view, I am planning to go for FM extraction, Could someone help me as how to build it with Delta Functionality.
I think I need to develop the Datasource, with Extract Structure,( Do I need to create a Structure in SE11) Please help me out .
Thanks,
Krish
Hi,
you can either use an existing structure or else create one on your own. (SE11).
The DeltaHandlig fairly easy.
When having finished the extractor (FunctionModule, Structur and DatasSource), go to the "generic Delta" button and select the relevant field.
The Generic Delta and its DeltaPointer is managed within the DeltaQueue (RSA7) and works more or less like a selection. Don't think too hard about it in your function module except taht you need to select by this field in your FM.
Did that come clear?
hth
Cheers
Sven
Similar Messages
-
Function Module Extractor with Delta
I'm very new to working with the BW, so I hope I'm explaining my question in a way that makes sense.
I need to make a BW extractor that pulls data from at least one table, possibly more, and which also calculates some data.
I think the only way I can do that is by using an extractor with a function module.
I've been looking at the examples in function group RSAX, and I think I sort of get it, except for one part.
I'm really confused about how the delta works.
I'm looking at the example: RSAX_BIW_GET_DATA_SIMPLE
Does it even use a delta?
I'm trying to understand how the delta gets passed, and how it gets used to filter the data in the function module. I'm not sure if it's something I need to code in myself, or if it's something that BW does by itself, or what.
I'm not sure if I'm making sense, but if anyone could help me, I'd appreciate it.Thanks guys, you've been super helpful so far, so I'm just going to keep asking questions. I promise to award points at the end
I'm looking at it now, and I think if I change it to read from a table, instead of read from a function module I can use the 'numeric pointer' option for the delta. (Does that just mean a number? For example, payroll runid is a number, so I could use that and only get new payroll runs?)
However, there still are some calculated fields they want. Someone mentioned doing that on the BW side. How would that work?
Sorry for such vague questions, but any help is really appreciated. -
Enabling FI-SL extractor with delta capability
I am working on enabling FI-SL (3FI_SL_*) extractor with delta capability.
Implemented OSS note 328197 successfully and also related OSS notes.
This works on totals table. Source system is 4.6C
Tested BW01, BW03 and everything seems to be fine, and shows as if extractor is enabled for delta loads.
I have done initialization. it works fine and got records.
But when I do delta - it shows ZERO records.
In RSA7 also I see Zero records.
If you have any experience , will you please share with me.
It's a very urgent one.
VenuCreate some records in the source system so that the base tables for this extractor will add some records.
Then check rsa7 whether it shows any records for next delta.
As Hari said..there might not be fresh records created or records changed,if you do delta load immediately after an init load.
cheers,
Vishvesh -
Generic FM extractor with Delta
Hello all,
I am trying to create a delta function module extractor on a table. I have creation date ANDAT, last change date AEDAT and a deletion flag on the table.
FM has to handle history, new and changes.
How can I generate delta? Can I just use RSO2 to set up delta? How can it be done? Also, can I get the code for a generic FM delta extractor?
Please help.
Thanks,
Anirudh.Hi Sajeed,
So, I do not have to handle delta in the extractor at all? Just create a function module based extractor with all the fields and actually take care of delta in the infopackage??
The creation date is for newly created records and the change date is for changed records.
My email is [email protected]
Thanks,
Anirudh. -
Function Module Extractor with Internal Table
Hi All,
I have a need to extract records from a complex SQL Statements, so I will be using different SQL Statements and merging the results in to a single internal table. In the function modules what will happen if I do not use cursor WITH HOLD option, (I know it maintains the cursor position) and what if I directly load into E_T_DATA from my internal table. How this will affect the datapackage size?
In the future I will have records beyond 1 million and I am concerned to send all the 1 million record in one package rather than multiple packages during extraction.
Please give a solution if you have come acroos this kind of situation with your development.
Thanks,
Alex.Alex,
I do not see why the complexity of ABAP statements should make you change the data processing logic proposed by SAP by way of the sample Function module.
It appears to me that you are changing something knowing fully well its implications and then trying to find a solution for it.
Good Luck!
Mathew. -
Enhance LIS_ extractor with delta load
Hi all,
I need to enhance 2LIS_02_ITM or 2LIS_02_SCL with account assignment (EKKN). How should I handle the delta from account assignment? It is in 460 environment. I'd like to have similar extractor as 2LIS_02_ACC which exists in 700.
How should I approach? Which way is better?
Options one: Create a generic extractor, delta base on AEDAT in EKKN table. Create custom ODS....
Option two: enhance current 2LIS02_ITM or 2LIS_02_SCL, add cufs. But how to handle the delta?
Thanks
J.Hi J CHEN
In my opinion first check with MM -Purchasing consultant whether the delta in account assignment is linked to purchasing document changes or not ? (check whether delta is supported or not ...you can do this testing in SAP R/3 Side) and if answer is YES then you should go for Option 2 which is relatively simpler.
hope this helps
Regards
Pradip
(Friends: Don't forget to assign points !!) -
hi all,
can any one please provide any thing on generic extractors particular to delta (time-stamp)
VRKRHi,
please search the forums. This question has been asked already a lot of times. Additionally you might check my business card --> there is a link to a weblog related to that issue.
Siggi -
Hi Everybody,
I am using a delta mechanism and would like to check the actual value of the field used for the delta. Where can I find this value?
Thanks in advance
FedeXHi Fedex,
Check in RSA7. Check the last column i.e. STAT column. But before this you have to upload the data atleast once.
If useful..assign points.
Regards,
P B -
Generic Extractor using FM with Delta Logic
Hi,
i want to create a generic extractor with Delta Logic based on a FM.
The extractor works fine for full loads (extractor method "F" or "C"), but delivers no record for the extractor method "D" (Delta). I placed a hard coded break-point in the FM, so that the processing should stop while testing it with TC "rsa3". Using the extractor method "D" the debugger doesn't stop. So it seems, that this FM will not be processed for method "D". What could be wrong?
I tried different ways to create the generic extractor:
First i copied the template "RSAX_BIW_GET_DATA_SIMPLE" and tried to get the information for delta-run by "LOOP AT i_t_select INTO l_s_select WHERE fieldnm = 'DATE_FIELD'." But as the processing for method "D" does not consider the FM, there is no chance to get delta data.
On second try i used the template "RSAX_BIW_GET_DATA" and changed "EXMETHOD" from "F1" to "F2" in table ROOSOURCE for the Data Source. In this case i get information about the Update mode (Parameter i_updmode). But the processing leaves the FM for extractor method "D" out too.
Does anybody know, why the FM is not processed for extractor method "D"?
Is there another way to get delta capable extractors based on FMs?
Thanks for help in advance!Hello
See this blog which uses the same FM with explanation
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
See this forum too
Generic Delta Function Module
Other docs
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
http://help.sap.com/saphelp_nw04/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/content.htm
Thanks
Chandran -
Sharing an extractor with another BW system possible?
Dear all,
We currently run BW3.1. Now we would like to install NW2004s next to it.
Is it possible to use the same extractor with delta loads when you have only 1 source system with 2 BW systems?
Do both BW systems contain all information after delta loads?
Thanks in advance,
RalphHi,
Yes, its possible. You can have just one source system, feeding multiple BW systems. But in your case, I'll be careful as you are trying to upload data to 2 different versions of the BW system. You have to check and test for the PI versions on the R3 side. Your current set of PI versions on R3 will have to be upgraded if you are planning to connect the system with the netweaver 04s version. Once you upgrade, you also need to make sure that the data loads work fine with your older BW version as well.
Cheers,
Kedar -
Issue with Delta in Function Module
Hi Team,
I have an issue with delta in Genric extraction using function module.Full load is working fine and i have taken post_date as delta field.plz chk the code if any delta related statements are missing.
FUNCTION ZRSAX_BIW_MANGEMENT_RAT .
""Local interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZQMBW_FUJ_MANAGEMENT OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
Example: DataSource for table MANAGEMENT RATING
TABLES: ZQMBW_MANAGEMENT.
Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
cursor
S_CURSOR TYPE CURSOR.
RANGES: POST_DATE FOR ZMMTVEND_RATING-POST_DATE,
VENDOR FOR ZMMTVEND_RATING-VENDOR.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZQMMANAGEMENT_DS'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
Fill field list table for an optimized select statement
(in case that there is no 1:1 relation between InfoSource fields
and database table fields this may be far from beeing trivial)
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
IF S_COUNTER_DATAPAKID = 0.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'VENDOR'.
MOVE-CORRESPONDING L_S_SELECT TO VENDOR.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = VENDOR-LOW
IMPORTING
OUTPUT = VENDOR-LOW.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = VENDOR-HIGH
IMPORTING
OUTPUT = VENDOR-HIGH.
APPEND VENDOR.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'POST_DATE'.
MOVE-CORRESPONDING L_S_SELECT TO POST_DATE.
CONCATENATE L_S_SELECT-LOW6(4) L_S_SELECT-LOW3(2) L_S_SELECT-LOW+0(2) INTO POST_DATE-LOW.
CONCATENATE L_S_SELECT-HIGH6(4) L_S_SELECT-HIGH3(2) L_S_SELECT-HIGH+0(2) INTO POST_DATE-HIGH.
APPEND POST_DATE.
ENDLOOP.
**Get Management rating details
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT VENDOR POST_DATE OVERALL_MNGT_RAT OVERALL_DEV_RAT FROM ZMMTVEND_RATING WHERE VENDOR IN VENDOR AND POST_DATE IN POST_DATE .
ENDIF.
Fetch records into interface table.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.Hi
Check URLs:
How to populate the ranges using FM for the SELECTs
Re: Generic Delta Function Module -
Function Module in a Generic Function Module Extractor
I want to use a generic function module (ZFM_CONNECTION_DETAIL) in a Generic Function Module based Extractor.
After Creating, I have checked it in RSA3... Data is showing properly on the Extractor Check.
And replicated on BW side, after triggering the extractor using infopackageu2026 only one record is coming on the target side (BW).
And one job is running endless on the source system.
Generic extractor on the normal code is working properly on both sides.
But problem occurs while I was using Function Module in the Generic function Module extractor.
Waiting for a Reply with solution...........
Hi Siegfried Szameitat,
I have searched a lot to find out the solution of my Question (Problem). But there is no solution for the problem I have.
Please let me to find out a proper solution of my issue....
ThanksFUNCTION zcrm_questionnaire.
Its a full Load...
Codes are as followed..........
DATA:lv_times TYPE i.
DATA:lv_datapakid TYPE numc4.
CLEAR:lv_datapakid,lv_times .
STATICS: s_s_if TYPE srsc_s_if_simple,
sd_no_more_data TYPE flag.
DATA: l_s_select TYPE srsc_s_select.
DATA : s_counter_datapakid LIKE sy-tabix,
s_cursor TYPE cursor.
RANGES : date FOR zresult_lt-date.
DATA: lv_count TYPE i VALUE 1.
IF i_initflag = sbiwa_c_flag_on.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check InfoSource validity
CASE i_dsource.
WHEN 'ZCRM_QUESTIONNAIRE'.
WHEN OTHERS.
IF 1 = 2. MESSAGE e009(r3). ENDIF.
log_write 'E' "message type
'R3' "message class
'009' "message number
i_dsource "message variable 1
' '. "message variable 2
RAISE error_passed_to_mess_handler.
ENDCASE.
APPEND LINES OF i_t_select TO s_s_if-t_select.
s_s_if-requnr = i_requnr.
s_s_if-dsource = i_dsource.
s_s_if-maxsize = i_maxsize.
APPEND LINES OF i_t_fields TO s_s_if-t_fields.
ELSE. "Initialization mode or data extraction
IF NOT sd_no_more_data IS INITIAL.
RAISE no_more_data.
ENDIF.
LOOP AT s_s_if-t_select INTO l_s_select .
MOVE-CORRESPONDING l_s_select TO date.
ENDLOOP.
DATA : v_questionire TYPE crm_svy_db_sid.
DATA : itab_questionire TYPE zsurveyid.
DATA : e_tt_data_get TYPE zresult_lt OCCURS 10.
v_questionire = 'CALL CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'METER INSTALLATION TEAM'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'METER READING & BILLING'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'NO SUPPLY'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'CASH COLLECTION CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'STREET LIGHT'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'CONSUMER CARE CENTER'.
APPEND v_questionire TO itab_questionire.
v_questionire = 'WEBSITE'.
APPEND v_questionire TO itab_questionire.
DATA : counter TYPE i,
high LIKE sy-datum,
low LIKE sy-datum.
CONCATENATE
l_s_select-high+6(4)
l_s_select-high+3(2)
l_s_select-high+0(2)
INTO
high.
CONCATENATE
l_s_select-low+6(4)
l_s_select-low+3(2)
l_s_select-low+0(2)
INTO
low.
BREAK-POINT.
do i_maxsize times.
CALL FUNCTION 'ZCRM_SURVEY_REPORTING'
EXPORTING
e_date_frm = low
e_date_to = high
e_questionire = itab_questionire
CHANGING
it_result = e_tt_data_get.
IF sy-subrc IS INITIAL.
e_t_data[] = e_tt_data_get[].
APPEND e_t_data.
ELSE.
EXIT.
ENDIF.
sd_no_more_data = 'X'.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
lk -
How to Function module extractor
Can anybody give me a step by step procedure to do a function module extractor ?
Like the steps that I need to perform even before i start writing my code
Thanks
ShrutiDear Shruthi,
Do a Search in SDN .you get lot of threads for FM Extraction ...
The easiest way to work out with Function Module is to copy the standard one and modify according to your reqirement.
The standard one is RSAX_BIW_GET_DATA_SIMPLE .
Dont forget to copy the Function grp RSAX into a custom defined Grp and Modify the Ranges options as per ur req.
and in Function module, in Sourcecode and Tables, Do modify the E_T_data with ur Generic datasource ,make sure u also modify the select statements within the sourcecode. If you have an idea on ABAP its really easy to work out.
And regarding the creation of Datasource.
Its really Simple.
Goto RSo2.
Give the name of Datasource.
Give the Fm name and Extract Struc ( name of D.S only).
Save and Generate.
thats it.
Dont forget to assign points.Its a way of saying thanks.
Thanks,
Krishna -
Function Module extractor extracting as a Single Package?
Hi All,
I have created a generic function module extractor, which works fine, but extracts all the records in a single package. The default is set in SBIW as 50000 records. But right now I have only 2500 records. But I changed the packet size to 100 in my info package setting and also specified as 100 with in the function module.
But still I get all the data come as a single package of 2500. I want to make sure that this extractor will not create any problem in production, so I want to test the data packet size. Any suggestion. I have used he standard function module DATASIMPLE and I do setup I_MAXSIZE as 100 in the IMPORT parameter in the function and hav ethe following code in the function module...
APPEND mgremp_stru to E_T_DATA.
mseq = mseq + 1.
if mseq = 100.
G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
mseq = 0.
endif.
endloop.
IF SY-SUBRC <> 0.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
Any Suggestions?
Thx,
Alex.Ramesh,
The simple truth is that what ever you define as a data structure for E_T_DATA should be exactly matching to your selections in the CUSOR. My scenario is way too trichy not just because too many sqls, but because of the nature of HR Tables. Same field will have two different values such as in one record SOBID refers to Org Unit, in the next record the same is Person and in the next record it is Position. So I should have the same field 3 times in a single record. But it is not possible. SO what I did was found 3 different fields whose length and type are same as what I need and selected them but inside my function module I manipulated with internal tables. So the extractor thinks I declare cursor for the same fields I defined in the data source (the value you use in E_T_DATA) and extract them in the FETCH. In the fetch all it checks internally is that whether the only the CURSOR selected fields are extracted , because you will update the E_T_DATA. I know this is little more than what I explained here, but this is the concept.
I am planning to have a weblog or a white paper published on this in a week or two.
If this idea helps assign points.
Goodluck,
Alex. -
Function module call with destination
Hi,
how can check if a function module call with destination works or not ?
How can I debug.
What can be the reason if it is not calles
regards
ertas* to chcek the rfc Destination By pass RFC destination name and Connection Type..
RFC_CHECK_DESTINATION
or
RFC_CHECK_DESTINATION_ID
or
You can use this FM RFC_VERIFY_DESTINATION if your release is greater than 4.6C.
Check this sample code from Craig Cmehil's weblog.
CALL FUNCTION 'RFC_VERIFY_DESTINATION'
EXPORTING
DESTINATION = TMP
TIMEOUT = 10
EXCEPTIONS
INTERNAL_FAILURE = 1
TIMEOUT = 2
DEST_COMMUNICATION_FAILURE = 3
DEST_SYSTEM_FAILURE = 4
UPDATE_FAILURE = 5
NO_UPDATE_AUTHORITY = 6
OTHERS = 7.
IF SY-SUBRC EQ '0'.
"* Do code here
ENDIF.
Prabhu
Maybe you are looking for
-
Httpd fail to start after Zend Core installation
Hi! I need Zend, so I installed it using this instruction. The problem is that httpd daemon faild to start after that. Here is my /etc/httpd/conf/httpd.conf: # This is the main Apache HTTP server configuration file. It contains the # configuration di
-
I need some serious help! I have been trying to update my itunes to version 10.7 and my Quicktime to version 7.7.3! Having no luck! So I tried selecting repair software on all of the Apple applications and they seem to have worked. Then I selected lo
-
Audigty 2 and XP SP3 and 5.1 speakers
Ok, just a little info first. I have a Dell XPS Gen2 PC (2003), XP SP3 32bit, with a Dell supplied Audigty 2 card, ATI Video card 9600. I have finaly ended up get it working by cleaning all creative software form my PC and installing only the SBAX_WB
-
In Reader 9 there was a pdf optimizer panel that you could check off to have the form fields flattened. Is there a way to do this in Reader X, not Pro but Reader X?
-
Bookmark links for OBI in an iFrame
Hi, We have OBI within an iFrame within an ADF portal with a SSO solution. The URL to access portal is a different one than the standalone analytics instance. When we create bookmarks in OBI it generates a link with the portal URL and on trying to us