Delta in Append 0CRM_SALES_ACT_I ?

Hi, we extend extractor 0CRM_SALES_ACT_I in new field zkeyfigure.
user using interfaz for modify olnly zkeyfigure value, but Delta to BW not get value, only get value 0.
any idea ?
is posible delta when modify only zkeyfigure ?
Thank you.

It depends on the BTEs configured for that transaction.If its a standard tcode, then modifying only the KF should bring the delta records.Goto the table and check whether the KF value is updated.Then goto CMOD and set a breakpoint in the code you have written for that new field.
Goto RSA3 and select debug mode giving the selection.In debugger, hit F5 to process step by step and see whether you are able to get value for the newly added field.

Similar Messages

  • Delta in Append to ZKEYFIGURE ?

    Hi, we extend extractor 0CRM_SALES_ACT_I in new field zkeyfigure.
    user using interfaz for modify olnly zkeyfigure value, but Delta to BW not get value, only get value 0.
    any idea ?
    is posible delta when modify only zkeyfigure ?
    Thank you.

    hi,
    How are populating the Zkeyfigure field, are  you using the BADI CRM_BWA_MFLOW?
    PS. Use the BADi CRM_BWA_MFLOW - Read BDoc data and populate the zkeyfigure field, this will ensure the correct value is populated on the delta records.
    Regards,
    Sabelo

  • Capturing Delta for Appending field in the extract structure

    I have a issue for capturing the delta value. zzdelco  is the field appended in the MC11VA0HDR and populating the data through user exit
    SELECT SINGLE DELCO FROM VBKD INTO L_DELCO WHERE VBELN = <FS_MC11VA0HDR>-VBELN " AND POSNR = '000000' .
    IF SY-SUBRC = 0.
    <FS_MC11VA0HDR>-ZZDELCO = L_DELCO .
    ENDIF.
    I have to Capture the delta whenever someone changes this field  DELCO. CDPOS/CDHDR doesnt recognizes this changes.
    Is their any way I can caputre the changes .
    Thanks for your help.

    hi,
    Check the below SAP Note:
    Note 576886 - Change to user-defined fields not extracted
    Regards, Siva

  • Inspection lot status to be fetched into BW

    Hello,
    First of all; I am aware that, there are many forums/discussions with regard to fetching of Inspection lot status. I have gathered the points as well.
    Our requirement is to, to extract the Inspection lot status into BW as we are already staging the Inspection lot numbers.
    I got 2 ways to do this,
    1) There is a BAPI FM in ECC to get the Inspection lot status. "BAPI_INSPLOT_GETSTATUS".
    2) Else, we can take QALS-OBJNR & pass it to JEST to get the status numbers. And this needs to be passed to TJ02 for descriptions.
    However, I have doubts about how to extract this status into BW. (As I need to filter out the status' LTCA, CRTD, ICCO).
    1) Can we have an extractor based on the Function module & get data into BW? Is this possible, because since it is a BAPI FM; I wanted to have a clear picture on how to get it.
    2) Can I build a view on top of JEST & TJ02; And apply selection conditions of whatever is necessary & extract it into BW?
    And I don't want to stage the complete data in BW side for JEST & TJ02, as I noticed that there is uncertainly huge amount of data in JEST.
    So, any inputs on how to stage the status into BW will be very helpful for me. Please let me know, if I have missed out any documents/links regarding the same.
    Thanks again,
    Vikranth.

    Dear Madhav
    Here is my approach for this requirement
    1) Create  infoobject for each of the status you required for the inspection lot. (It can be flag indicator kind of info object
    2) Make these status navigational attribute of Inspection lot infoobject
    3) Create a generic datasource on QALS . You can use createdon and changedon so as to manage a pseudo delta. Append the datasource extract table with Z fields required to capture your Inspection lot status
    4) Write a Exit in the source system to fetch up the status field for each inspection lot from the JEST table. You can hardcode the status field for eg If Qlot has status I0002 then mark the corresponding append field with X.
    5) Map the append datasource field to the Inspection lot info object through transformation.
    Hope its clear for you
    Regards
    Gajesh

  • BW Extract function module

    I have a problem - I am trying to create a generic extract function module. The problem is that the template RSAX_BIW_GET_DATA_SIMPLE uses one database select. However for my purpose I need to select from various tables in order to build up my internal table.
    It is for PO Service orders so I have to read headers then detailed lines then other tables to get account assignments etc. How do I transfer this to E_T_Data using the required logic for the fetch and open curser etc.

    OK I have written an ABAP report which gets the information I need. This is crude code that I know I can tidy up with joins but I just wanted to make sure I could get the information and that it was correct first.
    The code is below. I have two scenarios one for full load and one for delta (which will be the same process but reading the po's that have changed from a bespoke table populated from a user exit EXIT_SAPLRSAP_001
    from 2LIS_02_SCL.)
    Anyway here it is:-
        FULL LOAD   ************************************
    IF FLAG = 'F'.
    EKKO FIRST READ
    SELECT * FROM EKKO
    WHERE EBELN IN PO
       AND AEDAT IN DDATE
       AND BUKRS = 'OPCS'
       AND BSTYP = 'F'
       AND LOEKZ NE 'X'.
       MOVE-CORRESPONDING EKKO TO I_TAB.
       APPEND I_TAB.
    ENDSELECT.
    EKPO SECOND READ POULATING i_tab2
    LOOP AT I_TAB.
    SELECT * FROM EKPO
    WHERE EBELN = I_TAB-EBELN
    AND PSTYP = '9'
    AND EREKZ NE 'X'
    AND ELIKZ NE 'X'
    AND LOEKZ NE 'X'.
    I_TAB2-WAERS = I_TAB-WAERS.
    MOVE-CORRESPONDING EKPO TO I_TAB2.
    APPEND I_TAB2.
    ENDSELECT.
    ENDLOOP.
    SORT I_TAB2 BY EBELN EBELP.
    CLEAR W_PACKNO.
    POPULATE ITAB_ESLL FINAL TABLE
    LOOP AT I_TAB2.
    SELECT SINGLE SUB_PACKNO INTO W_PACKNO FROM ESLL
    WHERE PACKNO = I_TAB2-PACKNO.
    IF SY-SUBRC = 0.
    SELECT * FROM ESLL
    WHERE PACKNO = W_PACKNO.
    ITAB_ESLL-ERDAT = I_TAB2-AEDAT.
    ITAB_ESLL-WAERS = I_TAB2-WAERS.
    MOVE-CORRESPONDING ESLL TO ITAB_ESLL.
    ITAB_ESLL-EBELN = I_TAB2-EBELN.
    ITAB_ESLL-EBELP = I_TAB2-EBELP.
    account assignment
    CLEAR W_ZEKKN.
          SELECT SINGLE ZEKKN FROM ESKL INTO W_ZEKKN
          WHERE PACKNO = W_PACKNO
          AND INTROW = ESLL-INTROW.
          IF SY-SUBRC = 0.
          CLEAR EKKN.
          SELECT  SINGLE * FROM EKKN
          WHERE EBELN = ITAB_ESLL-EBELN
          AND EBELP =
                        ITAB_ESLL-EBELP AND ZEKKN = W_ZEKKN.
                        ITAB_ESLL-PS_PSP_PNR = EKKN-PS_PSP_PNR.
          ITAB_ESLL-SAKTO = EKKN-SAKTO.
          ITAB_ESLL-KOSTL = EKKN-KOSTL.
          ITAB_ESLL-KOKRS = EKKN-KOKRS.
          I_TAB2-SAKTO = EKKN-SAKTO.
          I_TAB2-KOSTL = EKKN-KOSTL.
          I_TAB2-KOKRS = EKKN-KOKRS.
         ENDIF.
    MODIFY I_TAB2.
    APPEND ITAB_ESLL.
    ENDSELECT.
    ENDIF.
    ENDLOOP.
    NOW READ EKBE
    LOOP AT I_TAB2.
      SELECT * FROM EKBE
      WHERE EBELN = I_TAB2-EBELN
       AND EBELP = I_TAB2-EBELP
       AND ( BEWTP = 'E' OR BEWTP = 'R' OR BEWTP = 'Q' ).
       IF SY-SUBRC = 0.
           MOVE-CORRESPONDING EKBE TO ITAB_EKBE.
           APPEND ITAB_EKBE.
       ENDIF.
          ENDSELECT.
    ENDLOOP.
    get rid of duplicate lines in ekbe
    SORT ITAB_EKBE BY EBELN EBELP BELNR.
    DATA: FIRST(1) TYPE C.
    FIRST = 'x'.
    DATA: D_BELNR LIKE EKBE-BELNR.
    LOOP AT ITAB_EKBE.
    IF FIRST = 'x'.
    D_BELNR = ITAB_EKBE-BELNR.
    FIRST = ''.
    ELSE.
    IF ITAB_EKBE-BELNR = D_BELNR.
    DELETE ITAB_EKBE.
    ELSE.
    D_BELNR = ITAB_EKBE-BELNR.
    ENDIF.
    ENDIF.
    ENDLOOP.
    LOOP AT ITAB_EKBE.
         CLEAR W_PACKNO1.
         SELECT SINGLE * FROM ESSR
        WHERE LBLNI = ITAB_EKBE-LFBNR.
        W_PACKNO1 = ESSR-PACKNO.
         CLEAR W_PACKNO.
        IF SY-SUBRC = 0.
          SELECT SINGLE SUB_PACKNO FROM ESLL INTO W_PACKNO
          WHERE PACKNO = W_PACKNO1.
    get service line items from esll
          SELECT * FROM ESLL
          WHERE PACKNO = W_PACKNO.
          IF SY-SUBRC = 0.
    ACCOUNT ASSIGNMENT INSERVICE PACKAGE
          CLEAR W_ZEKKN.
          SELECT SINGLE ZEKKN FROM ESKL INTO W_ZEKKN
          WHERE PACKNO = W_PACKNO
          AND INTROW = ESLL-INTROW.
          IF SY-SUBRC = 0.
          CLEAR EKKN.
          SELECT  SINGLE * FROM EKKN
          WHERE EBELN = ITAB_EKBE-EBELN
          AND EBELP =
                       ITAB_EKBE-EBELP AND ZEKKN = W_ZEKKN.
          IF SY-SUBRC = 0.
          CLEAR ITAB_ESLL.
          MOVE-CORRESPONDING ESLL TO ITAB_ESLL.
          ITAB_ESLL-EBELN = ITAB_EKBE-EBELN.
          ITAB_ESLL-EBELP = ITAB_EKBE-EBELP.
          ITAB_ESLL-ZEKKN = W_ZEKKN.
          ITAB_ESLL-VGABE = ITAB_EKBE-VGABE.
          ITAB_ESLL-BELNR = ITAB_EKBE-BELNR.
          ITAB_ESLL-BEWTP = ITAB_EKBE-BEWTP.
          ITAB_ESLL-SAKTO = EKKN-SAKTO.
          ITAB_ESLL-KOSTL = EKKN-KOSTL.
          ITAB_ESLL-KOKRS = EKKN-KOKRS.
          ITAB_ESLL-PS_PSP_PNR = EKKN-PS_PSP_PNR.
          ENDIF.
         ENDIF.
    CHECK IF CREDIT OR DEBIT AND ADJUST
          IF ITAB_EKBE-SHKZG = 'H'.
           ESLL-MENGE = ESLL-MENGE * -1.
           ESLL-NETWR = ESLL-NETWR * -1.
          ENDIF.
          ITAB_ESLL-MENGE = ESLL-MENGE.
          ITAB_ESLL-NETWR = ESLL-NETWR.
          ITAB_ESLL-ERDAT = ESSR-ERDAT.
          ITAB_ESLL-WAERS = ESSR-WAERS.
          ITAB_ESLL-LOEKZ = ESSR-LOEKZ.
          ITAB_ESLL-KZABN = ESSR-KZABN.
          ITAB_ESLL-FRGKL = ESSR-FRGKL.
          ITAB_ESLL-BUZEI = ITAB_EKBE-BUZEI.
          ITAB_ESLL-GJAHR = ITAB_EKBE-GJAHR.
          ITAB_ESLL-EBELN = ITAB_EKBE-EBELN.
          ITAB_ESLL-EBELP = ITAB_EKBE-EBELP.
          APPEND ITAB_ESLL.
          ENDIF.
        ENDSELECT.
       ENDIF.
    ENDLOOP.
    report print out
    WRITE:/5 'doc',
           20 'PO Line',
           30 'date created',
           45 'Currency',
           55 'deletion Ind',
           70 'ACCEPT IND',
           85 'Rel Ind',
           95 'Line No',
           115 'Service',
           135 'Quantity',
           155 'UOM',
           175 'Net Value',
           195 'Mat Grp',
           215 'G/L Acc',
           230 'Cost Centre',
           245 'Cont Area',
           255 'Acc *** line',
           275 'Trans/Event Type',
           295 'Posting Year',
           315 'Mat Doc No',
           335 'Mat Doc Line no',
           355 'bewtp',
           375 'WBS'.
    SORT ITAB_ESLL BY EBELN EBELP SRVPOS EXTROW.
    LOOP AT ITAB_ESLL.
    WRITE:/5 ITAB_ESLL-EBELN,
            20 ITAB_ESLL-EBELP,
            30 ITAB_ESLL-ERDAT,
            45 ITAB_ESLL-WAERS,
            55 ITAB_ESLL-LOEKZ,
            70 ITAB_ESLL-KZABN,
            85 ITAB_ESLL-FRGKL,
            95 ITAB_ESLL-EXTROW,
            115 ITAB_ESLL-SRVPOS,
            135 ITAB_ESLL-MENGE,
            155 ITAB_ESLL-MEINS,
            175 ITAB_ESLL-NETWR,
            195 ITAB_ESLL-MATKL,
            215 ITAB_ESLL-SAKTO,
            230 ITAB_ESLL-KOSTL,
            245 ITAB_ESLL-KOKRS,
            255 ITAB_ESLL-ZEKKN,
            275 ITAB_ESLL-VGABE,
            295 ITAB_ESLL-GJAHR,
            315 ITAB_ESLL-BELNR,
            335 ITAB_ESLL-BUZEI,
            355 ITAB_ESLL-BEWTP,
            375 ITAB_ESLL-PS_PSP_PNR.
    ENDLOOP.
       DELTA LOAD    ****************
    ELSE.
    IF FLAG = 'D'.
    WRITE: /'Test DELTA Part'.
    SELECT * FROM ZBWSERVICEPOS
    WHERE DATE_UPDATED IN DDATE.
    MOVE-CORRESPONDING ZBWSERVICEPOS TO I_TAB-DELTA.
    APPEND I_TAB-DELTA.
    ENDSELECT.
    *LOOP AT I_TAB-DELTA.
    WRITE:/ I_TAB-DELTA-DATE_UPDATED,
      I_TAB-DELTA-EBELN, I_TAB-DELTA-EBELP.
    *ENDLOOP.
    ELSE.
      MESSAGE I100.
    ENDIF.
    ENDIF.

  • LO Extraction Help Needed

    Hi All
    Iam triyng to do, LO Extraction on SD Sales Document Header Line ( 2LIS_11_VAH ) and customizing the Extract Structure  by adding more fields like MCVBAK AEDAT,NETWR and KOSTLC.I get erorr when I transfer the  above fields to Extract Structure as
    "Struct App 11cannot be changed duetosetuptable--> Long Text" which means that extract structure is not getting updated .
    Please advice in order to reflect the change ini extract structure under Maintenance.

    Hi
    Another way to enhence data source by appending the required fields directly to the communication structure(i.e. MCVABK, MCVBUK etc...) and then write user exits to populate these fields, then go to the LO cockpit and move appended fields from communication structure to extract structure.
    This is the standard procedure to enhence the data source which is recommended by SAP.
    Previous one which you have used is mainly used when we need not to catch the deltas for the enhanced field but if there is requirement to catch the deltas for appended fields the only way to append the fields in communication structure.

  • Appended Key figure is not working in Delta reverse record

    Dear All,
    I have enhanced 2LIS_11_VASCL datasource, to pull value from condition record, called Surchage.
    I have set reversal indicator for this field in my datasource. I have written code in CMOD to get this value from KONV table of that sales order.
    Now when value  is changed, delta record for this, automatically creates reversal record, but it shows new value of surcharge as negative, because that code is pulling value which currently exists in table.
    For example for order 350089 , if surchage is $ 100 .  User changes it to $200
    Then I get following record.
    Reversal Record  - $200 (This should be instead -$100 , i.e. previous value)
    New Record - $100.
    Because of this my new value is not getting updated in table.
    I can't use overwrite mode in ODS because some other technical reason.
    How can I solve this problem?
    appended Key figure is not working in Delta reverse record

    LIS have before-after delta. So ODS should be in Overwrite mode. If that is not possible.. try sorting the records in Start Routine such way that the - 100 $ is above the - 200 $ records in Data Package.
    but this is risky as it will affect other key figures for which things maybe fine. I guess you need take Data Package records in an internal table. And then sort this internal table. then you can read the internal table in update routine of this key figure.
    OR (If you are on BI 7.0) you introduce an InfoSource in between DS and DSO with Overwrite mode for this Key Figure.

  • Appended field is missing in field list of generic delta

    hi all,
    i appended the generic extract structure in RSA6 and uncheck the hide box.
    now im unable to see the zz field in the field list in rso2 to set up generic delta, any ideas...
    Thanks,
    GK

    Hi,
    First check the asset Scr.layout rule for asset class by using path -
    Spro>Financial Accounting>Asset Accounting>Organizational Structures>Asset Classes-->Define Asset Classes
    Select your asset class and check - asset Scr.layout rule .
    Then go to -
    Spro>Financial Accounting>Asset Accounting>Master Data>Screen Layout-->Define Screen Layout for Asset Master Data
    Click on - Define Screen Layout for Asset Master Data
    Select your Screen layout which you got earlier. In Logical Field group select 'Inv. account assignment'. and double click on field group rule.Then make required changes in 'Investment Order' as required - Required, optional, display.
    Then check asset master data in AS02.

  • Delta is not working for custom appended fields (ZAKNA1) form R/3 to CRM

    Hi, This question pertains to Customer Master (KNA1) replication from R/3 4.7 to CRM 5.0 system via middleware.
    Standard fields are working fine. The custom fields also replicate fine during initial load and request loads however, delta is does not seem to be working. Any ideas or suggestions highly appreciated...Thank you.
    Best regards,
    ---Manohar

    Hello,
    it's a long way since you post this question. I'm facing a similar problem. When i enter XD02 and change only something in the classification system, the trigger for CRM update doesn't happen.  Only if i change also a master field...
    I needed the force the trigger so he can update correctly when the system is only changed in the classification system.
    At the time (3 years ago...:)) did you remember if you found a workaround for your problem??
    Thanks,
    Best regards,

  • Unable to get delta observation,

    i am trying get delta records from ztable based on time stamp with 900sec lower timestamp,,,,,,,,,,
    please correct my code,
    Example: DataSource for table SFLIGHT
      TABLES: zsales_order1.
    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_zvbeln FOR zsales_order1-zvbeln,
              l_r_zerdat FOR zsales_order1-zerdat,
              l_r_zerzet FOR zsales_order1-zerzet,
              l_r_ztimestamp FOR zsales_order1-ztimestamp.
      DATA : startdate TYPE sy-datum,
             starttime TYPE sy-uzeit,
             enddate TYPE sy-datum,
             endtime TYPE sy-uzeit,
             timestamp TYPE tzonref-tstamps.
    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 'ZSALES_ORDER_FUN1'.
          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 = 'ZVBELN'.
            MOVE-CORRESPONDING l_s_select TO l_r_zvbeln.
            APPEND l_r_zvbeln.
           LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'ZERDAT'.
              MOVE-CORRESPONDING l_s_select TO l_r_zerdat.
              APPEND l_r_zerdat.
           LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'ZERZET'.
                MOVE-CORRESPONDING l_s_select TO l_r_zerzet.
                APPEND l_r_zerzet.
       LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'ZTIMESTAMP'.
                  timestamp = l_s_select-low.
                  CONVERT TIME STAMP timestamp
                  TIME ZONE sy-zonlo INTO DATE startdate TIME starttime.
                  timestamp = l_s_select-high.
                  CONVERT TIME STAMP timestamp
                  TIME ZONE sy-zonlo INTO DATE enddate TIME endtime.
                  l_r_zerdat-low = startdate.
                  l_r_zerdat-sign = l_s_select-sign.
                  l_r_zerdat-option = l_s_select-option.
                  l_r_zerdat-high = enddate.
                  APPEND l_r_zerdat.
                  l_r_zerzet-low = starttime.
                  l_r_zerzet-sign = l_s_select-sign.
                  l_r_zerzet-option = l_s_select-option.
                  l_r_zerzet-high = endtime.
                  APPEND l_r_zerzet.
                ENDLOOP.
              ENDLOOP.
            ENDLOOP.
          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
          SELECT zvbeln
    zerdat
    zerzet
    zland1
    zkunnr
    zlgort
    zposnv
    zmatnr
    znetpr
    waerk
    zkpein
    zkmein
    zarktx
    zstadat
    zaedat
    zaezet
    ztimestamp FROM zsales_order1 WHERE zvbeln IN l_r_zvbeln
                                  AND zerdat IN l_r_zerdat
                                  AND zerzet IN l_r_zerzet
                                  AND (
          ( zerdat >= startdate AND ( zerzet >= starttime     OR
          ( zerdat <= enddate   AND   zerzet <= endtime ) ) ) OR
          ( zaedat >= startdate AND ( zaezet >= starttime     OR
          ( zaedat <= enddate   AND   zaezet <= 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.
    thanks in advance

    As per the description of this forum at the top of the page I do not think this is posted correctly:
    This forum is dedicated to all other development-related questions which are not directly addressed by other forums. This includes Business Objects SDKs, products, or technologies which do not fall under BusinessObjects Enterprise, BusinessObjects Edge, Crystal Reports Server, or Crystal Reports (for example Desktop Intelligence SDK, Universe Designer SDK, Portal Integration Kits, Java User Function Libraries, and other third party technologies or development languages).
    - Ludek

  • I_UPDMODE has no value in my Function Module when using Delta Extraction

    Help me please.
    My system is BW 3.52
    Please see the source code below and tell me why I_UPDMODE has not been passed value. I have ever used "I_SOURCE" but the value pass to I_DSOURCE. Can anyone tell me where is the upload mode pass to?
    FUNCTION ZBWFN_TEST_DELTA.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_DSOURCE) 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_RLOGSYS) TYPE  SRSC_S_INTERFACE-RLOGSYS OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_INTERFACE-READONLY OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZISU_ERCHC OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    This extractor is part of a delta scenario based on a timestamp
    included in the fields of table ROVERCUBE1. The interesting part
    takes place in form get_time_interval, where the date range is
    calculated update modespecifically.
    The pointer for the date up to which delta was extracted during
    the last delta update is held in table ROBWQTSTAT.
      TABLES: ZISU_TP_ERCHC, ERCH, ERCHC.
    Auxiliary Selection criteria structure
      DATA: L_S_SELECT TYPE SBIWA_S_SELECT.
      DATA: L_ERCHC LIKE ZISU_TP_ERCHC OCCURS 0 WITH HEADER LINE.
      DATA: L_DATE LIKE SY-DATUM,
                L_ACTUAL_DATE LIKE SY-DATUM,
                L_LAST_DATE LIKE SY-DATUM.
    Maximum number of lines for DB table
      STATICS: L_MAXSIZE TYPE SBIWA_S_INTERFACE-MAXSIZE,
               BEGIN OF S_S_INTERFACE.
      INCLUDE TYPE SBIWA_S_INTERFACE.
      INCLUDE TYPE SRSC_S_INTERFACE.
      STATICS: END OF S_S_INTERFACE.
    STATICS: BEGIN OF S_R_TSTMP OCCURS 1,
                SIGN(1),
                OPTION(2),
                LOW  LIKE ROVERCUBE1-TSTMP,
                HIGH LIKE ROVERCUBE1-TSTMP,
              END   OF S_R_TSTMP.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    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 DataSource validity
        CASE I_DSOURCE.
          WHEN 'ZOVER_TRANS'.
          WHEN 'TEST_ROVERCUBE'.
          WHEN 'DO_DATASOURCE'.
          WHEN '0VER_DELTA_WITH_LONG_NAME'.
          WHEN '0VER_CUBE_OLD_LIS'.
          WHEN '0VER_TYPE_ATTR'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
            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.
    Check for supported update mode
        CASE I_UPDMODE.
          WHEN 'F'.
          WHEN 'D'.
          WHEN 'C'.
          WHEN 'R'.
          WHEN 'S'.
          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.
        APPEND LINES OF I_T_SELECT TO G_T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_INTERFACE-REQUNR    = I_REQUNR.
        S_S_INTERFACE-ISOURCE   = I_DSOURCE.
        S_S_INTERFACE-MAXSIZE   = I_MAXSIZE.
        S_S_INTERFACE-INITFLAG  = I_INITFLAG.
        S_S_INTERFACE-UPDMODE   = I_UPDMODE.
        S_S_INTERFACE-RLOGSYS   = I_RLOGSYS.
        S_S_INTERFACE-READONLY  = I_READ_ONLY.
        G_FLAG_INTERFACE_INITIALIZED = SBIWA_C_FLAG_ON.
        APPEND LINES OF I_T_FIELDS TO G_T_FIELDS.
    here the timerange for update modes concerning delta is calculated
    and the status table is updated
        PERFORM GET_CAL_INTERVAL TABLES G_R_DELTA_DATE[]
                                  USING  S_S_INTERFACE-ISOURCE
                                             S_S_INTERFACE-UPDMODE
                                             S_S_INTERFACE-RLOGSYS.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      calcualte range tables for key fields
                                   calculate date range due to update mode
                                   OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
        IF G_COUNTER_DATAPAKID = 1.
    Fill range tables.
         LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'COUNTRY'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_COUNTRY.
           APPEND L_R_COUNTRY.
         ENDLOOP.
         LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'REGION'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_REGION.
           APPEND L_R_REGION.
         ENDLOOP.
         LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'KUNNR'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_KUNNR.
           APPEND L_R_KUNNR.
         ENDLOOP.
         LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'TYPE'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_TYPE.
           APPEND L_R_TYPE.
         ENDLOOP.
         LOOP AT G_T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'GJAHR'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_GJAHR.
           APPEND L_R_GJAHR.
         ENDLOOP.
    no data must be selected in Init simulation mode
          CHECK S_S_INTERFACE-UPDMODE NE SRSC_C_UPDMODE_INITSIMU.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE.
          L_MAXSIZE = G_S_INTERFACE-MAXSIZE.
          REFRESH: L_ERCHC.
          SELECT * FROM ERCH WHERE ERDAT IN G_R_DELTA_DATE
                                          OR AEDAT IN G_R_DELTA_DATE.
            SELECT SINGLE * FROM ERCHC WHERE BELNR = ERCH-BELNR.
            IF SY-SUBRC = 0.
              CLEAR: L_ERCHC.
              L_ERCHC-BUKRS = ERCH-BUKRS.
              L_ERCHC-ABRVORG = ERCH-ABRVORG.
              L_ERCHC-PORTION = ERCH-PORTION.
              L_ERCHC-GPARTNER = ERCH-GPARTNER.
              IF ERCHC-CPUDT IN G_R_DELTA_DATE.
                L_ERCHC-DELDT = ERCHC-CPUDT.
                L_ERCHC-DOCDT = ERCHC-BUDAT.
                L_ERCHC-RELNO = 1.
                COLLECT L_ERCHC.
              ENDIF.
              IF ERCHC-INTCPUDT IN G_R_DELTA_DATE AND
                 ERCHC-INTCPUDT IS NOT INITIAL.
                L_ERCHC-DELDT = ERCHC-INTCPUDT.
                L_ERCHC-DOCDT = ERCHC-INTBUDAT.
                L_ERCHC-REVNO = 1.
                COLLECT L_ERCHC.
              ENDIF.
            ENDIF.
          ENDSELECT.
          DELETE FROM ZISU_TP_ERCHC.
          LOOP AT L_ERCHC.
            MOVE-CORRESPONDING L_ERCHC TO ZISU_TP_ERCHC.
            INSERT ZISU_TP_ERCHC.
          ENDLOOP.
          OPEN CURSOR WITH HOLD G_CURSOR FOR
          SELECT * FROM ZISU_TP_ERCHC.
        ENDIF.                             "First data package ?
        IF S_S_INTERFACE-UPDMODE = SRSC_C_UPDMODE_INITSIMU.
          RAISE NO_MORE_DATA.
        ENDIF.
    Fetch records into interface table.
        FETCH NEXT CURSOR G_CURSOR
                   APPENDING CORRESPONDING FIELDS OF TABLE E_T_DATA
                   PACKAGE SIZE  S_S_INTERFACE-MAXSIZE.
        IF SY-SUBRC <> 0.
          RAISE NO_MORE_DATA.
        ENDIF.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.

    Dave,
    1. You can fire SELECTS in an RFC as well, but in your case the data exists in SYSTEM A and the RFC is in System B, so you can't do that. You can fire SELECTS on tables in the same system.
    2. Quick example of two table loops - EKKO (HEADER) EKPO (ITEM).
    LOOP AT EKKO.
    LOOP AT EKPO WHERE EBELN = EKKO-EBELN.
    ENDLOOP.
    ENDLOOP.
    I hope this is clear now.
    Regards,
    Ravi

  • Delta load not picking the changes to Custom Fields in 0CRM_QUOTA_ORDER_I

    We have enhanced the structure of CRM datasource 0CRM_QUOTA_ORDER_I for some additional fields that are held on the quotation. These are being successfully extracted when the quotation is being created. We have been running with this exctract for some time but we have been made aware that the additional fields on the append structure are not being updated when the quotation is being changed. Therefore delta changes are not being picked up making the reports incorrect.
    The user exit we are using to extract the information is EXIT_SAPLRSAP_001
    Does anyone know how we can enable this change so that delta changes are picked up by the extractor.
    Many thanks
    Gareth
    Edited by: Gareth Aspinall on Jan 14, 2010 2:04 PM

    Hi Gareth,
    Can you please check that the custom fields were added as described in question 4 in the SAP note
    692195? If yes and there is still a problem please check that the SAP note  1319891 has been applied
    in your system, it is a pilot note so you will need to raise a message with SAP to get added to the pilot
    note.
    Best Regards,
    Des Gallagher.

  • 0FC_BP_ITEMS: ERP customizing and delta mechanism

    Hi BI fans
    I have two questions:
    1.) The following link describes how to make the settings for delta enabling of datasource 0FC_BP_ITEMS:
    http://help.sap.com/saphelp_nw70/helpdata/en/27/42073e774a4329b6dd6bab21eef613/frameset.htm
    Prerequisites-
    "...If you want to use the delta method, you first have to activate it in the Implementation Guide for Contract Accounts Receivable and Payable ->  Integration Business Intelligence -> Maintain Central Settings in the clients of the OLTP system..."
    But I cannot find the setting for "Maintain Centrall Settings" in the implementation guide!
    Any idea from your side?
    What I see are entries for:
    Define Fields for the Extraction of Items
    Define Grid for Grouping of Items
    2.) What is the exact delta logic of this extractor (working through function module)?
    Which fields are relevant for the delta logic?
    Thanks
    BEOplanet

    Hi Andrea
    First of all I activated the whole content (datasource, BW content, etc.).
    Regarding the pseudo-delta on CPUDT I have designed a BEx variable on a DATS 8 time characteristic, e.g. 0NETDUEDATE. It is a BEx variable feeded by a customer exit, you will find a sample coding below. Furthermore an interval variable, mandatory input.
    Screen for BEx variable properties:
    Assign this BEx variable into your infopackage for intended use of pseudo-deltas, type OLAP-variable:
    The sample coding below gives you an idea about our pseudo-delta mechanism, from 1st. of last month until sy-datum.
    Data wa1 like line of e_t_range.
    data d1 type d.
    data fdate type d.
    data fyear type d.
    data ldate type d.
    data fmonth type d.
    case i_vnam.
    when 'ZL2MTDY'. "BEx variable on 0NETDUEDATE or any other DATS 8 time characteristic
    d1 = sy-datum.
    fdate = d1 - 31.
    fdate+6(2) = '01'.
    ldate = sy-datum.
    wa1-opt = 'BT'.
    wa1-sign = 'I'.
    wa1-low = fdate.
    wa1-high = ldate.
    append wa1 to e_t_range.
    ENDCASE.

  • 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

  • Delta error in GE-Function Module

    Hi ,
    my GE-delta is based on UDATE ( chenged date) from CDHDR table.
    i created datasource in RS02 and i defined delta based in UDATE with upper limit 1 day and lower limit is '0'..
    i created FM based on RSAX_BIW_GEDATA_SIMPLE.
    for full load it working fine.
    i put some extra code for delta.
    it is not take any records...
    i dont know much ABAP.
    plz tell me where is wrong in my code for delta..
    code ...
    FUNCTION ZXBWMM_INV_POT_ID.
    ""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  ZVSAIPID OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
    TABLES: SFLIGHT.
    TABLES: EBAN , CDPOS , CDHDR , ZVSAPR.
      TYPES : BEGIN OF TY_OBJDATE ,
            OBJECTID TYPE CDHDR-OBJECTID,
            VALUE_NEW TYPE CDPOS-VALUE_NEW,
            VALUE_OLD TYPE CDPOS-VALUE_OLD,
            UDATE TYPE CDHDR-UDATE,
            MINBE TYPE MARC-MINBE,
            BSTMA TYPE MARC-BSTMA,
            WERKS TYPE MARC-WERKS,
            VERPR TYPE MBEW-VERPR,
            STPRS TYPE MBEW-STPRS,
            LBKUM TYPE MBEW-LBKUM,
            BUDAT TYPE MKPF-BUDAT,
            MBLNR TYPE MSEG-MBLNR,
            MENGE TYPE MSEG-MENGE,
            DMBTR TYPE MSEG-DMBTR,
            END OF TY_OBJDATE.
      data : int_cdhdr type table of cdhdr with header line,
           int_cdpos type table of cdpos with HEADER LINE,
           INT_OBJDATE TYPE TABLE OF TY_OBJDATE WITH HEADER LINE.
          int_marc type table of marc with header line.
    *DATA: int_pr1 TYPE TABLE OF ZVSAIPID WITH HEADER LINE.
      DATA : BEGIN OF INT_MATNR OCCURS 10,
             MAtnr like mara-matnr,
             end of int_matnr.
    DATA : BEGIN OF INT_MARC OCCURS 10,
             matnr like marc-matnr,
             MINBE like marC-mINBE,
             BSTMA LIKE Marc-bstma,
             WERKS LIKE MARC-WERKS,
             end of int_marc.
    DATA : BEGIN OF INT_MBEW OCCURS 10,
             MATNR LIKE MBEW-MATNR,
             VERPR LIKE MBEW-VERPR,
             STPRS LIKE MBEW-STPRS,
             LBKUM LIKE MBEW-LBKUM,
             end of int_MBEW.
    DATA : BEGIN OF INT_MKPF OCCURS 10,
             MBLNR LIKE MKPF-MBLNR,
             BUDAT LIKE MKPF-BUDAT,
             END OF INT_MKPF.
    DATA : BEGIN OF INT_MSEG OCCURS 10,
             MATNR LIKE MSEG-MATNR,
             MBLNR LIKE MSEG-MBLNR,
             MENGE LIKE MSEG-MENGE,
             DMBTR LIKE MSEG-DMBTR,
             END OF INT_MSEG.
    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_CARRID  FOR SFLIGHT-CARRID,
             L_R_CONNID  FOR SFLIGHT-CONNID.
      RANGES : ra_OBJECTID FOR E_T_DATA-OBJECTID.
              RA_UDATE FOR E_T_DATA-UDATE.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
      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.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        CASE I_DSOURCE.
          WHEN 'ZOI_MM_INVENTORY_IPID'.
          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.
      Check for supported update mode
    CASE I_UPDMODE.
    WHEN 'F'.
    WHEN 'D'.
    WHEN 'R'.
    WHEN OTHERS.
    IF 1 = 2. MESSAGE E011(R3). ENDIF.
    LOG_WRITE 'E' "message type
    'R3' "message class
    '011' "message number
    I_UPDMODE "message variable 1
    ' '. "message variable 2
    RAISE ERROR_PASSED_TO_MESS_HANDLER.
    ENDCASE.
    READ TABLE I_T_SELECT INTO L_S_SELECT
    WITH KEY FIELDNM = 'UDATE'.
        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.
        G_S_INTERFACE-INITFLAG = I_INITFLAG.
        G_S_INTERFACE-UPDMODE = I_UPDMODE.
        G_S_INTERFACE-DATAPAKID = I_DATAPAKID.
        G_FLAG_INTERFACE_INITIALIZED = SBIWA_C_FLAG_ON.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF I_T_FIELDS TO 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
      LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT
      WHERE FIELDNM = 'UDATE'.
      ENDLOOP
        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 = 'CARRID'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
           APPEND L_R_CARRID.
         ENDLOOP.
         LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
           APPEND L_R_CONNID.
         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
         SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
                                  WHERE CARRID  IN L_R_CARRID AND
                                    CONNID  IN L_R_CONNID.
         IF L_S_SELECT-LOW = '' AND L_S_SELECT-HIGH = ''. "FULL or INIT
          OPEN CURSOR WITH HOLD S_CURSOR FOR
          select * from cdhdr where OBJECTCLAS = 'MATERIAL' AND TCODE = 'MM02'.
          ELSE. "DELTA
         OPEN CURSOR WITH HOLD G_CURSOR FOR
         select * from cdhdr where OBJECTCLAS = 'MATERIAL'
         AND TCODE = 'MM02'
         AND UDATE >= L_S_SELECT-LOW
         AND UDATE <= L_S_SELECT-HIGH.
         ENDIF.
         ENDIF.
       ENDIF.
        "First data package ?
        FETCH NEXT CURSOR S_CURSOR
              APPENDING  TABLE int_cdhdr
              PACKAGE SIZE S_S_IF-MAXSIZE.
       into table int_cdhdr
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        SELECT * FROM CDPOS INTO TABLE INT_CDPOS
             FOR ALL ENTRIES IN INT_CDHDR
             WHERE OBJECTID = INT_CDHDR-OBJECTID
             AND TABNAME = 'MARC'
             AND ( FNAME =  'BSTMA' OR FNAME = 'MINBE' ).
        LOOP AT int_cdpos.
          int_matnr-matnr = int_cdpos-objectid.
          APPEND int_matnr.
        ENDLOOP.
        SELECT  matnr MINBE BSTMA WERKS FROM MARC INTO TABLE INT_marc
                FOR ALL ENTRIES IN int_matnr
               WHERE MATNR = INT_matnr-matnr.
        SELECT  matnr VERPR STPRS LBKUM FROM MBEW INTO TABLE INT_MBEW
                FOR ALL ENTRIES IN int_matnr
               WHERE MATNR = INT_matnr-matnr.
        SELECT  matnr MBLNR MENGE DMBTR FROM MSEG INTO TABLE INT_MSEG
                FOR ALL ENTRIES IN int_matnr
               WHERE MATNR = INT_matnr-matnr.
         LOOP AT int_MSEG.
          int_MKPF-MBLNR = int_MSEG-MBLNR.
          APPEND int_MKPF.
        ENDLOOP.
        SELECT  MBLNR BUDAT FROM MKPF INTO TABLE INT_MKPF
                FOR ALL ENTRIES IN int_MKPF
               WHERE MBLNR = INT_MKPF-MBLNR.
    *BREAK-POINT.
        LOOP AT INT_CDPOS.
          READ TABLE INT_CDHDR WITH KEY OBJECTID = INT_CDPOS-OBJECTID .
          IF SY-SUBRC = 0.
            INT_OBJDATE-OBJECTID = INT_CDPOS-OBJECTID.
            INT_OBJDATE-VALUE_NEW = INT_CDPOS-VALUE_NEW.
            INT_OBJDATE-VALUE_OLD = INT_CDPOS-VALUE_OLD.
            INT_OBJDATE-UDATE = INT_CDHDR-UDATE.
            READ TABLE INT_MARC WITH KEY MATNR = INT_CDPOS-OBJECTID .
            IF SY-SUBRC = 0.
              INT_OBJDATE-MINBE = INT_MARC-MINBE.
              INT_OBJDATE-BSTMA = INT_MARC-BSTMA.
              INT_OBJDATE-WERKS = INT_MARC-WERKS.
              ENDIF.
            READ TABLE INT_MBEW WITH KEY MATNR = INT_CDPOS-OBJECTID .
            IF SY-SUBRC = 0.
              INT_OBJDATE-VERPR = INT_MBEW-VERPR.
              INT_OBJDATE-STPRS = INT_MBEW-STPRS.
              INT_OBJDATE-LBKUM = INT_MBEW-LBKUM.
             ENDIF.
            READ TABLE INT_MSEG WITH KEY MATNR = INT_CDPOS-OBJECTID .
            IF SY-SUBRC = 0.
              INT_OBJDATE-MBLNR = INT_MSEG-MBLNR.
              INT_OBJDATE-MENGE = INT_MSEG-MENGE.
              INT_OBJDATE-DMBTR = INT_MSEG-DMBTR.
             ENDIF.
            READ TABLE INT_MKPF WITH KEY MBLNR = INT_MSEG-MBLNR .
            IF SY-SUBRC = 0.
              INT_OBJDATE-MBLNR = INT_MKPF-MBLNR.
              INT_OBJDATE-BUDAT = INT_MKPF-BUDAT.
             ENDIF.
            APPEND INT_OBJDATE.
          ENDIF.
        ENDLOOP.
    *SELECT * FROM EBAN
        INTO CORRESPONDING FIELDS OF TABLE INT_PR1
        FOR ALL ENTRIES IN INT_OBJDATE
        WHERE BAnfn = int_objdate-objectid.
    *ZZPRREL
        LOOP AT INT_OBJDATE.
          E_T_DATA-OBJECTID = INT_OBJDATE-OBJECTID.
          E_T_DATA-UDATE = INT_OBJDATE-UDATE.
          E_T_DATA-VALUE_NEW = INT_OBJDATE-VALUE_NEW.
          E_T_DATA-VALUE_OLD = INT_OBJDATE-VALUE_OLD.
          E_T_DATA-MINBE = INT_OBJDATE-MINBE.
          E_T_DATA-BSTMA = INT_OBJDATE-BSTMA.
          E_T_DATA-WERKS = INT_OBJDATE-WERKS.
          E_T_DATA-VERPR = INT_OBJDATE-VERPR.
          E_T_DATA-STPRS = INT_OBJDATE-STPRS.
          E_T_DATA-LBKUM = INT_OBJDATE-LBKUM.
          E_T_DATA-MBLNR = INT_OBJDATE-MBLNR.
          E_T_DATA-MENGE = INT_OBJDATE-MENGE.
          E_T_DATA-DMBTR = INT_OBJDATE-DMBTR.
          E_T_DATA-BUDAT = INT_OBJDATE-BUDAT.
          APPEND E_T_DATA.
          CLEAR  E_T_DATA.
        ENDLOOP.
    Fetch records into interface table.
      named E_T_'Name of extract structure'.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    i assign points....
    Regards,
    PSR.

    Hi ,
    i am not find any sollution for this..
    any body help me for this problum...
    i assign points..
    Regards,
    PSR

