Doubt about generic delta using function module.

Hi,
I have the following scenario.
I have to create a generic data source having delta using funcation module.
The full load works fine, but the delta load not.
I don't know, if always the field that was specified as a delta, must be part of the cursor in this case AFRU~LAEDA
This is my cursor:
OPEN CURSOR WITH HOLD S_CURSOR FOR
           SELECT AFIHAUFNR AFIHADDAT AFIHIPHAS AFIHILART AFIH~AKKNZ
                         AFIHPLKNZ AFIHILOAN AFIHIWERK AS ZPLANPLANT AFIHEQUNR
                         ILOA~TPLNR
                         AFKOGSTRP AFKOGLTRP AFKOGSTRS AFKOGLTRS AFKOGSTRI AFKOGETRI AFKO~FTRMI
                         AUFKAEDAT AUFKERDAT AUFKWERKS AUFKKOSTL AUFKKOKRS AUFKSOWRK AUFK~OBJNR
                         AUFKAUART AUFKVAPLZ
                         CRHD~ARBPL
                        TKA01~WAERS AS ZCOSTP_ML_UM
              FROM AFIH
                   INNER JOIN AFKO ON AFIHAUFNR = AFKOAUFNR
                   LEFT OUTER JOIN ILOA ON ILOAILOAN = AFIHILOAN
                   INNER JOIN AUFK ON AFIHAUFNR = AUFKAUFNR
                   INNER JOIN TKA01 ON AUFKKOKRS = TKA01KOKRS
                   LEFT OUTER JOIN CRHD ON CRHDOBJID = AFIHGEWRK
              WHERE AFIH~AUFNR in L_R_AUFNR
                    AND AFIH~EQUNR in L_R_EQUNR
                    GROUP BY AFIHAUFNR AFIHADDAT AFIHIPHAS AFIHILART AFIHAKKNZ AFIHPLKNZ AFIH~ILOAN 
                                       AFIHIWERK AFIHEQUNR
                                      ILOA~TPLNR
                                      AFKOGSTRP AFKOGLTRP AFKOGSTRS AFKOGLTRS AFKOGSTRI AFKOGETRI AFKO~FTRMI
                                      AUFKAEDAT AUFKERDAT AUFKWERKS AUFKKOSTL AUFKKOKRS AUFKSOWRK 
                                     AUFKOBJNR AUFKAUART AUFK~VAPLZ
                                     CRHD~ARBPL
                                     TKA01~WAERS.
For each aufnr I must go to the afru table and totalize the real work (IWNW)  and real duration (IDAUR) when AFRUSTZHL > 0 and totalize too when AFRUSTZHL = 0 but with sign to negative.
This is my external query, i need that the field AFRU~LAEDA must be taken as delta field:
          SELECT AFRUERSDA AFRULAEDA AFRUSTZHL SUM( AFRUISMNW ) AS ZTRA_REAL AFRUISMNE AS ISMNE SUM( AFRUIDAUR ) AS ZDURAC_REAL AFRU~IDAUE AS IDAUE
                 INTO CORRESPONDING FIELDS OF TABLE WT_AFRU_OM
          FROM AFRU
               WHERE AUFNR = WT_ZCUROM-AUFNR
                     AND AFRU~STZHL = 0
               GROUP BY AFRUERSDA AFRULAEDA AFRUSTZHL AFRUAUFNR AFRUISMNE AFRUIDAUE AFRUISMNW AFRUIDAUR
               order by AFRUERSDA AFRULAEDA AFRUSTZHL AFRUIDAUE AFRU~ISMNE.
          IF sy-subrc = 0.
            CLEAR WT_AFRU_OM2.
            REFRESH WT_AFRU_OM2.
            SELECT AFRUERSDA AFRULAEDA AFRUSTZHL SUM( AFRUISMNW ) AS ZTRA_REAL AFRUISMNE AS ISMNE SUM( AFRUIDAUR ) AS ZDURAC_REAL AFRU~IDAUE AS IDAUE
                   INTO CORRESPONDING FIELDS OF TABLE WT_AFRU_OM2
            FROM AFRU
                 WHERE AUFNR = WT_ZCUROM-AUFNR
                       AND AFRU~STZHL > 0
                 GROUP BY AFRUERSDA AFRULAEDA AFRUSTZHL AFRUAUFNR AFRUISMNE AFRUIDAUE AFRUISMNW AFRUIDAUR
                 order by AFRUERSDA AFRULAEDA AFRUSTZHL AFRUIDAUE AFRU~ISMNE.
            IF sy-subrc = 0.
              LOOP AT WT_AFRU_OM2.
                WT_AFRU_OM2-ZTRA_REAL = WT_AFRU_OM2-ZTRA_REAL * -1.
                WT_AFRU_OM2-ZDURAC_REAL = WT_AFRU_OM2-ZDURAC_REAL * -1.
                APPEND WT_AFRU_OM2 TO WT_AFRU_OM.
              ENDLOOP.
            ENDIF.
            LOOP AT WT_AFRU_OM.
              "fjro incluir el clear y el move
              CLEAR WT_DATOS_OM.
              MOVE-CORRESPONDING W_DATOS_BASE to WT_DATOS_OM.
              MOVE-CORRESPONDING WT_AFRU_OM TO WT_DATOS_OM.
              APPEND WT_DATOS_OM.
              APPEND WT_DATOS_OM TO WT_ESTFIN_OM.
            ENDLOOP.
          ENDIF.
