Missing delta records for the Z extractor

Hi,
I have created a Z extractor for the table BUT050 in CRM. I have created a function module and have included the delta logic on CRDAT which is the created date, CRTIM - created time, CHDAT - change date, CHTIM - Change time. I have initialed the delta and started doing the delta loads. I found that there are few missing records in the extractor when compared to the table. I'm attaching my code below.Can anyone please look into it and tell me what the issue is.
Text removed by moderator
Thanks
FUNCTION Z_BI_CC_BUT050.
*"*"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  ZBI_BUT050 OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
* Auxiliary Selection criteria structure
   DATA: l_s_select TYPE srsc_s_select.
* Maximum number of lines for DB table
   STATICS: s_s_if TYPE srsc_s_if_simple,
* counter
           s_counter_datapakid LIKE sy-tabix,
* cursor
           s_cursor TYPE cursor.
* Select ranges
   RANGES: l_r_RELNR FOR ZBI_BUT050-RELNR,
           l_r_PARTNER1 FOR ZBI_BUT050-PARTNER1,
           l_r_PARTNER2 FOR ZBI_BUT050-PARTNER2,
           l_r_DATE_TO FOR ZBI_BUT050-DATE_TO,
           l_r_ZZTMSTMP FOR ZBI_BUT050-ZZTMSTMP.
   DATA : startdate LIKE sy-datum,
          starttime LIKE sy-uzeit,
          enddate LIKE sy-datum,
          endtime LIKE sy-uzeit,
          tstamp LIKE tzonref-tstamps,
          timezone type TZONREF-TZONE.
   RANGES: l_r_CRDAT FOR ZBI_BUT050-CRDAT,
                   l_r_CRTIM FOR ZBI_BUT050-CRTIM.
* 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 'ZCC_MA_BUT050'.
       WHEN OTHERS.
         IF 1 = 2. MESSAGE e009(r3). ENDIF.
* this is a typical log call. Please write every error message like this
         log_write 'E'                  "message type
                   'R3'                 "message class
                   '009'                "message number
                   i_dsource   "message variable 1
                   ' '.                 "message variable 2
         RAISE error_passed_to_mess_handler.
     ENDCASE.
     APPEND LINES OF i_t_select TO s_s_if-t_select.
* Fill parameter buffer for data extraction calls
     s_s_if-requnr    = i_requnr.
     s_s_if-dsource = i_dsource.
     s_s_if-maxsize   = i_maxsize.
* Fill field list table for an optimized select statement
* (in case that there is no 1:1 relation between InfoSource fields
* and database table fields this may be far from beeing trivial)
     APPEND LINES OF i_t_fields TO s_s_if-t_fields.
   ELSE.                 "Initialization mode or data extraction ?
* Data transfer: First Call      OPEN CURSOR + FETCH
*                Following Calls FETCH only
* First data package -> OPEN CURSOR
     IF s_counter_datapakid = 0.
* 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 = 'RELNR'.
         MOVE-CORRESPONDING l_s_select TO l_r_RELNR.
         APPEND l_r_RELNR.
       ENDLOOP.
      LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'PARTNER1'.
         MOVE-CORRESPONDING l_s_select TO l_r_PARTNER1.
         APPEND l_r_PARTNER1.
       ENDLOOP.
       LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'PARTNER2'.
         MOVE-CORRESPONDING l_s_select TO l_r_PARTNER2.
         APPEND l_r_PARTNER2.
       ENDLOOP.
       LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'DATE_TO'.
         MOVE-CORRESPONDING l_s_select TO l_r_DATE_TO.
         APPEND l_r_DATE_TO.
       ENDLOOP.
* Timestamp is delivered as a selection criterion.
* Split the timestamp into date and time
      LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'ZZTMSTMP'.
         tstamp = l_s_select-low.
         timezone = 'EST'.
         CONVERT TIME STAMP tstamp TIME ZONE timezone
          INTO DATE startdate TIME starttime.
         tstamp = l_s_select-high.
         CONVERT TIME STAMP tstamp TIME ZONE timezone
          INTO DATE enddate TIME endtime.
         l_r_CRDAT-low = startdate.
         l_r_CRDAT-sign = l_s_select-sign.
         l_r_CRDAT-option = l_s_select-option.
         l_r_CRDAT-high = enddate.
         APPEND l_r_CRDAT.
         l_r_CRTIM-low = starttime.
         l_r_CRTIM-sign = l_s_select-sign.
         l_r_CRTIM-option = l_s_select-option.
         l_r_CRTIM-high = endtime.
         APPEND l_r_CRTIM.
       ENDLOOP.