Maybe you are looking for

  • Report Group 1SIP Consistency Check

    SAP reccomends the following to be consitency check for CO customers for system copy: "CO customers: An additional consistency check can be performed by running the report group 1SIP before the system copy in the source system, as well as after the c

  • Strange crash after exporting PDF...

    I have a script with the following at the end: var pathName = "~/Desktop/salesChartEMC.pdf"; var saveName = new File (pathName); saveOpts = new PDFSaveOptions(); saveOpts.compatibility = PDFCompatibility.ACROBAT5; saveOpts.generateThumbnails = true;

  • IPod touch 4g won't update to iOS 5, ITunes always crashes?????

    My iPod touch 4th gen will not update to iOS 5.  Whenever I connect it to my computer, it asks me to update to iOS 5. If I click okay, it backs up and them starts the update, but them iTunes crashes. If I click not to update, and sync it, it's fine.

  • Updating list output during execution.

    Hi, Is it possible to somehow update report list output during code execution ? What I'm trying to do is to LOOP at all files in a certain directory, process them and return some output. The process is time consuming. So I'd like the user not to wait

  • CSS Style Problem in some browsers

    I'm Using Dreamweaver Studio 8.0. on the PC. Some of my CSS Styles info does not work in some browsers. The "main_content" section of my site does not display properly in some browsers. Here is the CSS code: #main_content { position:absolute; left:13