Query for generic delta

i need to create a extractor x_attr to bring master data attributes from a table y.how can set
the generic delta on this x_attr generic datasource.does a generic delta exists for attr
datasource?

Hi,
For delta to work properly in case of generic extractor.the field on which you want to make delta should be present in
the data source.
We have three delta.
1.Time stamp.
2.Cal day.
3Numeric pointer.
So depending upon your requirement and volume of your data you can choose the delta method.
Thanks,
Saveen Kumar

Similar Messages

  • Two fields for generic delta

    I have to create one data source which will contain two fields for generic delta...extraction of data will be through FM.SAP provides a standard functionality to create a generic delta. This can only be build on one selected field.
    The logic of the functional module is based on two fields: ICRDT (creation date) and IUPDT (change date). The module should look for both day because when a new records is created the change date does not get populated in R3.
    Can anyone pls help me out?

    Hello Siggi,
    i have to create an delta enabled extractor for a database table.
    The database table (=EAUS) contains the fields "ERDAT" and "AEDAT".
    I'm a Newbie in ABAP und so i read some blogs, articles and how to do papers here.
    But my tests haven't work:
    1. I created a structure in SE11 for extraction. The structure contains all the of the database tabel (=EAUS)
    2. Then I created a data element "ZDATE" in SE11. I integrated ZDATE in the structure.
    3. Then I copied function group "RSAX" and function module "RSAX_BIW_GET_DATA_SIMPLE" in our namespace.
    4. I used the copied function module as a template and adapted the coding in the function module.   The coding is from the paper "Functional Module Based Delta Enabled Generic Datasource"   
    But i doesn't work. My deltaenabled generic datasource doesn't get the deltas. In RSA3 with update mode "D" no data records were selected. (I create new records in the database EAUS before I checked the extraction). The update mode "F" and "C" works.
    Can you help me and send me the coding of your function module?
    Many thanks!
    Jan

  • Safety Intervals for Generic Delta

    Hello Gurus,
    I want to know about safety upper limit and lower limit for generic delta.
    I have gone through the previous threads related to this topic and i am not able to understand completely.
    can anybody explains me this in detail with example in terms with Calday, Timestamp & Numeric pointer.
    Thanks in advance.

    There is very good example was exist on wiki.
    please search and help yourself.
    Use Google search by using search term " wiki generic delta".
    You will get what you need.

  • EKBE table for Generic Delta

    Hi Gurus,
    Good Day to all. I just like to inquire some details for creating generic datasource with delta enabled. I have created a view table with fields from EKBE table, and created generic datasource that reads the view table I have created from EKBE, now it needs delta process with CPUDT as delta specific field name, seeing the data type of CPUDT, it is DATS with 8 length.
    I would like to assure if what will be use as marker of delta, timestamp utc, timestamp local, calendar day and numeric pointer?
    And if I use one of the above, what settings that needs to be use for the safety interval upper and lower limit?
    Thank you for your inputs and really appreciate it.

    Hi,
    use the CALDAY as a generic delta pointer.
    i would like to recommend as: Safety Interval for Upper Limit as 1 and Safety Interval for lower Limit as ZERO
    i think your are using the DSO as a staging layer no worry about duplicates.
    Thanks,
    Phani.

  • Regd Safety Interval Lower Limit for Generic Delta

    Hi All,
    Safety Interval Upper Limit =1  for a Generic Delta would get Delta based on yesterday's BW data.
    What would Safety Interval Lower Limit would do for a Generic Delta .
    Your inputs please
    Sree

    Hi,
    just a short example:
    you run a init today --> 20070525  (internal date format).
    for the next delta tomorrow the system takes the last extraction date - 1 day so 20070524 for data selection and will store 20070526 as last extraction date and so on.
    This is to make sure that you will get all additional records extracted which were changed or created on each extraction date, but after last extraction. OK, you will get some records twice, but therefore you normally post the data to a ods via overwrite mode and this will take care about the 'real' delta while doing the further posting to the cube.
    Hope this helps
    kind regards
    Siggi

  • Time interval limit for generic delta on timestamp

    I have searched a lot about delta on timestamp in the forums.
    But I'm still not clear with the safety upper and lower limits..how is my delta load affected by this value?
    What happens if I dont specify any value for the interval limit?

    Hi,
    This is very simple thing, you must be knowing the concept of data posting in transactional system, e.g. creating a sales order.
    When you create an order and press save, system takes data from this screen to the database tables and once this action, which is called "DB COMMIT", gets completed, you get data in your system tables. So this activity may take some time before you can retrive this information.
    Let's say it takes 5 mins, so when you'll collect delta records, if some records, which are under process for DB commit, they won't come in delta. Say u collect these records at 12:00 AM and record posted 11:55 PM will take 5 mins to reflect in Database. So we keep safty limit of 5 min.
    Upper and lower means starting and ending of time window, from which you want to extract records.
    Hope it helps in understanding...
    Regards,
    Ashish

  • How can I get delta records for Generic Delta

    Hi BW Gurus,
    I am using Generic Extractor using View from CATSDB and CATSCO talbes. At the time of modifying and changing records I am unable to get those records in BW despite enabling delta in RSO2 screen. I am able to view those modified and added records in R/3 in tables. Plz help me how I get those records to BW.

    hi,
    After we loaded all the historical data uing full upadate . Implemenattion process is over , But we will have the Transaction data that will raise daily , So we have to store that New / changed data in Delta q , And extract them each day by Delta Update
    So we will create an Info packege with the update mode as Delta , And schedule them when to start extraction , So we create the process chain uisng RSPC by giving the Info packege name . And extract the Detla daily as per schedule .
    award pts if helpful..

  • Generic Delta for table MVKE

    I need to extract material sales data from table MVKE.
    I want to use generic delta datasource but I'm not sure based on which field I need to load delta.
    Any suggestions?
    Is it possible to use generic delta for MVKE?

    Hi,
    Yes you can go for generic delta, but you need to decide how your delta should be, whether you want only changed records or after before images or only new records,...
    After deciding if you want only new records then you can go for CREATED On field
    For changed records ou can go for CHANGED ON field
    if you want after before images then choose the correct fields,
    after choosing the delta you have to check for when you want to run your delta, daily once or more than ones, if you want yo run more than once go for time stamp.
    Regards,
    Pavan.

  • RDA enable option in Generic Delta

    Hi,
    Where do you see RDA enable option in Generic Delta in both the cases R/3 4.7 and ECC6.0?  I didn't find the enabling option.  Could anyone tell me any settings need to be done before it enables.  Whether RDA enables for Generic Delta?  If yes what method SAP recommended to use among table/view, FM, or InfoSet Query?
    Thanks & Regards,

    Hi Lathika
    to enable RDA option go with WEB Service data sources in the data source-Extraction tab you can see the option Realtime where you can find RDA suppoted
    but wen creting the infopackage you need to assign the daemon to that and assign your DTP which loads further targets from that data source also to the same daemon and mention request losing settings in the info package
    for example if you mention the request closing time is 1 hour that particular request will be opened for 1 hour the deltas that are posted in that 1 hour will fall in this request
    after the request automatically will set to closed
    Thank you

  • Difference between Generic extraction and Generic Delta

    Hi Experts,
    Pleasee give of some information below  query:
    1) Difference between Generic extraction and Generic Delta.
    2) How to achieve Generic delta.
    3) When we go for Generic delta instead of generic extraction.
    Advance ThankU. Points vl be assigned.
    Thanks,
    Ragu.R

    Hi,
    Generic delta is the delta load done using Generic DS.
    Generic extraction
    Usage:
    1. When the standard extractors are not supporting the extraction what you need. If SAP does not have a standard extractor for your need to get data from R3, you would have to go for generic extractor.
    2. If you create a custom object say by combining certain base tables in R3 say custom tables ZTAB1 and ZTAB2. These two tables are not SAP provided tables and there will not be any standard extractors. So cases like this you will have to go for generic extractors.
    How:
    You have to use RSO2 transaction and you can also set delta based on, one of the three characteristics such as timestamp, calday or pointer (a sequence no).
    once you create it and activate it. The extractor will be available in ROOSOURCE - (table in R3 where all the data sources are available).
    Refer:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/content.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    thanks,
    JituK

  • When we go for Views and Function Modules for Generic Extraction

    Hi Experts,
    Can you please explain when we go for extracting the data using Views and when we got using Function Modules using Generic Extraction from R/3 system to BW with examples. And also can you explain when we go for delta for the above both scenarios.
    Thanks for you help in advance
    Rohith

    Hi,
    Scenario for Extarction using FM
    Imagine the scenario where you need to extract data from
    tables having no common field between them and thereby preventing you from creating a view on top of those tables..
    Or simply consider tables that are highly unrelatd in terms of fields, but you have a requiremnt to extract data from them.
    Also Refer.
    create generic extractor based on 2 tables
    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Steps.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    http://help.sap.com/saphelp_nw04/helpdata/en/86/1c8c3e94243446e10000000a114084/frameset.htm
    Scenario for Extraction using View
    If there are more number of tables and data in those tables can be represented using joins then we can use this type of extraction
    For more info Refer these links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
    Difference between "Help View" and "Search Help"
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
    for more detailed info look on:
    http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
    For GEneric Delta refer these links
    [generic with delta;
    [https://forums.sdn.sap.com/click.jspa?searchID=11388803&messageID=5164737]

  • Doubt Reg Generic Delta "Safety Interval" Setting

    Hi Experts,
    I have a doubt regarding Setting "Safety Interval Upper Limit" and Lower limit in RSO2 for generic delta.
    What does this setting imply?
    If I do setting for calender day say both 1 then wht will be difference between delta before setting amd after setting?
    Plz explain in terms other tham help provided...
    Points will be awarded to say thanks..
    Thanks in advance,
    Sorabh

    Hi Sorabh,
    Here some SAP informations:
    Safety Interval Upper Limit of Delta Selection
    This field is used by DataSources that determine their delta generically using a repetitively-increasing field in the extract structure. The field contains the discrepancy between the current maximum when the delta or delta init extraction took place and the data that has actually been read. Leaving the value blank increases the risk that the system could not extract records arising during extraction. Example: A time stamp is used to determine the delta. The time stamp that was last read is 12:00:00. The next delta extraction begins at 12:30:00. In this case, the selection interval is 12:00:00 to 12:30:00. At the end of extraction, the pointer is set to 12:30:00.  A record - for example, a document- is created at 12:25 but not saved until 12:35. It is not contained in the extracted data but, because of its time stamp, is not extracted the next time either.
    For this reason, the safety margin between read and transferred data must always be larger than the maximum length of time that it takes to create a record for this DataSource (with a time stamp delta), or it must display an interval that is sufficiently large (for determining delta using a serial number).
    Safety Interval Lower Limit
    This field contains the value taken from the highest value of the previous delta extraction to determine the lowest value of the time stamp for the next delta extraction. For example: A time stamp is used to determine a delta. The extracted data is master data: The system only transfers after-images that overwrite the status in the BW. Therefore, a record can be extracted into the BW for such data without any problems.
    Taking this into account, the current time stamp can always be used as the upper limit when extracting: The lower limit of the next extraction is not seamlessly joined to the upper limit of the last extraction. Instead, its value is the same as this upper limit minus a safety margin. This safety margin needs to be big enough to contain all values in the extraction which already had a time stamp when the last extraction was carried out but which were not read. Not surprisingly, records can be transferred twice. However, for the reasons above, this is unavoidable.
    Extracted Data Delta Type
    The system uses the delta type to determine how extracted data is to be interpreted in BW, and into which data targets it can be posted.
    A distinction is made between the following:
    1. Additive delta
    The key figures for extracted data are added up in BW. DataSources with this delta type can supply data to ODS objects and InfoCubes.
    2. New status for changed records
    Each record to be loaded delivers the new status for the key figures and characteristics. DataSources with this delta type can write to ODS objects or master data tables.
    Check also examples in "How to... Create Generic Delta" under www.service.sap.com/bi.
    Ciao.
    Riccardo.

  • Urgent: Problems in Generic Deltas by Function Module

    Hi BW Experts,
    My requirement is to extract text from CRM to BW using Zfunction module, copy of RSAX_BIW_GET_SIMPLE_DATA
    which works fine for full loads but the problem arises only when i go for generic deltas. My code in FM for Deltas is:
    LOOP AT s_s_if-t_select INTO l_s_select.
    CASE l_s_select-fieldnm.
    WHEN 'ZDATE'.
    s_date_from = l_s_select-low.
    s_date_to = l_s_select-high.
    WHEN OTHERS.
    ENDCASE.
    ENDLOOP.
    IF s_date_from IS INITIAL.
    s_date_from = '20060401'.
    ENDIF.
    IF s_date_to IS INITIAL.
    s_date_to = '99991231'.
    ENDIF.
    OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT * FROM STXH
    WHERE TDOBJECT = 'CRM_ORDERH'
    AND TDID = 'A002'
    AND TDSPRAS = sy-langu
    and TDLDATE between s_date_from and s_date_to
    or tdfdate between s_date_from and s_date_to.
    ENDIF.
    FETCH NEXT CURSOR S_CURSOR
    APPENDING CORRESPONDING FIELDS
    OF TABLE wa_stxh
    PACKAGE SIZE S_S_IF-MAXSIZE.
    TDFDATE is creation date and TDLDATE is changed on
    My extract structure contains Zdate(TDLDATE), Ztext1,2,3, Key field and langu in RSO2 I have selected calday in generic delta and Zdate as field Nm and upper limit as 1 and lower limit as space in settings and new status for changed records button.
    Did I missed something because when i check in RSA7 i didnot see any changed records under totals column and i tried to load without it into BW than i didnot received single record evenafter changes.Would anyone suggest me the good solution for it I appreciate it in advance. I have seen lot of posts in SDN but I didnot find this type of secenario anywhere.
    Thanks in advance
    Regards
    Kishore

    Kishore,
    go through the thread... which i provided for Generic DS using function for CRM Texts.
    Re: Urgent: Extraction through function module
    Any questions please let me know. If you have any questions update the thread with your mail id.
    Replace the code with ...
    LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZDATE'.
    MOVE-CORRESPONDING L_S_SELECT TO L_R_TDLDATE.
    APPEND L_R_TDLDATE.
    ENDLOOP.
    OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT * FROM STXH
    WHERE TDOBJECT = <Text Object>
    AND TDID = <Text ID >
    AND TDSPRAS = sy-langu
    AND (TDLDATE IN L_R_TDLDATE
    or TDFDATE IN L_R_TDLDATE).
    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 wa_stxh
    PACKAGE SIZE S_S_IF-MAXSIZE.
    L_R_TDLDATE will be calculted by the system. Internally, system will save the Last Delta date(you need to enable this field for Generic delta).
    all the best.
    Regards,
    Nagesh Ganisetti.

  • Generic Delta extraction by Function module issue

    Hello Experts,
    Please help !!!
    I have problem for delta extraction by Function module.  For the full load, I wrote function module based on RSAX_BIW_GET_DATA_SIMPLE. It works fine.
    But I would like to have the delta load enabled. Therefore, I modified the datasource, add a delta specific field u2018ztimestampu2019, which type is calendar day.
    Then I create a function module based on template u2018RSAX_BIW_GET_DATAu2019, as this support the upload mode. But when I test this datasource in RSA3, no matter itu2019s full load or initial delta load, it always send me an error, u201CErrors occurred during the extractionu201D.
    I had some debug, and found that there is no value  for i_isource when my function module is called. Therefore it raised the exception.
    But I do not have the chance to debug my code for the delta logic, can somebody help to check?
    I also check the entries in ROOSOURCE,
    For my datasource ZTRNREC_FM_DELTA, The DELTA value is u2018AIEu2019, and extraction method is u2018F2u2019, should I change them to DELTA= u2018Du2019 and extraction method to u2018F1u2019? Where to change?
    FUNCTION ZRSAX_TRAININGREC_DELTA.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_ISOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
    *"     VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE OPTIONAL
    *"     VALUE(I_DATAPAKID) TYPE  SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
    *"     VALUE(I_PRIVATE_MODE) OPTIONAL
    *"     VALUE(I_CALLMODE) LIKE  ROARCHD200-CALLMODE OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZTRN_REC_TIME OPTIONAL
    *"      E_T_SOURCE_STRUCTURE_NAME OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    The input parameter I_DATAPAKID is not supported yet !
    Example: InfoSource containing TADIR objects
    Auxiliary Selection criteria structure
      DATA: l_s_select TYPE sbiwa_s_select.
    Maximum number of lines for DB table
      STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize,
              S_S_IF TYPE SRSC_S_IF_SIMPLE,
              S_COUNTER_DATAPAKID LIKE SY-TABIX.
    Parameter I_PRIVATE_MODE:
    Some applications might want to use this function module for other
    purposes as well (e.g. data supply for OLTP reporting tools). If the
    processing logic has to be different in this case, use the optional
    parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
    between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
    (I_PRIVATE_MODE = X).
    If the message handling has to be different as well, define Your own
    messaging macro which interprets parameter I_PRIVATE_MODE. When
    called by BIW, it should use the LOG_WRITE macro, otherwise do what
    You want.
    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
    The input parameter I_DATAPAKID is not supported yet !
    Invalid second initialization call -> error exit
        IF NOT g_flag_interface_initialized IS INITIAL.
          IF 1 = 2. MESSAGE e008(r3). ENDIF.
          log_write 'E'                    "message type
                    'R3'                   "message class
                    '008'                  "message number
                    ' '                    "message variable 1
                    ' '.                   "message variable 2
          RAISE error_passed_to_mess_handler.
        ENDIF.
    Check InfoSource validity
        CASE i_isource.
          WHEN 'ZTRNREC_FM_DELTA'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_isource            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
    Check for supported update mode
        CASE i_updmode.
          WHEN 'F'.
          WHEN 'D'.
          WHEN 'R'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e011(r3). ENDIF.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '011'                "message number
                      i_updmode            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
    Check for obligatory selection criteria
        APPEND LINES OF i_t_select TO g_t_select.
    Fill parameter buffer for data extraction calls
        g_s_interface-requnr    = i_requnr.
        g_s_interface-isource   = i_isource.
        g_s_interface-maxsize   = i_maxsize.
        g_s_interface-initflag  = i_initflag.
        g_s_interface-updmode   = i_updmode.
        g_s_interface-datapakid = i_datapakid.
        g_flag_interface_initialized = sbiwa_c_flag_on.
    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 g_t_segfields.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
      LOOP AT G_T_SELECT INTO L_S_SELECT
            WHERE FIELDNM = 'ZTIMESTAMP'.
      ENDLOOP.
          IF G_COUNTER_DATAPAKID = 0.
            IF L_S_SELECT-LOW = '' AND L_S_SELECT-HIGH = ''.
            OPEN CURSOR WITH HOLD G_CURSOR FOR
                SELECT (g_t_fields)
                FROM ZTRN_REC_TIME.
            ELSE.
              OPEN CURSOR WITH HOLD G_CURSOR FOR
                SELECT (g_t_fields)
                FROM ZTRN_REC_TIME
                WHERE ZTIMESTAMP >= L_S_SELECT-LOW
                  AND ZTIMESTAMP  <= L_S_SELECT-HIGH.
            ENDIF.
          ENDIF.
      FETCH NEXT CURSOR G_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR G_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.
    ENDFUNCTION.
    I found some similar issue in this forum by link
    Generic Extractor Delta Function Module code, but still I could not get clear answer.
    Can you please help me:
    1)     why there is no value for i_source , how to fix it?
    2)     For the delta logic for ztimestemp, is it correct?
    3)     Need I modify the entries in ROOSOURCE ?
    Thanks a lot !!!

    Hello Andre,
            Thanks a lot for your help. I did some change , but still does not work. Could you please help check.
    Now the source code are the following, It's based on the RSAX_BIW_GET_DATA_SIMPLE, as you confirm that this also supply the update mode (full, initial delta, delta).
    FUNCTION RSAX_BIW_GET_DATA_TRAININGREC1.
    ""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
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  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  ZTRN_REC_TIME OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    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.
    Select ranges
    RANGES:
            L_R_ZTIMESTAMP FOR ZTRN_REC_TIME-ZTIMESTAMP.
    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 'ZTRNREC_FM'.
          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 ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZTIMESTAMP'.
          MOVE-CORRESPONDING L_S_SELECT TO L_R_ZTIMESTAMP.
          APPEND L_R_ZTIMESTAMP.
          ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
         IF L_S_SELECT-LOW = '' AND L_S_SELECT-HIGH = ''.
            OPEN CURSOR WITH HOLD S_CURSOR FOR
            SELECT (S_S_IF-T_FIELDS)
            FROM ZTRN_REC_TIME.
            ELSE.
            OPEN CURSOR WITH HOLD G_CURSOR FOR
            SELECT (S_S_IF-T_FIELDS)
            FROM ZTRN_REC_TIME
            WHERE ZTIMESTAMP >= L_S_SELECT-LOW
            AND ZTIMESTAMP <= L_S_SELECT-HIGH.
         ENDIF.
        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.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    I think it already includes the important statements you suggested.
    I test this FM in RSA3, for the Full load mode, it works fine. Also if I checked the debug mode in execution , it will stop in the code and let me debug.
    But when I choose other mode, like 'initializion of the delta transfer'  or simulation of initial delta, I always get error 'error occurs  during the extraction' .. even I choose debug mode, but it could not enter the code for debug..
    Till now I did not see any parameter or value for the upload mode..
    Another questions is that, in RSO2, I define Ztimestamp as my delta field.. But , can I add other field as selection condition in the datasource definition, and has its range table in this function module ?
    Should I change the entries in ROOSOURCE for this datasource ??
    Please let me know your feedback, do you have some concret example for generic delta extraction ?
    Thanks a lot !

  • Generic Delta 2

    Dear Expert
    I have a z Table consisting fields like company code , change date, etc.
    I have created a generic delta using change date as delta field.
    A program loads data to this table.
    Lets say I loaded all data for company code 1000 and there are other company code data I also need to load but have not done so.
    I replicate the datasource to BI 7.
    I have read guides on Generic delta and need clarification on its mechanism in more detail.
    ========
    1. Do we need to  Initialize Delta for Generic Delta?
    2. If  my infopackage used for the init is change date of yesterday, what happens when some days later, I load company code data 2000 into the z table and these data has change dates earlier than the init date?
    3. Does init work like this : lets say the data selection in the infopackage used for the init is :
    company code = 1000
    change date = yesterday.
    the 1st delta infopackage will be based on the change date of yesterday and the upper and lower limit?
    4. What if I subsequently load other company code data into the z table? How can these be loaded as delta by the existing delta? Or must there be another init? can this be done?
    5. Technically, if delta is loaded today, and 2 days later, I insert manually into z table a record having the same change date as the 1st delta change date.  How does the delta mechanism know about this? I seek clarification that this record will not be known by the delta and will not be picked up and loaded by the next delta infopackage because the change date is incremental and will never pick up and old change date and delta is based on change date selection.
    Hope you can enlighten me on the above doubts .
    Best regards
    Pascal

    Hi Pascal,
    1. Do we need to Initialize Delta for Generic Delta?
    Yes, you need to do init to capture the delta records.for this while designing you have to select Delta check box in data source maintenance screen.
    2. If my infopackage used for the init is change date of yesterday, what happens when some days later, I load company code data 2000 into the z table and these data has change dates earlier than the init date?
    The change date will be populated in Z table based on system, when you change any record today you won't get yesterday date.anyways in your question as change date is less than last delta run date it won't pick that records.
    3. Does init work like this : lets say the data selection in the infopackage used for the init is :
    company code = 1000
    change date = yesterday.
    the 1st delta infopackage will be based on the change date of yesterday and the upper and lower limit?
    The best practice is run the init with out any selections, unless when you have requirement that you need to create multiple init's on same data source.
    no need to give date selections in info package(already your delta is working on change date).If you need data for a particular company code, give company code other even do not give company code as selection.It will pick all the new or changed data from last delta run.
    4. What if I subsequently load other company code data into the z table? How can these be loaded as delta by the existing delta? Or must there be another init? can this be done?
    Do not give company code as selection in your delta info package.same delta IP will pick the data for all company codes.
    5. Technically, if delta is loaded today, and 2 days later, I insert manually into z table a record having the same change date as the 1st delta change date. How does the delta mechanism know about this? I seek clarification that this record will not be known by the delta and will not be picked up and loaded by the next delta infopackage because the change date is incremental and will never pick up and old change date and delta is based on change date selection.
    As i already told we cannot give change date manually, when you save a record this will be populated by system in the table.
    Delta settings for generic data source will be maintained in table ROOSGENDLM (here we will have last delta run time stamp on this data source).When you run delta next time, it will pick the data which was stored after delta time stamp.
    Regards,
    Venkatesh.

Maybe you are looking for

  • Hints in Oracle 8i

    Is there any difference in the way Hints function in Oracle 7.3 & 8i & also within the different versions of 8i? Does hints always go in for cost based optimization or is it only in 8i?

  • MacBook Pro USB Hubs no longer working

    Hello Apple Support. My 13" Mid 2012 MacBook Pro (Running OSX Mavericks)  is having some odd issues recently. I have 2 USB 3.0 hubs. One of them works perfectly fine, the other doesn't work at all. I've plugged everything from mice to USBS's, but the

  • Cannot open password protected .pdf files?

    I have an ebook for school that requires a username/password combo to open. It of course opens on my computer, but when I try to open it on my Galaxy III, it says there was an error opening the document. It also will not open with my Galaxy Tab 7.0.

  • Disable delete?

    Is there a way to disable "delete" so I can read all of my kids texts?

  • Get printer out of mfg mode

    Printer: Photosmart 2575 All in one Somehow I managed to get my printer into MFG-mode. Most important functions seem to work, but I prefer the "normal" mode.  Switching off the printer for some time (several times) does not work. Re-installation: no