* Determine number of database records to be read per FETCH statement
* from input parameter I_MAXSIZE. If there is a one to one relation
* between DataSource table lines and database entries, this is trivial.
* In other cases, it may be impossible and some estimated value has to
* be determined.
       OPEN CURSOR WITH HOLD s_cursor FOR
* Use the l_r_erdat and l_r_erfzeit for both creation and change selections
* This way we can pick up both the creations and changes in a given time period.
       SELECT * FROM BUT050
              WHERE RELNR IN l_r_RELNR
               AND PARTNER1 IN l_r_PARTNER1
               AND PARTNER2 IN l_r_PARTNER2
               AND DATE_TO IN l_r_DATE_TO
               AND ( CRDAT >= startdate AND ( CRTIM >= starttime OR ( CRDAT <= enddate AND CRTIM <= endtime ) ) )
               OR ( CHDAT >= startdate AND (  CHTIM >= starttime OR ( CHDAT <= enddate AND CHTIM <= endtime ) ) ).
     ENDIF.
     "First data package ?
* Fetch records into interface table.
*   named E_T_'Name of extract structure'.
     FETCH NEXT CURSOR s_cursor
                APPENDING CORRESPONDING FIELDS
                OF TABLE e_t_data
                PACKAGE SIZE s_s_if-maxsize.
     IF sy-subrc <> 0.
       CLOSE CURSOR s_cursor.
       RAISE no_more_data.
     ENDIF.
     s_counter_datapakid = s_counter_datapakid + 1.
   ENDIF.              "Initialization mode or data extraction ?
ENDFUNCTION.
Message was edited by: Matthew Billingham

Hi,
As per my knowledge you want load particular period of data try repair request may issue solve.
Regards
Sivaraju

