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

Similar Messages

  • Generic Extraction Delta Loads

    Hi Experts,
    I am facing problem is I want to extract the data in Generic Extraction in View, Suppose my requirement is I want to delta loads every 1 hour per day, how can i do, Generic Extraction possible are not delta records.
    Note:- LO Extraction is possible like we have update mode we can scheduled hours in everyday, But Generice Extraction possible are not.
    Please provide me solutions ASAP.
    Thanks in Advance......
    Regards,
    Bharathi.

    There are various delta method
    1.calday.
    2.time stamp.
    3.Numeric pointer.
    For youe requirement Time stamp will work.
    Please check weather you have any field related to time.
    Thanks,
    Saveen kumar

  • Reagrding Generic Extraction Delta

    hai
    Can anyone explain in detail with example or reak time scenarios about "Generic delta extraction for '0calday'" , "Generic Delta extraction for Numaric Pointer" , "Generic Delta extraction for timestamp" individually ..
    Please also send some documents or forums or weblog or screen shots to [email protected] now
    Thanks
    Bye
    mohammed

    Dear shylaja,
    can you please send the documents related to generic extraction to [email protected] &/  to [email protected] ?
    hope you will help.
    Waiting for your reply.
    Regards
    Vinay

  • Generic Extraction & delta

    Hi Experts,
    Can anyone tell me regarding the generic extraction and how delta happens in this case.
    regards,
    MGR

    MGR,
    Please find the below links for more better understanding about the generic delta and extraction:
    Business Content and Extractors
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    ****Assign Points*********
    Gattu

  • HI could you pls explaing  generic extraction delta mechanism

    I  know what is delta . but i couldnt differentiate when we go for time stamp and numeric pointer
    i have the document for how to generic delta but inthat it is mentioned about how to use . but i want to know when shoudl i use time stamp and numeric pointer
    all answers would be rewarde

    Hi Dolly,
    Here the changed records can be isentified by :
    1. Based on the date of creation or last change ( Delta based on 0Calday)
    2. Based on the record number ( Numeric Pointer )
    3. Based on time of change ( Timestamp)
    real time examples would be
    1. Master Record creation like customer ID creation
    2. Timesheets in SAP PS
    3. Invoive details / Sales Order Details.
      Here is a weblog from Siggi for Generic Delta Extraction with Function Module.
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Check previous posts as well.
    Generic delta
    Data Warehousing
    regards
    @jay

  • 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

  • Generic extraction - Delta Update

    I am creating a generic extractor to extract PM confirmations data from AFRU table. I need to make it delta enable. how do I decide which field to use for delta relevant check? any ideas?

    Hi,
    Take a look at the blog below.It is telling very well delta concept in BW.Also check how to guide.
    /people/swapna.gollakota/blog/2007/12/27/how-does-a-datasource-communicates-delta-with-bw
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Regards.

  • GENERIC EXTRACTION DELTA SETTINGS

    HI Everyone,
                        I need to know how we set up Generic Delta in the following scenarios.
    1) When we have a Generic Extractor based on a View and this View has multiple table(For Example 2 Tables to start with).
    Then how wil you have the Generic Delta based on which field from which table? FOr example Table 1 has Header Data and Table2 has Item  Data.Our Functional  Consultant says Header can change or Item data can change.So we need to pick  up the record based on the change in each of the tables. For Example , there is a field called CHANGED DATE(AENDT) which is present in both the tables. Now , in the view if I add AENDT from Table1, then Table1's chnages will only be updated i guess. What if the change occurs in TABLE2 (ITEM).
    I dont know how to go about this. The solution is I created two Generic Extractors with two views (The only difference between the views is AENDT field coming from TABLE1 in the first extractor and AENDT field coming from  TABEL2 in the second Extractor).But I think  this  is not the best way and there must be an alternative for this
    2) The other issue is If I have a Function Module which Brings data from Multiple Tables, then how to select the field on which Delta is set.Do we need to write some Logic. After writing the logic, can we directly set the Generic Delta in RSO2 or is there any other way to do it.
    Regards,
    Samir

    Hi Samir,
    We too had a simliar requirement. In your case you can create a FM generic datasource on top of the view. The view in your case will get the intersection of the Header and Item level data.  the main challenge was to get the delta records as we can have both Orders created and changed , and in Delta can be maintained on only one field.
    To overcome this issue in the FM coding, Steps:
    create Generic datasource, with Delta on changed on date (AENDT)
    So during extraction you get the date on which the last Load was succesfully completed using the (AENDT).
    So in the selection part use the statement similar to this:
          select * from vbap into table  it_order where
                                 ( erdat  in l_r_erdat or aedat in l_r_zaedat ) and
                                 ( erdat in l_r_aedat or aedat in l_r_aedat )
    Sample generic datasource for your reference:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/403b299b-94e5-2c10-a3b4-e2cecb8ee869?quicklink=index&overridelayout=true
    Hope this helps.
    Regards,
    Umesh.

  • Deltas in generic extraction

    how can we set delta updates in generic extraction?can any one help in this

    Hi Praveen,
    Please do check the link for step by step for generic extraction
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    check the following
    http://help.sap.com/bp_biv235/BI_EN/html/bw.htm
    business content
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20co-pa%20extraction%203.0x
    https://websmp203.sap-ag.de/co
    http://help.sap.com/saphelp_nw04/helpdata/en/37/5fb13cd0500255e10000000a114084/frameset.htm
    (navigate with expand left nodes)
    Check these links:
    /people/sap.user72/blog/2004/12/16/logistic-cockpit-delta-mechanism--episode-one-v3-update-the-145serializer146
    /people/sap.user72/blog/2004/12/23/logistic-cockpit-delta-mechanism--episode-two-v3-update-when-some-problems-can-occur
    /people/sap.user72/blog/2005/01/19/logistic-cockpit-delta-mechanism--episode-three-the-new-update-methods
    /people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it
    /people/sap.user72/blog/2005/04/19/logistic-cockpit-a-new-deal-overshadowed-by-the-old-fashioned-lis
    <b>For Generic:</b>
    >Go to Tcode : RSO2,
    >There give the name of data source which you want to create like transaction data source or master data attribue or Text data source.
    >enter
    >again in the next screen you need to give application like SD or MM etc
    >in the same screen need to select table/view or infosetquery or function module. these are different ways of creating data sources.
    >Give the name for the same like if u r creating data source on table give the name of table.
    >click on Generic delta which will there in application tool bar and fill the required columns in that screen like type of delta and all
    >continue and save
    >it will give all the fieds
    >enable the check boxes based on your requirement like selection or hide or field only..
    >save
    Hope This Helps.
    Regards,
    Ravikanth

  • Urgent: Problems in Generic Extraction by Function Module

    Hi BW Gurus,
    I am new to SDN and also new to generic extraction using function module. My requirement is to extract long text(142 char) from CRM to BW as the text is not stored in database table I used function module read_text with in another ZXXX function module copy of (RSAX_BIW_GET_DATA_SIMPLE). In my extract structure I used GUID(char,32), Langu, long text(142 char) and 2 placeholders. Text can be extracted by passing STXH table fields(Tdname, Tdid, Tdobject, Tdspars) to read_text as parameters and i also need to use CRMD_ORDERADM_H field GUID(32 char) to compare 1st 32 chars of tdname(70 char) with Guid to select Guids and loop thru this Guids and for each Guid i need to append lines of text to e_t_data but as i donot know ABAP i unable to write the code for this. Through my friends help i wrote code when i check in RSA3 it is displaying the text but when i replicate into BW and load into data target in monitor the status is red with records initially but afterwards it will be red status again with 0 from 0 records for initial load again.when i check on job logs the errors i have are:
    The background job has created a job log file of 2Gb size and it is currently on a infinite loop writing entries into the SAP System Log that it cannot write to the Job log file due to “Error 22 for write/read access to a file” this is because of the datasource i have created. Please find my Function module and if anyone would please correct FM and send me that will be really great.I appreciate it in advance.
    MY Function Module is:
    FUNCTION Z_CRMORDERH_STR_TXT.
    ""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  YCRM_TEXT_STR OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    ***"  EXCEPTIONS     NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
      Tables: CRMD_ORDERADM_H, STXH.
    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.
    data: i_crmtext type standard table of TLINE .
      types: begin of xsreph ,
              GUID type CRMD_ORDERADM_H-guid,
            end of xsreph.
       data: i_guid type standard table of xsreph.
      data: I_TEXT type STXH-TDNAME.
      data: xempl like  YCRM_TEXT_STR occurs 0 with header line.
      data: t_tab like dd03l-tabname.
    Select ranges
      ranges: l_r_guid for CRMD_ORDERADM_H-guid.
             l_r_connid  for sflight-connid.
    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 'yCRM_TEXT'.  " for S_SREPH1
          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.
    we will do our selection based on what is in the p table for the
    infoobject
      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.
    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 = 'GUID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_GUID.
            APPEND L_R_GUID.
          ENDLOOP.
          case i_dsource.
            when 'YCRM_TEXT'.  " for S_SREPH1
              t_tab = 'CRMD_ORDERADM_H'.
          endcase.
          select GUID
          from (t_tab)
          into table i_guid where   PROCESS_TYPE = 'ZACI'  and ( OBJECT_ID < '0000000042').
         select tdname from stxh into i_text where tdobject = 'TEXT'.
         if sy-subrc ne 0.
           message e009(r3).
    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
                     'No master data found'.           "message variable 2
           raise error_passed_to_mess_handler.
         endif.
    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.
         open cursor with hold s_cursor for
         select (s_s_if-t_fields) from CRMD_ORDERADM_H
                                  where GUID in L_R_GUID .
                                   ENDIF.
    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.
    as we are doing this only once can use the select statement.
    ***data: crmtext like tline occurs 0 with header line.
    **data: i_crmtext type standard table of TLINE.
    **data: i_guid type standard table of xsreph.
    data: l_guid type THEAD-TDNAME.
    data: st_guid type xsreph.
    data: st_crmtext type TLINE.
    data: lan type THEAD-TDSPRAS.
    lan = 'E'.
    loop at i_guid into st_guid.
    l_guid = st_guid-guid.
    CALL FUNCTION 'READ_TEXT'
       EXPORTING
       CLIENT                        = SY-MANDT
         ID                            = 'A002'
         LANGUAGE                      = lan
         NAME                          = l_guid
         OBJECT                        = 'CRM_ORDERH'
       ARCHIVE_HANDLE                = 0
       LOCAL_CAT                     = ' '
    IMPORTING
       HEADER                        =
       TABLES
         LINES                         = i_crmtext.
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8
    e_t_data-guid = l_guid.
    loop at i_crmtext into st_crmtext.
    move lan to e_t_data-langu.
    move st_crmtext-tdline to e_t_data-description.
    append e_t_data.
    endif.
    endloop.
    clear: st_guid,l_guid.
    refresh: i_crmtext.
    endloop.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    endif.
    ENDFUNCTION.
    please Gurus as I donot know ABAP i appreciate if anyone would write a FM based on requirement and send me that will be really great this is my request. I gurantee of award points for good answers.
    Regards
    Kishore

    Hi,
    The statement <b>RAISE NO_MORE_DATA</b> should be active (uncommented) in your code. Otherwise, the infinte loop occurs.
    See also, the Siggi's blog:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    BTW, was it your thread here:
    Re: Urgent: problems in extracting Long Text
    Best regards,
    Eugene

  • Generic delta problem

    Hi all,
    If suppose we don,t have delta facility in generic extraction on R/3 for Master Data. how can we maintain the delta for that one in BW.
    Thanks & Regards,
    Sri

    hi Sri,
    suppose we don't ...
    i think you can try flexible update for master data and via ods, create ods with same structure and key as the master data, create infosource for the ods, upload data to the ods.
    and set the master data as 'infoprovider', create update rules assign from the ods. so the 'delta' is handled by ods. hope this helps.

  • Where to find deltas in generic extraction

    hi experts,
    could you please explain me tcodes which are used to find the delta data while we go for generic extraction. Also can anyone explain me the full process of extracting the data using  
    infoset query and function module.
    Cheers,
    Pragya.

    Hi
    You can define delta's in generic using " calendr day, numeric pointer, time stamp."
    Generic Delta
    If a field exists in the extract structure of a DataSource that contains values which increase monotonously over time, you can define delta capability for this DataSource. If such a delta-relevant field exists in the extract structure, such as a timestamp, the system determines the data volume transferred in the delta method by comparing the maximum value transferred with the last load with the amount of data that has since entered the system.  Only the data that has newly arrived is transferred.
    To get the delta, generic delta management translates the update mode into a selection criterion. The selection of the request is enhanced with an interval for the delta-relevant field. The lower limit of the interval is known from the previous extraction. The upper limit is taken from the current value, such as the timestamp or the time of extraction. You can use security intervals to ensure that all data is taken into consideration in the extractions. After the data request was transferred to the extractor, and the data was extracted, the extractor then informs generic delta management that the pointer can be set to the upper limit of the previously returned interval.
    The delta for generic DataSources cannot be used with a BW system release prior to 3.0. In older SAP BW releases, the system does not replicate DataSources for master data and texts that were made delta-enabled using the delta for generic DataSources.
    Determining the Generic Delta for a DataSource
           1.      Choose Generic Delta.
           2.      In the subsequent dialog box, specify the delta-determining field and the type for this field.
           3.      Maintain the settings for the generic delta:
                                a.      Specify a security interval.
    The purpose of a security interval is to make the system take into consideration records that appear during the extraction process but which remain unextracted (since they have yet to be saved) during the next extraction.
    You have the option of adding a security interval to the upper limit/lower limit of the interval.
    A security interval should only be specified for the lower limit when the delta method results in a new status for changed records, in other words, when the status is overwritten in BW. In this case, duplicate data records that could arise in such a safety interval have no affect on BW.
                                b.      Choose the delta type for the data to be extracted.
    The delta type is used to determine how extracted data is interpreted in BW and which data targets in which it can be posted.
    With the delta type additive delta, the record to be loaded for summarizable key figures only returns the change to the key figure. The extracted data is added in BW. DataSources with this delta type can supply both ODS objects and InfoCubes with data.
    With the delta type New Status for Changed Records, every record to be loaded returns the new status for all key figures and characteristics. The values are overwritten in BW. DataSources with this delta type can write the data into ODS objects and master data tables.
           4.      Save your entries.
    Delta transfer is now possible for this DataSource.
    After generating the DataSource, you can see this from the marking for the field Delta Update on the DataSource: Customer Version screen.
    In systems from release 4.0B, you can display the current value of the delta-relevant field in the delta queue.
    Example for Determining the Selection Interval for a Generic Delta
    Safety Interval Upper Limit
    The delta-relevant field is a timestamp.
    The timestamp that was read last is 12:00:00. Delta extraction begins at 12:30:00. The safety interval for the upper limit is 120 seconds. The safety interval for the delta request is: 12:00:00 to 12:28:00. Upon completion of the extraction, the pointer is set to 12:28:00.
    Safety Interval Lower Limit
    The delta-relevant field is a timestamp. After images are transferred. In other words, the record is overwritten with the status after the change in BW, for example for master data. Any duplicate records that appear have no effect upon the BW system.
    The last changed timestamp is 12:28:00. Delta extraction begins at 13:00. The safety interval for the lower limit is 180secs. The safety interval for the delta request is: 12:25:00 to 13:00:00. Upon completion of the extraction, the pointer is set to 13:00:00.
    source: help.sap.com
    Hope it helps
    kalyan

  • Deltas for generic extraction.

    Hi,
    if i want use time stamp & calday  for my generic extraction , i can use uppercase and lower case, wher can i give timings suppose want run deltas for 10am-10.30am.
    regards
    anitha

    Hi,
    Security interval upper limit The delta-relevant field is a timestamp.
    The timestamp that was read last is 12:00:00. Delta extraction begins at 12:30:00. The security interval for the upper limit is 120 seconds. The selection interval for the delta request is: 12:00:00 to 12:28:00. When the extraction is finished, the pointer is set to 12:28:00. Security interval lower limit The delta-relevant field is a timestamp. After images are transferred. In BI the record is overwritten with the post-change status, for example, for master data. Any duplicate data records do not affect BI. The last read timestamp is 12:28:00. Delta extraction begins at 13:00. The security interval for the lower limit is 180 seconds. The selection interval for the delta request is: 12:25:00 to 13:00:00. When the extraction is finished, the pointer is set to 13:00:00.

  • Delta for Generic Extraction

    Hi all,
    Can anyone tell about delta for generic extraction i.e 3 options in detail and when do we use it.
    thanks in advance,
    chandra sekhar

    When you want to customize existing datasources at R/3 sides then you can do that with customer exits.
    Suppose if you want to add a column to the existing datasource then you will use append structures (Transaction SBIW-> Edit Data sources - Enhance Datasource) then to fill the column you will write the code in these Exits.
    There are 4 types of Exits available.Function Group (XRSA)
    EXIT_SAPLRSAP_001 Customer Function Call for Supplying Transaction Data
    EXIT_SAPLRSAP_002 Customer Function Call for Supplying Master Data (Attributes)
    EXIT_SAPLRSAP_003 Customer Function Call for Supplying Text
    EXIT_SAPLRSAP_004 Customer Function Call for Supplying Hierarchies
    As you are aware there 4 types since the datasources in R/3 are predefined to fill the data of BW viz, attributes,Text,Hierarchy and Transaction.
    Check the below forum discussion for more information..
    DataSource Enhancement
    Regs
    Gopi
    Assign point if it helps ...

  • Delta in Generic extraction

    Dear All,
    When we should go for which delta method and is there any specific reason for this.
    What we use in real time scenerio.
    Thanks,
    Saveen Kumar

    Please read this and let me know if still you are not clear.
    It all depends upon your reporting requirements.
    http://help.sap.com/saphelp_nw04s/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    http://wiki.sdn.sap.com/wiki/display/BI/Generic+Extraction
    @AK
    Edited by: Ashok KUMAR on Apr 1, 2010 3:39 PM

