Skip to Content

SAP Data Services 4.2, how to use sap_extractor_delta_initialize()

hi there,

I'm extracting data from ECC to Oracle Datawarehouse using BODS 4.2 on windows. I'm using a generic (custom) ECC extractor to extract data. There is a lot of historical data present in ECC that I don't need to load into the Datawarehouse. Im only looking for the delta records to be loaded into Datawarehouse. I came across a function

sap_extractor_delta_initialize(). I read somewhere that this function is used by BW to do an init without delta. How do I use this function in SAP BODS? Is there function present in the data source? if not that what is it that I need to do ? Can you please mention the steps that I need to take.

thanks and regards,

samique

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

9 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 31, 2017 at 09:20 AM

    Hi Samique,

    As srinivas mentioned there is no need to export this function in bods Bcoz its inbuilt in designer itself , You can use it in Query transform or script (to know how to use see attached screen shot of query transform). As i can see in your log the problem is with 'A' which is designer not able to find what is it so find out first is there anything in your source related to 'A' like any variable or column and fix it with proper syntax if required.

    Any update plz let me know.

    Thanks,

    Tushar.query-transform.pngerror-log.png

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 30, 2017 at 11:22 AM

    Hi,

    It Sets a marker from which to return changed data mostly it is used for BW.

    For SAP extractors using changed-data capture, use this function in a script to indicate to the ODP data replication API to only extract changed data (delta) for subsequent executions. sap_extractor_delta_initialize (datastore_name, extractor_name, $g1) where $g1 is a sample name for a global variable of type string. After calling the function, $g1 is empty to indicate success; otherwise, it displays E for error.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 30, 2017 at 03:48 PM

    Thanks Tushar, I did try what you suggested but I don't see any functions under the datastore. Attached is the screenshot. Is there any option that needs to be enabled/selected in ECC ?

    Not able to see functions in the datastore

    Script where the sap_Extractor_delta_initialize function is being called.

    calling the function in the script before the job executes

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 30, 2017 at 06:02 PM

    update.

    I see that I'm able to import few functions but not sap_extractor_delta_initialize() function. Is there any pre-requisite step that needs to take place on ECC system in order to import sap_extractor_delta_initialize() into BODS?

    I do see other BAPI functions are imported under functions

    This is how Im calling the function:

    The job validates, and when I run it, it throws the following error message

    Add comment
    10|10000 characters needed characters exceeded

    • Samique,

      Kindly check the usage of this function in SAP Supplement Guide. You can use this function in a script or column mapping in Query transform

      Try the following in a script

      define $FLAG as varchar

      $Delta_Indicator = sap_extractor_delta_initialize ('DATASTORE_NAME', 'EXTRACTOR_NAME', $FLAG)

      Print('Delta Indicator is:'|| $Delta_Indicator);

      Check the output of Print

      Hope it is clear :)

      Regards

      Arun Sasi

      wl1xw.png (35.1 kB)
  • Jan 31, 2017 at 07:36 AM

    Hi Sammique,

    sap_Extractor_delta_initialize is data service function you don't have to import from a datastore as an external function.Just start typing "sap" in query transform or script as you did in the above screen shot.

    Please try to find out the use case of the function, it may only work with replication servers.(cdc datastores),Please update if you got the issue fixed.

    Thanks,

    Srinivas.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 13, 2017 at 05:42 PM

    Thank-you, I was able to resolve this issue, sap_extractor_delta_initialize() function is a bods function and it worked as expected.

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 08, 2017 at 02:13 PM

    Hi

    anyone has the code for SAP_EXTRACTOR_DELTA_INITIALIZE() function? I have created a script and executed the script, the result passed as 'E' and in ODPMON I can see a entry with Extraction successful, but delta initialisation is not conformed. anyone know what exactly we have to do here ?

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 08, 2017 at 02:15 PM

    Hi Samique Tanweer

    Please advise how did you resolve your issue?

    Thanks

    Sathya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 08, 2017 at 02:18 PM

    Hi TUSHAR BUL

    I have used below script. The script runs before the Dataflow. for $g1 I am getting value 'E'. any thoughts?

    sap_extractor_delta_initialize (datastore_name, extractor_name, $g1)

    Thanks

    Sathya

    Add comment
    10|10000 characters needed characters exceeded