Similar Messages

  • Missing Delta Records for 2LIS_02_ITM & SCL

    Hi Experts,
    this is how my problem goes.
    i have done my set up table filled on 12th Dec 2010 and from that time onwards the delta were running everyday and filling the DSO and Cube.
    Accidently by some others PC in prod all my delta loads and the setup table load is being deleted except yesterday in PSA for these 2 extractors and now because of some change i have to do a full load to DSO.
    But as the PSA is emply and have only yesterday's request i have, deleted that one as well and done a Init Delta to it and i found out that only the Set up table is comming now and all the deltas in between are missing.
    i have tried a full LOAd to PSA and the result is same.
    How can i get those missing delta records from 12th Dec last year till today with out doing another set up table fill  or Do i have to have fill the set up table again till today and thats the only way? i will set the delta again after that.
    Do we have to have all the user locked for the setup table fill (for Queued Delta type) ? Lot of people says yes you have to and others says no you don't require. i got one white paper and it clearly says no user locking is required. please find the link below. what is the correct way?
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d019f683-eac1-2b10-40a6-cfe48796a4ca?quicklink=index&overridelayout=true]

    Hi,
    As per my knowledge you want load particular period of data try repair request may issue solve.
    Regards
    Sivaraju

  • No Delta records for SRM Confirmations (Extractor - 0BBP_TD_CONF_1)

    Hi,
    We are getting zero records for delta update from 0BBP_TD_CONF_1 after successfull init w/data.
    Delta queue is empty, and no records  for delta extraction in RSA3 too in source system. Its sure that  data ( changes/new confimations) is entered, but some how they are not updated to BW delta queue.
    I saw couple of threads with same issue, but no solutions. If any one has any ideas/suggestions/solutions, please let me know.
    Thanks,
    S

    Hi,
    Did you checked the User exit wether you are doing any manupulations or selections.
    since before populating the delta queue we can have our own code to populate the data.
    So better check any such code is there in user exit.
    Regards,
    aanand

  • Postings in SAP HR for creating delta records for Time Management

    Hi Experts,
                      I am trying to test delta load for SAP HR Time Management Datasources. I am fairly new to SAP HR and need some help.
    Where do we create postings in  SAP HR for creating delta records which can be imported to BW. This is for the data sources 0HR_PT_1 and 0HR_PT_2.
                   Any help is appreciated. Will assign full points
    Regards
    Sunil Kumar.

    Hi,
    In order to test the above data sources you need to have some employee enter his time details or change the entered time details.  That will create some delta records for the planned or actual times.  CAT2 transaction should help entering the time details in SAP. 
    Hope it helps.

  • Delta upload for total fisl extractor

    Hello,
    Its said that the BALANCE field in the transfer structure is not supplied with data during Delta upload . 
    Would you know the reason for this?
    I assume this is for the totals extractor only since balance is not available otherwise.
    Regards
    Pascal

    Because the change record updates the movements not the balance
    And you can back post - ie post to a period already gone - so if yuu wanted balance to be provided you would then have to change every periods balance b/f in the extractor from the backposted period onwards
    Easiest way to do it - do it in the cube (as per the OSS note) and let compression deal with getting rid of the extra records created

  • Error in PA40: missing secondary record for infotype 0001

    Hi Experts,
    while changing the job code of employee i am getting below error in the PA40 transaction for IT0001 .
    Error : missing secondary record for infotype 0001 Key
    could you please tell me why this message is coming.
    Advance thanks,
    Regards
    Ram

    Hi,
    Please check out whether any user exits are maintained.
    Check ZXPADU01/ZXPADU02 includes.
    Please also check out whether there are dynamic actions configured for IT0000 and IT0001 via V_T588Z.
    Regards,
    Dilek
    Edited by: Dilek Ersoz Adak on Dec 16, 2009 3:19 PM

  • Delta support for the Generic extracter

    Hello Roberto,
    I have created the generic extractor (view-VBRK,VBRP) and it is working fine now i want to create the delta support for the extractor at R/3 side , please guide for the same .
    Regards,
    Milind

    Hi Milind,
    Under R/3, go to TCODE <b>RSO2</b>, you are presented with 3 options "Transaction Data", "Master Data", "Text". You choose which is the type of Generic Extractor you want.
    There is a button labeled "<b>DELTA</b>" on the upper left corner of the screen. You indicate there which of the fields in your Extract Structure will be used as DELTA indicator or reference point.
    You can choose either via Numeric Pointer, Timestamp, Calendar Day.
    Hope that helps...
    Do award some points if helpful...
    --Jkyle

  • The delta update for the InfoCube ZCUBE is invalidated

    Hi BI Experts,
    I am working on BW 3.5.
    For the datasource 2LIS_13_VDITM there were some requests(deltas) missing for 3 days.  So I got all the documents there were missing or not updated in BW. I deleted the setup tables and filled them with the new document numbers.
    I did a full repair request from the Infopackage level and the data got updated in ODS.
    But the DM Status is missing for all the requests in the ODS.
    And the data for the full repair request didnt get updated in the Cube and I got the following error:-
    The delta update for the InfoCube ZCUBE is invalidated. The can be due to one of the following:
    1. A request, which was already retrieved from the target system, was deleted from the InfoCube.
    2. A request, which was not yet retrieved from the target system, was compressed in the InfoCube.
    And the following delta was also not successfull.. How can I clear up this mess and ensure smooth flow of deltas. How can I set the DM status.
    Thanks
    Kumar

    Thanks for your reply.
    When I did a Full Repair Request on the ODS the data is in the New table and the DM status got reset(vanished). And the following day delta got failed( data for that request did not get updated in ODS and Cube)
    How can we bring back the DM Status and make the deltas successfull.
    Thanks
    Kumar

  • Merging two records in a single record for the same matnr,werks and bwart.

    Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
    I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
    Then there should be only one record for the same matnr,werks,bwart.
    Any suggestion would be appreciated.
    Regards,
    Amit

    hi,
    You can COLLECT statement only if all non key fields are numeric.
    This statement Adds all such fields and give us a single record.
    Regards
    Sumit Agarwal

  • BAPI/FM for creation of CONTACT RECORD for the contract account

    Hi All,
    I need to create a contact record for the a contract account.
    The contact record details will be maintained in the table BCONT.
    Let me know if there is a function module/BAPI/any othere way to create a contact record.
    Regards
    Shiva

    Hi,
    You can use the function module - BCONTACT_CREATE to create Contact record
    (or)
    make a BDC of the Tcode - BCT1(Contact creation) and use the same for creation of contacts in batch
    Note: Contact is created against Business Partner and not Contract Account. So you will have to include your logic of finding out the respective Business Partner for the Contract Account for which you need to create Contact record.
    regards
    Gagan

  • Recording for the web P2

    I do not believe there is a way but it would be nice if there was an option to record for the web on a P2 card. I am recording tech meetings (HVX200) and uploading them to the web, taking out the extra step of compressing it sounds like magic.......is this possible??

    All you have to do is check the settings on the camera for the different formats it shoots... that's with any camera, but I can tell you with pretty good certainty HVX200 doesn't shoot to any compressed web-friendly formats.

  • [svn:osmf:] 13000: Adding the missing readme file for the captioning sample app.

    Revision: 13000
    Revision: 13000
    Author:   [email protected]
    Date:     2009-12-16 10:36:36 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Adding the missing readme file for the captioning sample app.
    Added Paths:
        osmf/trunk/apps/samples/plugins/CaptioningSample/readme.txt

    Carey,
    I have tried london1a1's workaround, and it has not made any difference.
    It seems that london1a1 suggests changing the Camera.h file in this location:
              Users/london1a1/Documents/DW_NAF/PhoneGapLib/PhoneGapLib/Classes/Camera.h
    Whereas you're saying to change the Camera.h file in this location:
              /Applications/Adobe Dreamweaver CS5.5/Configuration/NativeAppFramework/DWPhoneGap/iphone/PhoneGapLib/Classes/Camera.h
    I've tried changing the Camera.h file in both locations.  Neither has made a difference.

  • I had to replace the hard drive on my computer.  I am now trying to download Adobe Photoshop CS6, previously purchased.  I get an error that files are missing after waiting for the whole download.  I have Windows7

    I had to replace the hard drive on my computer.  I am now trying to download Adobe Photoshop CS6, previously purchased.  I get an error that files are missing after waiting for the whole download.  I have Windows7

    The error msg said that the file archive part of Adobe photoshop CS6 is missing and that I need all parts in the same folder.

  • Want to display records for the specified month only

    Hi all,
    In my report I am displaying records for the specified month only.
    I am able to display it in range of the dates, but i want to display name of the month at the top of page.
    e.g.
    i am giving range like
    01.04.2008 to 30.04.2008
    then, it shoud display April, 2008.
    Thanks & Regards,
    Sandip Sonar

    Hi,
    Ru using alv grid?
    Use following FM to get month in words.
    and then using TOP-OF-Page event print the month.
    DATA X_MONTH(11).
    CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
         EXPORTING
           INPUT         = SY-DATUM
         IMPORTING
           OUTPUT        = X_MONTH.
    Regards,
    Dhan

  • Help with pulling records for the last 24 hours

    Post Author: kbrinton
    CA Forum: Formula
    Hi,
    I don't know what is wrong with me but I can not figure out how to get Crystal to pull records for the last 24 hours.  I have a date field I can key off of but I can not figure out the formula or correct syntax to put in the Selection formula.  Any help would be great!!  Thanks

    Post Author: SKodidine
    CA Forum: Formula
    No need to create any formula.  In your record selection criteria type:
    {table.date} in dateadd("h",-24,currentdatetime) to currentdatetime
    If you just want the prior 24hrs and do not care about the time then replace 'currentdatetime' with 'currentdate'.
    (currentdatetime - 24) will give you 24 days before and not 24 hours.

Maybe you are looking for

  • Import format for two amount columns in different currencies

    Hello, I am working on FDM 11.1.1.3 and will be getting the trial balance containing amounts in two currencies (both local and USD). I need to load data in both the currencies. The extract has two columns for the amount rather than having two differe

  • ASSIGN_CAST_WRONG_ALIGNMENT error when displaying InfoCube data

    Hi all, I am getting an ABAP runtime error ASSIGN_CAST_WRONG_ALIGNMENT when I try to display data from an InfoCube. This only happens when I'm entering a filter for an InfoObject in the data selection screen, when I click on the "List of Values" box

  • FI Implementation

    Hi Guys,             I have the scenario of implementing all FI modules like FI-AR, FI-AP, FI-AA, FI-AP, genrally what are the characteristics to be loaded master data to which datasources, i mean to say is what are the datasources should initially b

  • Warehouse journal

    Dear All, is there a warehouse journal table available for non stock item like sales item or purchase item ? Rajh

  • Why does my Macintosh HD and Utility Disk give different available space values?

    My MacBook Pro (about a year and a half old) has started running extremely slowly out of the blue, to the point it is barely functional. I've tried basically everything, restarting, cleaning up the desktop, clearing out my downloads file, starting in