Maybe you are looking for

  • Verizion says Finders Keepers

    I'm on my 3rd Droid in less than 1 year. I guess my memory isn't as good as some because when the 3rd phone came I thought I knew the drill: They send you just the phone so you need your battery and back cover. Then you send the defective phone back

  • Expand options

    I would love to see this in Illustrator. After filling an object with a pattern, it would be great if you could expand that object and the result would delete all of the pattern outside the object instead of using a clipping mask. I have been using I

  • Query related to sysctl.conf, limits.conf file

    Hi All gurus, Can you please guide me i watch one server running on Unix with Oracle DB when i try to check sysconf file with root user i didn't find file and same for limit.conf file Can anyone please guide me in the absence of these files how db is

  • IPod does not display music in the Cloud

    I'm at my wits end to get my iPod to see the 5500 selections in the Cloud. I've reinstalled iTunes, I've restored the iPod software backing up first, and restored the iPod software with no backup and resynced. Nothing worked. If I manually sync to iT

  • After changing my hard drive to SSD when reinstalling OS X destination drive not found

    I recently replaced a bad Hitachi HDD with a Samsung SSD. When reinstalling OS X the install stops on the "Select the disk where you want to install Mac OS X. The window below is blank. The Samsung SSD is not detected. I have watch videos on the inst