It's possible set the delta field in a external query of the cursor.
Best Regards
Ramon Sanchez
Edited by: RAMON SANCHEZ on Aug 20, 2010 2:46 PM

Hi Sri,
here some coding, I hope this helps!
first, get the delta-field
      LOOP AT s_s_if-t_select INTO l_s_select.
        CASE l_s_select-fieldnm.
          WHEN 'ZDATE'.
            MOVE-CORRESPONDING l_s_select TO r_date.
            IF r_date-high IS INITIAL OR r_date-high = space.
              r_date-high = '9991231'.
            ENDIF.
            APPEND r_date.
        ENDCASE.
      ENDLOOP.
Cursor öffnen
      OPEN CURSOR WITH HOLD s_cursor FOR
      SELECT * FROM
      WHERE  ....
      AND    erdat in r_date
      AND    aedat IN r_date.
      FETCH NEXT CURSOR s_cursor INTO CORRESPONDING FIELDS OF table e_t_data package size s_s_if-maxsize.
regards
Siggi
PS: Note that this coding only works for a very straight forward extraction.
Message was edited by: Siegfried Szameitat

Similar Messages

  • Generic delta   using function module with two fields  AEDAT AND ERDAT

    Hi,
        i have scenario that i have to create a generic data source  having delta using funcation module and the delta speci fields are AEDAT AND ERDAT . Is there possibility with out using these two fields ( i mean AEDAT AND ERDAT)  in the extract structure can i create the data source . and provide sample code for me . it is very urgent.
    waiting for the reply,
    sri.c

    Hi Sri,
    here some coding, I hope this helps!
    first, get the delta-field
          LOOP AT s_s_if-t_select INTO l_s_select.
            CASE l_s_select-fieldnm.
              WHEN 'ZDATE'.
                MOVE-CORRESPONDING l_s_select TO r_date.
                IF r_date-high IS INITIAL OR r_date-high = space.
                  r_date-high = '9991231'.
                ENDIF.
                APPEND r_date.
            ENDCASE.
          ENDLOOP.
    Cursor öffnen
          OPEN CURSOR WITH HOLD s_cursor FOR
          SELECT * FROM
          WHERE  ....
          AND    erdat in r_date
          AND    aedat IN r_date.
          FETCH NEXT CURSOR s_cursor INTO CORRESPONDING FIELDS OF table e_t_data package size s_s_if-maxsize.
    regards
    Siggi
    PS: Note that this coding only works for a very straight forward extraction.
    Message was edited by: Siegfried Szameitat

  • Error in Generic Delta using Function Module

    Hi All,
    I have created one function module by copying the RSAX_BIW_GET_DATA_SIMPLE  module.
    Now when i am giving this in RSO2 Tcode and trying to save it its giving error that
    Required Table does not Exist..
    Please Help.

    Hi
    Look at below links
    Re: Generic function module for delta - which FM ?
    http://www.jt77.com/business-warehouse/work-flow-03485.html

  • Creating a Generic Datasource using Function Module

    Hi Guru's
                  We are tryin to create a Generic datasource using function module, we have found few old how to guides for doing the same but it is not effective and need to be altered. Can anyone suggest me the latest step by step procedure to create the above, also if you have the how to guide kindly paste the link as it will be a great help at this point.
    Thanks in advance
    Regards
    Liquid

    Hi,
    Please goto the Following links  :-
                                                                          PDF
    1)         http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?quicklink=index&overridelayout=true
    2)        http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
                                                     SAP Forum
    3)        Re: DataSouce based on FM
    4)       http://forums.sdn.sap.com/post!reply.jspa?messageID=10050614
    5)       https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    6)       Re: Generic datasource with functional module
    7)       Generic Extractor (FM based) - Delta Enabled
    Regards
    Obaid

  • Error occurred while loading Generic extraction using Function module

    Hi all
    I'm trying to do INIT for Generic Extractor using Function module, but i'm getting error as "Error occurred in the source system"
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
    Job terminated in source system --> Request set to red
    Message no. RSM078
    Can u help plz....

    Hi Vishnu
    This are the Job log details i found in source system...Can u tell what whould be the problem?
    Message
    Job started
    Step 001 started (program SBIE0001, variant &0000000002861, user ID
    Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
    DATASOURCE = ZYFI102
    RLOGSYS    =
    REQUNR     = REQU_D9Y4CZDQULRIHRRVU33KOLQZO
    UPDMODE    = D
    LANGUAGES  = *
             Current Values for Selected Profile Parameters               *
    abap/heap_area_nondia......... 0                                       *
    abap/heap_area_total.......... 10737418240                             *
    abap/heaplimit................ 40000000                                *
    zcsa/installed_languages...... DE                                      *
    zcsa/system_language.......... E                                       *
    ztta/max_memreq_MB............ 2047                                    *
    ztta/roll_area................ 3000000                                 *
    ztta/roll_extension........... 2000000000                              *
    No authorization for Acct type D
    Job cancelled after system exception ERROR_MESSAGE
    Thanks in advance
    Edited by: MohanDP on Feb 25, 2011 11:58 AM
    Edited by: MohanDP on Feb 25, 2011 12:01 PM

  • Generic Extraction - Using Function Modules

    Hi Friends,
    Can you pl let me know the step by step process for creating generic extraction using function module?
    Thanks in Advance.
    Regards,
    Ari.
    Please search the forum before posting a thread
    Edited by: Pravender on Aug 5, 2010 7:31 PM

    Hi,
    Plz find this doc.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33.
    And go this link...
    http://www.sdn.sap.com/irj/scn/advancedsearch?query=genericextractionwithfunctionmadule
    Regards.....KP
    Edited by: kundan.sap on Aug 5, 2010 4:35 PM

  • Create a generic extractor using Function module,  what steps must I follow

    Hello gurus team
    I need to Create a generic extractor using Function module,  what steps must I follow?
    Just I have a function module not estructures or something, only the program.... and I have intented to do it in rso2 using the fm option, but give an error... somebody can helpme???
    BR

    Hi,
    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    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
    Thanks,
    JituK

  • Generic Extractor using Function module with Complex Interface

    Hi,
    Has anyone created Generic extractor using Function module with Complex Interface?
    What is the difference between Complex and Simple interface in Function module?
    Pls explain.
    Thanks,
    Gopal

    Hi,
    Go through this link.....
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    GTR

  • Can anybody explain me creating Generic Datasource using Function module?

    Hi,
    can anybody explain me creating Generic Datasource using Function module?
    Thax in advance,
    Ravi.

    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    1. Create s structure with the fields that you need from the 4 tables . Activate.
    2. Goto SE 80 Select The Function Group , Copy , Select the Function module
    " RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
    Y or Z .
    3. SE37 ->Your Function module name -> Change , In table tab give your structure
    name by deleting the associated type given in " E_T_DATA " .
    4. Now select source code and Do the coding . Give Data source name in Coding .
    In your case you have to take data from more that 1 table .
    5. Activate the Function Group .
    6. In RSO2 Create the Data source , Give the Function Module Name , And Save.
    7. RSA3 -> Give data source name and Check for the Records .
    Creation of custom datasource. (Using function module)
    <b>is an example</b>
    1.Create a function group .
    2. Structure ZTEST123
    ZMATNR MATNR CHAR 18 0 Material Number
    ZMTART MTART CHAR 4 0 Material type
    ZMBRSH MBRSH CHAR 1 0 Industry sector
    ZMATKL MATKL CHAR 9 0 Material group
    ZBISMT BISMT CHAR 18 0 Old material number
    ZMAKTX MAKTX CHAR 40 0 Material description
    3. Create function module (i.e. ZTEST….) .
    FM - YMARA_DATA_TRNS
    FUNCTION YMARA_DATA_TRNS.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
    *" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *" TABLES
    *" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *" E_T_DATA STRUCTURE ZTEST123 OPTIONAL
    *" EXCEPTIONS
    *" NO_MORE_DATA
    *" ERROR_PASSED_TO_MESS_HANDLER
    data : ZTEST123 type ZTEST123 occurs 0 with header line.
    Maximum number of lines for DB table
    STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    S_COUNTER_DATAPAKID LIKE SY-TABIX.
    DATA: begin of t_mara occurs 0,
    ZMATNR type MATNR,
    ZMTART type MTART,
    ZMBRSH type MBRSH,
    ZMATKL type MATKL,
    ZBISMT type BISMT,
    end of t_mara.
    DATA: begin of t_makt occurs 0,
    ZMATNR type MATNR,
    ZMAKTX type MAKTX,
    end of t_makt.
    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 'ZZMARA_DATA'.
    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.
    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.
    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.
    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.
    select MATNR
    MTART
    MBRSH
    MATKL
    BISMT
    from mara up to 10 rows
    into table t_mara.
    if not t_mara[] is initial.
    select MATNR
    maktx
    from makt
    into table t_makt
    for all entries in t_mara
    where matnr = t_mara-zmatnr.
    endif.
    loop at t_mara.
    read table t_makt with key zmatnr = t_mara-zmatnr.
    ZTEST123-zmatnr = t_mara-zmatnr.
    ZTEST123-ZMTART = t_mara-ZMTART.
    ZTEST123-ZBISMT = t_mara-ZBISMT.
    ZTEST123-ZMBRSH = t_mara-ZMBRSH.
    ZTEST123-ZMATKL = t_mara-ZMATKL.
    ZTEST123-zmaktx = t_makt-zmaktx.
    append ZTEST123.
    clear ZTEST123.
    endloop.
    clear E_T_DATA.
    refresh E_T_DATA.
    E_T_DATA[] = ZTEST123[].
    ENDIF.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    ENDIF. "Initialization mode or data extractio
    ENDFUNCTION.
    3. Create the data source using transaction (RSO2).
    4. If structure exists for the table parameter of your function module then ok else create a structure for the table parameter ‘E_T_DATA’.
    5. Test the datasource in R/3 using transaction RSA3.
    6. Transfer the data source to BW –System and replicate it in the BW-System.

  • Creating generic datasource using function module in R/3 4.6c

    Hi,
    I am not able to see the option (in TC RSO2) to create generic datasource using function module in R/3 4.6c. Is there any special plug in or some SAP Note to be applied to get the option ?
    Waiting for a quick response.
    Thanks and Regards,
    Deepak

    Hi Sat,
    Thanks for the reply.
    I know that creating generic datasource from function module is available in R/3 4.7.
    In 4.6c version there are only two options available. They are Extraction from DB View and Extraction from SAP Query.
    The third option i.e. Extraction from Function Module is not available in 4.6c. I wanted to know if there is any plugin that needs to be installed to get this option.
    Thanks and Regards,
    Deepak

  • Delta with Generic Extractor using function module

    Hi,
    I have created an extractor using function module and it work fine (mode FULL)
    It's an extractor based on the FM RSAX_BIW_GET_DATA_SIMPLE.
    In TCODE RSO2, I have specified a delta field (AEDAT).
    In table ROOSOURCE, this extractor is defined by :
    DELTA = AIE
    EXMETHOD = F1
    When I extract data in Init mode, there is no problem. But delta don't extract any entries.
    When I trace with TCODE ST01, in Init mode the function module is executed but in delta mode, there is no trace of any use of this function module.
    I don't know how to do to make this extractor work fine in delta mode.

    Hi Pascal,
    The same function module i have used and succesffuly doing delta using it. So it works for both full & delta.
    How ur testing it and where are you testing it for delta.
    Do the delta testing through BI end. Set the
    As u have already set the delta field., now Follow below steps:
    1. First set the safety interval upper limit to -1, so that it will extract the delta data of 1 day back records also.
    2. Please make sure wether the delta records are available or not in r/3, if there is no records to be fetched in for delta then u will not be able to track out wether delta is working or not.
    3. Now do the init from BI end first. Delta initialization without data transfer. - It will give u green status with 1 dummmy record.
    4. Now do the delta. It will extract the delta records.
    Before that make sure that if any selection your giving in Infopackage should be met out by these delta records.
    Thanks
    Dipika

  • Reg. Generic delta using fun module

    Hello Experts,
    I am creating function module for generic delta (both Full, Delta) using RSAX_BIW_GET DATASIMPLE. My generic field is AEDAT.
    When I check this function module, there is no logic to maintain Delta load excapt Full. Where as this Delta functionality is available in another function module RSAX_BIW_GET_DATA. Now my question is:
    Can we use RSAX_BIW_GET DATASIMPLE for Delta load also?
    If yes, How to maintain delta based on AEDAT field?
    Do we need to maintain this Delta specific field AEDAT in Extract structure?
    Can anybody please clarify my doubts.....
    Thanks in advance,
    Zak.

    Hi,
    Please check the blog:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Also check :
    Re: Delta update - rso2
    -Vikram

  • Generic delta with function module

    Hi Gurus,
    Is it possible to create a generic DataSource with delta support using function module following the queue delta mechanism (u can get some function moduel in MCEX function group, and check the outbound delta queue before and after update in transaction smq1.
    I can store the delta data using qRFC and collective update mechanism. but I don't know how to create a generic data with delta and how to attach a rfc destination (& logical system) to the data source. The Source system information is stored in the table "ROOSGEN".  Is there any configuration setting required to do the same.
    Regards,
    Jugal

    Jugal,
    What I understand you to be asking is if it is possible to create a generic delta extractor which uses the delta queue. If this indeed is your question the answer is yes.
    First you need to create your data source so it is visible via tx RSA5 and need to make sure that the delta type (ie ABR, AIM)is set appropriately for the datasource.
    The issue however is determining from where you will associate your delta hook (when will you write to the queue)? I have in the past utilized BTE's, Business Transaction Events to write information out to the delta queue, you can see a list of available BTE's in your system via tx FINF.
    Once you find a place to write your deltas from you call the below FM with the appropriate datasource.
    RSC1_TRFC_QUEUE_WRITE.
    Once you have done this the standard BW extractor for deltas will pull the information from the delta queue. But from what I understand you just want to know how to associate the data with the delta and that is the FM listed above.
    Hope this helps,
    Cheers,
    Scott
    > Hi Gurus,
    >
    > Is it possible to create a generic DataSource with
    > delta support using function module following the
    > queue delta mechanism (u can get some function moduel
    > in MCEX function group, and check the outbound delta
    > queue before and after update in transaction smq1.
    > I can store the delta data using qRFC and collective
    > update mechanism. but I don't know how to create a
    > generic data with delta and how to attach a rfc
    > destination (& logical system) to the data source.
    > The Source system information is stored in the table
    > "ROOSGEN".  Is there any configuration setting
    > required to do the same.
    >
    > Regards,
    > Jugal

  • 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.

  • Error in Data selection in R/3 Generic Extraction Using function Modules

    Hi Friends,
    I have created a a generic data source using function module to load data from PA0000 and PA0001 Tables ,Function module is working fine when i execute it indipendently and  the data source is also working fine when i extract data using RSA3. it is showing correct no of records 157.
    When loading data into DSO from BW (using 3.x/7.0 flows) data is comming to PSA  all 157 records but in the RSMO the load status is showing yellow when i look into the step by step analysis it is
    data selection successfully started
    Data selection successfully ended
    All Data packets completed.
    are showing in red.
    after and hour time load getting failed and in the error message it is showing " job terminated in source system---> Request set to red"
    it is giving this message wir no RSM 78.
    Please let me know it

    Hi Jerry,
    Thanks for the immediate replay
    But here in my source system job is getting terminated.
    this is the status of job in Job logs.
    the job is running till this step not going ahead.
    Call customer enhancement BW_BTE_CALL_BW204010_E (BTE) with 157 records 
    Result of customer enhancement: 157 records                             
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 301 records     
    Result of customer enhancement: 157 records                             
    Asynchronous send of data package 000001 in task 0002 (1 parallel tasks)
    pl. update me if any idea.

Maybe you are looking for