Generic extractor Delta problem

hello,
i have created a Generic extractor based on the AUFM table and the delta field is MBLNR (Material document no) that is a numeric pointer used for delta. My problem is that when i pull the delta not all records are being pulled. Why is that so? Can anyone give suggestions.
thanks
Laura.

Well, using Function module is one approach. I can provide you another approach.
You can create a View based on the following tables
AUFM and MKPF,
use the join condition
AUFM-MANDT= MKPF-MANDT.
AUFM-MBLNR = MKPF-MBLNR
AUFM-MJAHR = MKPF-MJAHR
In AUFM select all the fields that you want and MKPF select the "Accounting Document entry date" field which you can take it as delta field and select calday as your delta option.
Once view is created, you can generate the datasource.
Please check this option.
I think it should work...
Thanks
Vj

Similar Messages

  • Generic extractor question/problem

    Hello,
    I want to create a generic extractor on custom table which should delta enabled . This custom table has ERDAT( creation date) and ERZET u2013 Entry time but the client is asking me to use both fields for delta functionality . I am not sure how to do this . Please help .
    Regards,

    As you said client want you to use both the date n time stamp field to extract delta you can follow the below steps.
    - Create the generic data source as per you requirement in order to pic the delta
    - Open you extract structre and append the field TZNTSTMP, this is the field which holds the time stamp.
    - to setup deltas click on generic delta --> select time stamp(UTC)
    Regards
    KP

  • BW GENERIC EXTRACTION DELTA PROBLEM

    I have a problem for extracting delta from R/3 to BW.
    Init data is loaded from R/3 to BW system for ZST_ORDER datasource.
    Repair full request and selection parameter is created on date August 1st 2007 to August15th 2007.
    During the delta extraction - A lot of records around 500,000 records are getting extracting from R/3 to BW.
    R/3 side - There is only 5 entries available in AUFK table.
    It should extract delta only less than 35 entries.
    ZST_ORDER is generic datasource . Delta captured field is DATUM -New status changed record value 2.
    Advance Thx for your help. The code looks like
    FUNCTION ZST_ORDER.
    ""Local Interface:
    *" IMPORTING
    *" REFERENCE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
    *" REFERENCE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *" REFERENCE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE DEFAULT 1000
    *" REFERENCE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *" REFERENCE(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 ZST_ORDEROPTIONAL
    *" EXCEPTIONS
    *" NO_MORE_DATA
    *" ERROR_PASSED_TO_MESS_HANDLER
    TABLES: AUFK, "Order master data
    TJ02T, "System status texts
    TJ30T, "Texts for user status
    JSTO. "Status object information
    DATA DECLARATION
    DATA: L_DATE TYPE DATS,
    L_STATUS TYPE J_STATUS,
    L_LINES TYPE SY-TABIX,
    L_CHANGED(1) TYPE C.
    Auxiliary Selection criteria structure
    DATA: L_S_SELECT TYPE SRSC_S_SELECT.
    Another data objects
    Service Order Data
    DATA: BEGIN OF LT_AUFK OCCURS 0,
    AUFNR LIKE AUFK-AUFNR,
    AUART LIKE AUFK-AUART,
    ERDAT LIKE AUFK-ERDAT,
    AEDAT LIKE AUFK-AEDAT,
    STDAT LIKE AUFK-STDAT,
    AEZEIT LIKE AUFK-AEZEIT,
    ERFZEIT LIKE AUFK-ERFZEIT,
    IDAT1 LIKE AUFK-IDAT1,
    IDAT2 LIKE AUFK-IDAT2,
    IDAT3 LIKE AUFK-IDAT3,
    LOEKZ LIKE AUFK-LOEKZ,
    OBJNR LIKE AUFK-OBJNR,
    END OF LT_AUFK.
    Individual Object Status
    DATA: BEGIN OF LT_JEST OCCURS 0,
    OBJNR LIKE JEST-OBJNR,
    STAT LIKE JEST-STAT,
    INACT LIKE JEST-INACT,
    CHGNR LIKE JEST-CHGNR,
    END OF LT_JEST.
    ***Change Documents for System/User Statuses (Table JEST)
    DATA: BEGIN OF LT_JCDS OCCURS 0,
    OBJNR LIKE JCDS-OBJNR,
    STAT LIKE JCDS-STAT,
    CHGNR LIKE JCDS-CHGNR,
    USNAM LIKE JCDS-USNAM,
    UDATE LIKE JCDS-UDATE,
    UTIME LIKE JCDS-UTIME,
    INACT LIKE JCDS-INACT,
    CHIND LIKE JCDS-CHIND,
    END OF LT_JCDS.
    DATA: BEGIN OF LT_JSTO OCCURS 0,
    OBJNR LIKE JSTO-OBJNR,
    STSMA LIKE JSTO-STSMA,
    END OF LT_JSTO.
    STATIC FIELDS
    STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
    S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
    S_CURSOR TYPE CURSOR.
    User-defined Ranges
    RANGES: L_R_AUFNR FOR AUFK-AUFNR ,
    L_R_ERDAT FOR AUFK-ERDAT.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
    IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Check DataSource validity
    CASE I_DSOURCE.
    WHEN 'ZST_ORDER '.
    WHEN OTHERS.
    RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDCASE.
    Copy selection criteria for future extractor calls (fetch-calls)
    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.
    S_S_IF-INITFLAG = I_INITFLAG.
    APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
    ELSE.
    First data package -> OPEN CURSOR
    IF S_COUNTER_DATAPAKID = 0.
    LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT
    WHERE FIELDNM = 'AUFNR'.
    MOVE-CORRESPONDING L_S_SELECT TO L_R_AUFNR.
    APPEND L_R_AUFNR.
    ENDLOOP.
    LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT
    WHERE FIELDNM = 'ERDAT'.
    MOVE-CORRESPONDING L_S_SELECT TO L_R_ERDAT.
    APPEND L_R_ERDAT.
    ENDLOOP.
    LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT
    WHERE FIELDNM = 'DATUM'.
    L_DATE = L_S_SELECT-LOW.
    ENDLOOP.
    OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT AUFNR AUART ERDAT
    AEDAT OBJNR AEZEIT
    STDAT ERFZEIT IDAT1
    IDAT2 IDAT3 LOEKZ
    FROM AUFK
    WHERE AUFNR IN L_R_AUFNR AND
    ERDAT IN L_R_ERDAT.
    ENDIF.
    Fetch records into interface table LT_AUFK
    FETCH NEXT CURSOR S_CURSOR
    APPENDING CORRESPONDING FIELDS OF TABLE LT_AUFK
    PACKAGE SIZE S_S_IF-MAXSIZE.
    IF SY-SUBRC <> 0.
    CLOSE CURSOR S_CURSOR.
    RAISE NO_MORE_DATA.
    ENDIF.
    Determining the number of lines of the table LT_AUFK .
    L_LINES = LINES( LT_AUFK ).
    IF L_LINES IS NOT INITIAL.
    Sort the internal table LT_AUFK
    SORT LT_AUFK BY OBJNR ASCENDING.
    Selecting the records from JCDS depending upon the entries in LT_AUFK.
    SELECT OBJNR STAT CHGNR USNAM
    UDATE UTIME INACT CHIND
    INTO TABLE LT_JCDS
    FROM JCDS
    FOR ALL ENTRIES IN LT_AUFK
    WHERE OBJNR EQ LT_AUFK-OBJNR
    AND ( CHGNR EQ '001'
    OR UDATE >= L_DATE ).
    Sort the internal table lt_jcds.
    SORT LT_JCDS BY OBJNR STAT CHGNR ASCENDING.
    Select records from table JEST depending upon the entries in LT_AUFK.
    SELECT OBJNR STAT INACT CHGNR
    INTO TABLE LT_JEST
    FROM JEST
    FOR ALL ENTRIES IN LT_AUFK
    WHERE OBJNR = LT_AUFK-OBJNR.
    SELECT OBJNR STSMA
    INTO TABLE LT_JSTO
    FROM JSTO
    FOR ALL ENTRIES IN LT_AUFK
    WHERE OBJNR = LT_AUFK-OBJNR.
    SORT LT_JSTO BY OBJNR.
    ENDIF.
    LOOP AT LT_JEST.
    CLEAR: LT_AUFK,
    l_changed.
    CLEAR L_CHANGED.
    CLEAR LT_JSTO.
    READ TABLE LT_JSTO WITH KEY OBJNR = LT_JEST-OBJNR BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    E_T_DATA-STSMA = LT_JSTO-STSMA.
    ENDIF.
    *End**
    Read the data from LT_AUFK.
    READ TABLE LT_AUFK WITH KEY OBJNR = LT_JEST-OBJNR BINARY SEARCH.
    E_T_DATA-AUFNR = LT_AUFK-AUFNR.
    E_T_DATA-AUART = LT_AUFK-AUART.
    E_T_DATA-ERDAT = LT_AUFK-ERDAT.
    E_T_DATA-AEDAT = LT_AUFK-AEDAT.
    E_T_DATA-AEZEIT = LT_AUFK-AEZEIT.
    E_T_DATA-ERFZEIT = LT_AUFK-ERFZEIT.
    E_T_DATA-IDAT1 = LT_AUFK-IDAT1.
    E_T_DATA-IDAT2 = LT_AUFK-IDAT2.
    E_T_DATA-IDAT3 = LT_AUFK-IDAT3.
    E_T_DATA-LOEKZ = LT_AUFK-LOEKZ.
    E_T_DATA-INACT = LT_JEST-INACT.
    E_T_DATA-CHGNR = LT_JCDS-CHGNR.
    e_t_data-datum = lt_aufk-erdat.
    READ TABLE LT_JCDS WITH KEY OBJNR = LT_JEST-OBJNR
    STAT = LT_JEST-STAT
    CHGNR = '001'
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    E_T_DATA-UDATE = LT_JCDS-UDATE.
    E_T_DATA-AEDAT = LT_JCDS-UDATE.
    E_T_DATA-UTIME = LT_JCDS-UTIME.
    E_T_DATA-AEZEIT = LT_JCDS-UTIME.
    E_T_DATA-CHIND = LT_JCDS-CHIND.
    E_T_DATA-USNAM = LT_JCDS-USNAM.
    e_t_data-chgnr = lt_jcds-chgnr.
    IF LT_JCDS-UDATE GE L_DATE
    AND L_DATE IS NOT INITIAL.
    L_CHANGED = 'X'.
    ENDIF.
    IF LT_JEST-CHGNR NE '001'.
    CLEAR LT_JCDS.
    READ TABLE LT_JCDS WITH KEY OBJNR = LT_JEST-OBJNR
    STAT = LT_JEST-STAT
    CHGNR = LT_JEST-CHGNR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    L_CHANGED = 'X'.
    E_T_DATA-AEDAT = LT_JCDS-UDATE.
    E_T_DATA-AEZEIT = LT_JCDS-UTIME.
    E_T_DATA-CHIND = LT_JCDS-CHIND.
    E_T_DATA-USNAM = LT_JCDS-USNAM.
    e_t_data-chgnr = lt_jcds-chgnr.
    ENDIF.
    ENDIF.
    IF LT_JEST-STAT(1) EQ 'I'.
    E_T_DATA-ISTAT = LT_JEST-STAT.
    ELSEIF LT_JEST-STAT(1) EQ 'E'.
    E_T_DATA-ESTAT = LT_JEST-STAT.
    ENDIF.
    IF L_CHANGED EQ 'X'
    AND L_DATE IS NOT INITIAL.
    APPEND E_T_DATA.
    ELSEIF L_DATE IS INITIAL.
    APPEND E_T_DATA.
    ENDIF.
    ENDIF.
    CLEAR: LT_AUFK,
    E_T_DATA.
    ENDLOOP.
    CLEAR LT_JEST.
    REFRESH LT_JEST.
    next data package
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    ENDIF. "Initialization mode or data extraction ?
    ENDFUNCTION.

    hi,
    for that quantity SALK3 is referring a different table in the reference field for your table fields. check that field and refer the correct table for that field in table view.
    table join has a problem in that. i think your joined some other table with that field. replace the field assignment or create a new view.
    hope this help you
    regards
    harikrishna N

  • How to reduce long extraction time - Generic extractor based on view

    Hello. The previous thread about this error was closed without any answer.
    I'm in the same configuration.
    "Using a generic extractor (Delta enabled on confirmation date) based on view to load data from ECC6 to BI.
    Now my issue is that the delta extraction is running for a long time (around 1 hr) even if the data volume is very small
    While checking the job overview in source system i saw that the job is hanging at the below step for almost 1 hr."
    1 LUWs confirmed and 1 LUWs to be deleted with function module MF RSC2_QOUT_CONFIRM_DATA.
    I am not understanding why this is happening.
    Here is the log of the job:
    30.05.2011 03:58:11 Job started
    30.05.2011 03:58:11 Step 001 started (program SBIE0001, variant &0000000166864, user ID ALEREMOTE)
    30.05.2011 03:58:11 Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
    30.05.2011 03:58:11 DATASOURCE = 0CO_OM_WBS_6
    30.05.2011 03:58:11 *************************************************************************
    30.05.2011 03:58:11 *          Current Values for Selected Profile Parameters               *
    30.05.2011 03:58:11 *************************************************************************
    30.05.2011 03:58:11 * abap/heap_area_nondia......... 4000000000                              *
    30.05.2011 03:58:11 * abap/heap_area_total.......... 8000000000                              *
    30.05.2011 03:58:11 * abap/heaplimit................ 100000000                               *
    30.05.2011 03:58:11 * zcsa/installed_languages...... DEFS                                    *
    30.05.2011 03:58:11 * zcsa/system_language.......... E                                       *
    30.05.2011 03:58:11 * ztta/max_memreq_MB............ 2047                                    *
    30.05.2011 03:58:11 * ztta/roll_area................ 6500000                                 *
    30.05.2011 03:58:11 * ztta/roll_extension........... 2000000000                              *
    30.05.2011 03:58:11 *************************************************************************
    30.05.2011 03:58:11 1 LUWs confirmed and 1 LUWs to be deleted with function module RSC2_QOUT_CONFIRM_DATA
    30.05.2011 05:02:53 Call customer enhancement BW_BTE_CALL_BW204010_E (BTE) with 171 records
    30.05.2011 05:02:53 Result of customer enhancement: 171 records
    30.05.2011 05:02:53 Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 171 records
    30.05.2011 05:02:53 Result of customer enhancement: 171 records
    30.05.2011 05:02:53 Asynchronous send of data package 1 in task 0002 (1 parallel tasks)
    30.05.2011 05:02:53 IDOC: Info IDoc 2, IDoc No. 4667050, Duration 00:00:00
    30.05.2011 05:02:53 IDoc: Start = 30.05.2011 03:58:11, End = 30.05.2011 03:58:11
    30.05.2011 05:02:53 tRFC: Data Package = 1, TID = AC11082D38B44DE308DD028A, Duration = 00:00:00, ARFCSTATE = RECORDED
    30.05.2011 05:02:53 tRFC: Start = 30.05.2011 05:02:53, End = 30.05.2011 05:02:53
    30.05.2011 05:02:53 Altogether, 0 records were filtered out through selection conditions
    30.05.2011 05:02:53 Asynchronous transmission of info IDoc 3 in task 0003 (0 parallel tasks)
    30.05.2011 05:02:53 IDOC: Info IDoc 3, IDoc No. 4667051, Duration 00:00:00
    30.05.2011 05:02:53 IDoc: Start = 30.05.2011 05:02:53, End = 30.05.2011 05:02:53
    30.05.2011 05:02:53 Synchronized transmission of info IDoc 4 (0 parallel tasks)
    30.05.2011 05:02:53 IDOC: Info IDoc 4, IDoc No. 4667052, Duration 00:00:00
    30.05.2011 05:02:53 IDoc: Start = 30.05.2011 05:02:53, End = 30.05.2011 05:02:53
    30.05.2011 05:02:53 Job finished
    Thanks for your help.
    Yann

    Parth Kulkarni,
    following the note and the other thread, I've check the index 4 of the table COEP.
    Here is what I got:
    Index ID           COEP             - 4
    Short text         MANDT/TIMESTMP/OBJNR, Index for Delta read method (CO-PA)
    Last changed       SAP             04.01.2010
    Status             Active          Saved
                       Does not exist in the database
    DB index nme
        Not defined as DB index in the ABAP Dictionary
    Is the fact that it doesn't exist in the database a problem ?
    Is the fact that it is active is good enough ?
    By the way thanks for your speedy reply !
    Yann
    Edited by: Yann GOFFIN on May 30, 2011 1:35 PM

  • Delta loading through Generic extractor - function module not found

    Hi,
    I'm working on a BW3.5 system and we have some generic delta FM extractors. One of these is called ZBW_CONF_DELTA and the FM is also called ZBW_CONF_DELTA. It is a delta-enabled extractor. Whenever an extraction is done in the init delta mode, the data gets picked up from SAP.
    However, whenever we load subsequent deltas, the extractor brings zero records. When I look in the SM37 logs in R/3, it says "Function module /BIC/QIZBW_CONF_DELTA0001 does not exist"
    I'm not sure where the "/BIC/QIZBW_CONF_DELTA0001" function module name came from, because I haven't given it like that (if I did, the init load would also have failed).
    Due to this problem, I'm unable to perform any delta loads. Is there anything I could be doing to fix this?
    Regards

    Hi,
    First check how extractor works in R/3 side using RSA3
    Make a full load.
    Now check the generic delta field of your generic extractor, lets say changed on date.
    Do the SAP transaction ( take help from some Functional COnsultant ) to update that delta field. Note that record.
    Now if u do the delta load with same extractor, you are suppose to get that record.
    If not then there is some problem with FM or extracor.
    Let me know what happens.
    Thank-You.
    Regards,
    Vinod

  • Delta fo Generic extractor using function module

    Hi,
    I am using the following function module for generic extractor but its always showing me extraction error.Could anyone please suggest to resolve the issue.
    Thanks in advance fo rsuggestion.
    FUNCTION Z_BW_SALESDATA_EXTRACT_CHNG2.
    ""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 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
      TABLES: VBFA,VBRK,tadir.
    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.
    user defined variables.
      DATA : X_UPDMODE(1) Type c,        " Update Type
            X_LastUpdate Like Sy-Datum. " Last Update Date
             X_LastUpdate TYPE RODELTAID. " Last Update Date   "TCS_KAP
    Select ranges
      RANGES: L_R_VBELN   FOR VBAK-VBELN,
              L_R_AUDAT   FOR VBAK-AUDAT.
    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 'Z_BW_SDDATA_CREATEON'.
          WHEN 'Y'.
          WHEN 'Z'.
          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 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
       READ TABLE i_t_select INTO l_s_select WITH KEY fieldnm = 'VBELN'.
       IF sy-subrc <> 0.
         IF 1 = 2. MESSAGE e010(r3). ENDIF.
         log_write 'E'                    "message type
                   'R3'                   "message class
                   '010'                  "message number
                   'PGMID'                "message variable 1
                   ' '.                   "message variable 2
         RAISE error_passed_to_mess_handler.
       ENDIF.
       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.
    Store Update mode in static variable...
       X_UPDMODE = I_UPDMODE.
        Select Single DELTAID
               Into   X_LastUpdate
               From   ROOSGENDLM
               Where  OLTPSOURCE = 'Z_BW_SDDATA_CREATEON'.
        If X_LastUpdate Is Initial.
          X_LastUpdate = '19800101'. " The oldest..., this should not happen
        Endif.
    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
    X_UPDMODE = I_UPDMODE.
    First data package -> OPEN CURSOR
        IF g_counter_datapakid = 0.
    Fill range tables for fixed InfoSources. In the case of generated
    InfoSources, the usage of a dynamical SELECT statement might be
    more reasonable. BIW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
          LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'VBELN'.
            MOVE-CORRESPONDING l_s_select TO L_R_VBELN.
            APPEND L_R_VBELN.
          ENDLOOP.
          LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'AUDAT'.
            MOVE-CORRESPONDING l_s_select TO L_R_AUDAT.
            APPEND L_R_AUDAT.
          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 InfoSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
    *added by Yogesh
          DELETE FROM ZBWSALEDATA.
    *ended by Yogesh
          l_maxsize = g_s_interface-maxsize.
    Check for supported update mode
          CASE X_UPDMODE.
            WHEN 'F' Or 'I'. " Full or Init
    **get sales orders
              SELECT *
                           INTO CORRESPONDING FIELDS OF TABLE I_SALESDATA
                           FROM VBAK AS K
                           INNER JOIN VBAP AS P
                                 ON  PVBELN = KVBELN
                           WHERE K~VBELN IN L_R_VBELN
                           AND   K~AUDAT IN L_R_AUDAT
                           AND   K~VBTYP = 'C'.
              IF I_SALESDATA[] IS NOT INITIAL.
                PERFORM F_GET_DATA.                   "get data
                PERFORM F_DEL_VATCOND.                "delete vat conditions
                PERFORM F_GET_TAR_COSTUNIT.           "get tariff cost unit
                PERFORM F_GET_NETVAL TABLES IT_VBDPA1. "get net val of the item
                PERFORM F_GET_SALESDATA.
    *write perform with name F_INSERT_DB_ZBWSALEDATA.
                PERFORM F_INSERT_DB_ZBWSALEDATA.      "insert into table ZBWSALESDATA
               LOOP AT I_SALESDATA WHERE NETPR = 0.
                 MOVE-CORRESPONDING I_SALESDATA TO I_SALESDATA_FIN.
                 APPEND I_SALESDATA_FIN.
               ENDLOOP.
               SORT I_SALESDATA_FIN BY VBELN POSNR KSCHL.
               DELETE ADJACENT DUPLICATES FROM I_SALESDATA_FIN
                                               COMPARING VBELN POSNR
                                                         KSCHL.
               INSERT ZBWSALEDATA FROM TABLE I_SALESDATA_FIN.
              ENDIF.
            WHEN 'D'. " Delta
              SELECT *
                             INTO CORRESPONDING FIELDS OF TABLE I_SALESDATA
                             FROM VBAK AS K
                             INNER JOIN VBAP AS P
                                   ON  PVBELN = KVBELN
                            WHERE K~ERDAT >= X_LastUpdate
                             WHERE K~ERDAT >= X_LastUpdate+0(8)          "TCS_KAP
                             AND   K~VBTYP = 'C'.
              IF I_SALESDATA[] IS NOT INITIAL.
                PERFORM F_GET_DATA.                   "get data
                PERFORM F_DEL_VATCOND.                "delete vat conditions
                PERFORM F_GET_TAR_COSTUNIT.           "get tariff cost unit
                PERFORM F_GET_NETVAL TABLES IT_VBDPA1. "get net val of the item
                PERFORM F_GET_SALESDATA.
    *write perform with name F_INSERT_DB_ZBWSALEDATA.
                PERFORM F_INSERT_DB_ZBWSALEDATA.      "insert into table ZBWSALESDATA
               LOOP AT I_SALESDATA WHERE NETPR = 0.
                 MOVE-CORRESPONDING I_SALESDATA TO I_SALESDATA_FIN.
                 APPEND I_SALESDATA_FIN.
               ENDLOOP.
               SORT I_SALESDATA_FIN BY VBELN POSNR KSCHL.
               DELETE ADJACENT DUPLICATES FROM I_SALESDATA_FIN
                                               COMPARING VBELN POSNR
                                                         KSCHL.
               INSERT ZBWSALEDATA FROM TABLE I_SALESDATA_FIN.
              ENDIF.
            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.
    **end get sales orders
          OPEN CURSOR WITH HOLD g_cursor FOR
          SELECT (g_t_fields) FROM ZBWSALEDATA.
         WHERE pgmid  IN l_r_pgmid AND
                                        object IN l_r_object.
        ENDIF.                             "First data package ?
    Fetch records into interface table. There are two different options:
    - fixed interface table structure for fixed InfoSources have to be
      named E_T_'Name of assigned source structure in table ROIS'.
    - for generating applications like LIS and CO-PA, the generic table
      E_T_DATA has to be used.
    Only one of these interface types should be implemented in one API !
        FETCH NEXT CURSOR g_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE l_maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR g_cursor.
          RAISE no_more_data.
        ENDIF.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    Best regards,
    Yogesh

    Dear Yogesh,
    Try to debug the code by putting a break point at select statement...is the FM Syntactically correct ??
    Check the Select statements..if all fields are not required avoid using Select * , and use always for all entries rather than JOINS..
    Note : For Joins you have to specify the Fields in the Select...Dont use Select * ....
    Hope it helps..
    Thanks,
    Krish

  • How to use 2 date field as delta control in generic extractor.

    Hi colleagues:
    I have developed a generic extractor to extract logistic data: Purchase Orders and Invoice. In order to do that, I have defined a view joining EKBE, EKKO, EKPO, EKET tables on R/3. By this approach, the delta mechanism is supposed to be controlled by the EKBE-BUDAT field and also by the EKPO-AEDAT field. Both fields are available on the view used to create the Datasource. However, the Datasource creation allows us to define just one field as delta control.
    I have a few questions regarding to this scenario:
    <b>1 - Is it possible to define 2 fields as delta control field on Generic Datasource?</b>
    <b>2 - How about creating two similar Datasouces, one having AEDAT as delta control, the other having BUDAT as delta control, and then connect those Datasources to an unique Infosource on the bw side?</b>
    Best regards
    Waldemar

    hi,
    1 - as far as I know it is not possible to define 2 fields
    2 - this workaround is used often in cases like yours.
    Just remember about order of extracting: first you extract new documents then changed
    Regards,
    Andrzej

  • Deltas in generic extractor

    I am trying to have more then one field in my generic extractor as a delta and so far i can only set one field as delta in my generic extractor....can someone help me in setting more than one field as a delta in my custom generic extractor ????

    The last delta performed will be stored in the ROOSGENDLM table....
    Use this value and then fetch the delta pointers you need..
    Here is how I would do it...
    In the FM :
    Look up value of DELTAID from table ROOSGENDLM for your datasource - this will give details of the last delta performed..
    Then use this value and search for the actual delta pointers in your custom table - then perform your delta logic within the FM...
    P.S The entry in ROOSGENDLM will come only after you init the datasource...

  • Delta in generic extractor.

    Hi Everyone,
    I have created one of the generic extractor on a table and the other one on a view. While selecting the GENERIC DELTA, I let the numeric pointer selection checked.
    Now, my question is will it allow me to do delta load in my cube using this extractor?
    2nd question is how?
    3rd question is if not then what is the change that I need to make so that it allows me to load the delta load. How this changes need to be made can you please explain step by step. thanks in advance.
    My issue arose after loading the data when I went to change the InfoPackage to load the delta part, I realised in my InfoPackage I do not have the choice to load delta. How do I settle this. Actually this is an inventory cube where the data is loaded at the end of each month and now when I wanted to test it for today's month I realised that I do not have the choice to load delta for inventory load.
    Please explain. Thank you once again in advance.

    <u>1. my question is will it allow me to do delta load in my cube using this extractor?</u>
         Yes... you build Generic Extractor with Delta based on Numeric Pointer. Material Documents is the Perfect Example for that (We can't Sales Document or Purchase Document for this).
    <u>2. 2nd question is how?</u>
         Simple enable Material Document Number Fileds for Numeric Pointer (Select Numeric Pointer... provide Mat. Document No. field i.e. MBLNR).
    <u>3rd question is if not then what is the change that I need to make so that it allows me to load the delta load. How this changes need to be made can you please explain step by step. thanks in advance.</u>
    you need to create Material Documents in SAP R/3. If you build your Extractor on MSEG Table. You need to create any Material Document which populates in MSEG.
    I don't remember wht exactly option we will get in Infopackage for Numeric Pointer. To my knowledge, it should give Delta only in Update Tab page.
    Hope this helps.
    Nagesh Ganisetti.
    Assign points if it helps.

  • Error in delta generic extractor

    I made a generic extractor using a Module Function. And I used the RSVD_BW_GET_DELTA_DATA function, as an example to implement the Delta process for my own generic extractor.
    Although when I executed the Delta process in the RSA3 transaction,  the program did not use the function I made, but used the RSC1_DELTA_BIW_GET function! So the delta process did not extract any data.
    I also modified EXMETHOD field from the ROOSOURCE table:
    I changed the status from F2 to F1.
    Could you explain me how the delta process works in a Generic Extractor?
    Is any special configuration that I missed?
    Thanks for your cooperation and regards.

    Hi Sirneni,
            Is your Init load in BW successfull. Only after
    successfull completion of init load in BW  the data source appears in delta queue RSA7 in R/3. Also check whether any materials are being changed in R/3 because u r delta is based on  last changed date.
    Regards,
    Prakash B

  • How to do Delta upload using Generic Extractor built on Function Module?

    Hello Guys,
    I have never created a Generic Extractor using a Function Module. I wanted to know how can we support Delta mechanism if we create Generic extractor using Function Module.
    Regards,
    Abhishek

    Hi Abishek,
    Please check the standard Function Module RSAX_BIW_GET_DATA for your delta mechnism.
    Hope it will help you.
    Thanks,
    Chandra

  • 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

  • Delta update  for generic extractor ?? Urgent!!!!

    Hi All
    In my project I am pulling data from 4 R/3 tables... I have created view & then Generic DataSource.
    Can a delta update be set-up for the generic extractor based on adds/changes to the R/3  tables?
    Thanks & Regards,
    Sheetal
    Message was edited by:
            Sheetal Dhore

    Hi,
    Please take a look at the following doc.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Regards,
    ®

  • Generic extractors with delta

    hi all,
    can any one please provide any thing on generic extractors particular to delta (time-stamp)
    VRKR

    Hi,
    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

  • Generic extractor is not reading delta

    Hi !
    I have a generic extractor with delta queue, for a Z view.
    The delta is on 'ZLOAD_DATE' field / calendar day /safety interval upper limit = 1 / new status for changed records
    In BI the init with data is ok.
    In ECC the delta queue (RSA7) show as actual status: 03 June 2010
    then, I  add 3 new records
    ZMAT    ZLOAD_DATE
    x            01 June 2010
    x            02 June 2010
    x            03 June 2010
    But when I run again the delta load in BI, dont load any records..  (0 records readed)
    > What is wrong?
    Thanks in advance!

    Hi Prem
    The new record were created after the init (the same day), but specify manually in the ZLOAD_DATE several dates (diferent from the real load date, today)
    1 - If I load records today and after run a delta,  can I see they in BI or I need wait until tomorrow?
    2 - if the upper limit is regarding the actual date, which is the meaning of specify a delta key field?
    3 - if I want a delta with the same behaivour than standard delta, do I need add the field timestamp to the table, and change the extractor?
    Thanks for your support!

Maybe you are looking for