Generic extraction :DTFIAP_3, Extractor: BWFID_GET_FIAP_ITEM

Hi all,
have a nice day for all.
generic extraction ,Source structure: BSIK, BSAK
Extractor: BWFID_GET_FIAP_ITEM
Extract structure OLTP: DTFIAP_3
some fields are append the structure but in funtion module ,
where i am going to declare the data: fieldname, table name ,any one before write the code for finance account payable please send me the coding part.
Regards
Priya
FUNCTION BWFID_GET_FIAP_ITEM.
""Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(I_ISOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
*"     VALUE(I_RLOGSYS) TYPE  RSAOT_LOGSYS OPTIONAL
*"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
*"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE DEFAULT 1000
*"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
*"     VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE OPTIONAL
*"     VALUE(I_READ_ONLY) TYPE  SBIWA_FLAG DEFAULT 'X'
*"  TABLES
*"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
*"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
*"      E_T_DTFIAP_3 STRUCTURE  DTFIAP_3 OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
...general data declaration...........................................
  DECLARE_GENERAL.
...local data.........................................................
  DATA: T_DELTA_DATA  TYPE BWFI_T_DATA_BSIK WITH HEADER LINE.
...begin of main program coding.......................................
...function module called in intialization mode? .....................
  IF NOT I_INITFLAG IS INITIAL.
...set data base tables to be read....................................
    REFRESH R_TABLE.
    APPEND_R_TABLE: TABLE_BSIK,
                    TABLE_BSAK.
...general initialization of infosource...............................
    GENERAL_DELTA_INITIALIZATION.
...Generate database index (if necessary).............................
   if s_updmode = sbiwa_c_updmode_deltainit
   or s_updmode = sbiwa_c_updmode_delta.
     call function 'BWFIU_GENERATE_DB_INDEX'
       exporting
         i_tabname                          = 'BSID'
         i_isource                          = i_isource
       exceptions
         no_index_required                  = 1
         error_passed_to_mess_handler       = 2
        OTHERS                             = 3
     if sy-subrc = '2'.
       raise error_passed_to_mess_handler.
     endif.
     call function 'BWFIU_GENERATE_DB_INDEX'
       exporting
         i_tabname                          = 'BSAD'
         i_isource                          = i_isource
       exceptions
         no_index_required                  = 1
         error_passed_to_mess_handler       = 2
        OTHERS                             = 3
     if sy-subrc = '2'.
       raise error_passed_to_mess_handler.
     endif.
     call function 'BWFIU_GENERATE_DB_INDEX'
       exporting
         i_tabname                          = 'BWFI_AEDAT'
         i_isource                          = i_isource
       exceptions
         no_index_required                  = 1
         error_passed_to_mess_handler       = 2
        OTHERS                             = 3
     if sy-subrc = '2'.
       raise error_passed_to_mess_handler.
     endif.
   endif.
...check initialization options for old data source 0FI_AP_3..........
    IF S_UPDMODE = SBIWA_C_UPDMODE_DELTAINIT.
      CLEAR: S_OLD_SOURCE_ACTIVE,
             LD_LINES.
      CALL FUNCTION 'RSA1_SINGLE_OLTPSOURCE_GET'
           EXPORTING
                I_OLTPSOURCE  = '0FI_AP_3'
                I_OBJVERS     = 'A'
                I_RLOGSYS     = S_RLOGSYS
           IMPORTING
                E_T_ROOSPRMSF = L_T_ROOSPRMSF
           EXCEPTIONS
                NO_AUTHORITY  = 1
                NOT_EXIST     = 2
                INCONSISTENT  = 3
                OTHERS        = 4.
      IF SY-SUBRC IS INITIAL.
        DESCRIBE TABLE L_T_ROOSPRMSF LINES LD_LINES.
        IF LD_LINES <> 0.
          MOVE 'X' TO S_OLD_SOURCE_ACTIVE.
        ENDIF.
      ENDIF.
    ENDIF.
...convert selection criteria into internal format....................
    REFRESH T_INTERNAL_FISEL.
    CALL FUNCTION 'BWFIU_CONVERT_ICSEL_TO_FISEL'
         TABLES
              I_SELECTION_TABLE = T_EXTERNAL_FISEL
              I_FISEL           = T_INTERNAL_FISEL
         EXCEPTIONS
              OTHERS            = 1.
...set fields to select from database.................................
    CALL FUNCTION 'BWFIU_TRANSFORM_FIELDLIST'
         EXPORTING
              I_TABLE       = 'BSIK'
         TABLES
              I_OLAP_FIELDS = I_T_FIELDS
              E_OLTP_FIELDS = T_FIELDLIST
         EXCEPTIONS
              OTHERS        = 1.
    CLEAR   T_FIELDLIST_BSEG.
    REFRESH T_FIELDLIST_BSEG.
...append logical system to selection criteria........................
    CALL FUNCTION 'BWFIU_GET_AWSYS_SELECTION'
         TABLES
              I_FISEL = T_INTERNAL_FISEL
         EXCEPTIONS
              OTHERS  = 1.
...get timestamps for selection (dependent on update mode)............
    CALL FUNCTION 'BWFIT_GET_TIMESTAMPS'
         EXPORTING
              I_OLTPSOURCE                = S_ISOURCE
              I_LEADING_SOURCE            = LEADING_SOURCE
              I_UPDMODE                   = S_UPDMODE
         IMPORTING
              E_DATE_LOW                  = SD_DATE_LOW
              E_DATE_HIGH                 = SD_DATE_HIGH
              E_TZONE                     = SD_TZONE
              E_DAYST                     = SD_DAYST
         EXCEPTIONS
              TIME_INTERVAL_NEGATIVE      = 1
              TIMESTAMPS_WRONG            = 2
              LEADING_TIMESTAMP_NOT_FOUND = 3
              OTHERS                      = 4.
    CASE SY-SUBRC.
      WHEN 1.
        RAISE NO_MORE_DATA.
      WHEN 2.
        RAISE ERROR_PASSED_TO_MESS_HANDLER.
      WHEN 3.
        RAISE NO_MORE_DATA.
    ENDCASE.
...move timestamp into selection criteria.............................
    IF S_UPDMODE NE SBIWA_C_UPDMODE_FULL.
      MOVE: SPACE        TO T_INTERNAL_FISEL,
            'CPUDT'      TO T_INTERNAL_FISEL-FIELDNM,
            'I'          TO T_INTERNAL_FISEL-SIGN,
            'BT'         TO T_INTERNAL_FISEL-OPTION,
            SD_DATE_LOW  TO T_INTERNAL_FISEL-LOW,
            SD_DATE_HIGH TO T_INTERNAL_FISEL-HIGH.
      APPEND T_INTERNAL_FISEL.
      MOVE: SPACE        TO T_INTERNAL_FISEL,
            'AEDAT'      TO T_INTERNAL_FISEL-FIELDNM,
            'I'          TO T_INTERNAL_FISEL-SIGN,
            'BT'         TO T_INTERNAL_FISEL-OPTION,
            SD_DATE_LOW  TO T_INTERNAL_FISEL-LOW,
            SD_DATE_HIGH TO T_INTERNAL_FISEL-HIGH.
      APPEND T_INTERNAL_FISEL.
    ENDIF.
...function module called in data extraction mode (I_INITFLAG = ' ')..
  ELSE.
...get data...........................................................
    IF S_UPDMODE NE 'S'.
      GET_DELTA_DATA.
    ELSE.                               "Simulation of Delta-Init
      CLEAR S_CURSOR_FLAG.
    ENDIF.
...process selected data..............................................
    REFRESH E_T_DTFIAP_3.
    LOOP AT T_DELTA_DATA.
      CALL FUNCTION 'BWFIU_CONVERT_FIAP_ITEM'
           EXPORTING
                I_S_DELTA_DATA = T_DELTA_DATA
                R_FISCPER      = R_FISCPER
           TABLES
                E_T_DTFIAP_3   = E_T_DTFIAP_3.
    ENDLOOP.
...migration from old extractor 0FI_AP_3 to the new 0FI_AP_4..........
    IF S_UPDMODE = SBIWA_C_UPDMODE_DELTAINIT AND
       S_OLD_SOURCE_ACTIVE = 'X'.
      LOOP AT E_T_DTFIAP_3.
        CALL FUNCTION 'FBW4_INIT_SELECT_CHECK'
             EXPORTING
                  I_OLTPSOURCE = '0FI_AP_3'
                  I_STRUCTURE  = E_T_DTFIAP_3
             EXCEPTIONS
                  INVALID_ITEM = 1
                  OTHERS       = 2.
...reject record, if it is a valid record of the old extractor........
        IF SY-SUBRC NE 1.
          DELETE E_T_DTFIAP_3.
        ENDIF.
      ENDLOOP.
    ENDIF.
...if there is no more data to read: set corresponding flag...........
    IF S_CURSOR_FLAG IS INITIAL.
      NO_MORE_DATA_FLAG = 'X'.
...and write timestamp interval into table BWOM2_TIMEST...............
      CALL FUNCTION 'BWFIT_UPDATE_TIMESTAMPS'
           EXPORTING
                I_OLTPSOURCE = S_ISOURCE
                I_UPDMODE    = S_UPDMODE
                I_DATE_LOW   = SD_DATE_LOW
                I_DATE_HIGH  = SD_DATE_HIGH
                I_TZONE      = SD_TZONE
                I_DAYST      = SD_DAYST
                I_READ_ONLY  = S_READ_ONLY.
    ENDIF.
...delta-init simulation: raise no_more_data..........................
    IF S_UPDMODE = 'S'.
      RAISE NO_MORE_DATA.
    ENDIF.
  ENDIF.
ENDFUNCTION.

Gentlemen,
Please be aware, enhancing GL, AP and AR datasource are completely different then enhanceing LIS datasource or most other datasources. You cannot (the last time I knew) populated fields in the User Exit for GL, AP and AR, to enhance these, you need to follow this OSS message to the "t".
/Steve
OSS message: 410799.
See below OSS message:
Symptom
The extraction structures for datasources 0FI_GL_4 (General ledger: line item), 0FI_AP_4 (vendors: line item) and 0FI_AR_4 (customers: line item) should be enhanced by additional fields.
By doing so, additional information can be transferred for each line item from the R/3 system to the BW system.
Other terms
(for example, customer or vendor master data).
Customer enhancement, extraction structure, extraction, FI_GL, general ledger, FI-AP creditors, FIAP vendors, line items, datasources/infosources:
0FI_GL_4, 0FI_AP_4, 0FI_AR_4
Reason and Prerequisites
There is missing documentation on the customer enhancement of datasources/infosources 0FI_GL_4, 0FI_AP_4, 0FI_AR_4
Solution
In the R/3 source system, the following structures participate in the extraction of line items from the applications FI-GL, FI-AP, FI-AR:
Applic.  datasource read structure extractionsstr.  customer-INCLUDE
FI-GL 0FI_GL_4 BSIS DTFIGL_4 CI_BSIS
FI-AP 0FI_AP_4 BSIK DTFIAP_3 CI_BSIK
FI-AR 0FI_AR_4 BSID DTFIAR_3 CI_BSID
The data sources provide the fields of the assigned extraction structure from the R/3 source system to the BW system.
These extraction structures can be enhanced by creating the respective customer include in the data dictionary of the R/3 source system. After creating this, generate the customer include in the data dictionary.
The fields for the customer enhancement in the customer include has to be filled during the data extraction in the R/3 source system. In doing so, two cases arise:
1. All the fields of the customer enhancement in the customer include are contained in the read structure (see the table above).
           Then no additional action is required. The fields of the customer enhancement are filled automatically by the datasource from the assigned read structure via "move-corresponding".
           Example:
           The extraction structure DTFIGL_4 for datasource 0FI_GL_4 (General ledger: line item) should be enhanced by the VALUT (value date) field.
           To do this, create structure CI_BSIS in the data dictionary of the R/3 source system and include the VALUT field in it. The data dictionary in the R/3 source system shows that the VALUT field is contained in the read structure of the datasource (table BSIS). For that reason the VALUT field is automatically filled by datasource 0FI_GL_4.
           ATTENTION:
           By using Note 430303 you can enhance DataSource 0FI_GL_4 by all fields from table BSEG (instead of BSIS); then the fields are filled automatically in the extractor.
2. Fields of the customer enhancement in the customer include are not contained in the read structure (see the table above).
            In this case you have to program a function module to fill the field of the customer enhancement. To do this, there is a Business Transaction Event available (open FI interface for process 00005021). Create any function module you like and use function module SAMPLE_PROCESS_00005021 as a template for the interface (input parameter, changing parameter).
           Interface of function module SAMPLE_PROCESS_00005021:
            Input-parameter I_OLTPSOURCE: datasource that is currently extracting data from the R/3 source system.
            Changing-Parameter C_STRUCTURE: Extraction structure of the data source currently extracting including fields from the assigned customer include. When you call this customer defined function module, all the fields of the extract structure are transferred filled.
           Check whether the type pool SBIWA is declared in the TOP include of the function group.
If not, add it with the statement TYPE-POOLS: SBIWA.
           Then maintain table TPS31 with Transaction SM30. Create the following entry:
           PROCS LAND APPLK FUNCT
           00005021 <fname>
           <fname> stands for the customer defined function module.
            By doing so, the function module you defined is called for each extracted record. Note that in this case the performance of the extraction may be reduced significantly regardless of the table read and the complexity of the programmed logic.
           Example:
           You want to enhance the extraction structure DTFIAR_3 for datasource 0FI_AR_4 (customers: line item) by the ORT01 (city) field from the customer master record.
            To do this, create structure CI_BSID in data dictionary of the R/3 source system and include the ORT01 field in that. The data dictionary in the R/3 source system displays that the ORT01 field is NOT contained in the read structure of datasource 0FI_AR_4 (Table BSID).
            Therefore you have to program a function module that reads the customer master in the R/3 system (table KANN1) and fills the ORT01 field of the customer enhancement. In the changing parameter C_STRUCTURE the filled fields of the extraction structure DTFIAR_3 are available to you. With the KUNNR field of extraction structure DTFIAR_3, you can select the respective master data record from table KNA1 and determine field ORT01 of the customer enhancement.
After you create the customer include in the R/3 source system you have to postprocess the accompanying datasource with Transaction RSA6. Select the application component according to the above table and change the datasource that fits the customer include. The "Hide fields" flag should be removed in the field list for the fields of the customer include. Then save the field list.
If the fields of the customer include is not displayed in Transaction RSA6, refer to note 415530.
Then you have to replicate the enhanced datasource again in your BW system. Select the infosource that belongs to the datasource in the Administration Workbench of your BW system (Transaction RSA1 --> Modeling --> InfoSources) and replicate the datasource from the R/3 source system (right mouse button on the appropriate R/3 source system for the infosource).
You have to create the appropriate infoobjects for the fields of the customer enhancement in the BW system if they do not already exist.
Then in your BW system make sure that the accompanying infosources (communication structures and transfer rules) and data targets (ODS objects and InfoCubes) have been extended by the new field or infoobject. All the objects which have been changed in the BW system must also be activated there.

Similar Messages

  • Standard Extractors or Generic Extraction

    Hi BW guru's,
    Because in our environment standard extractors are not working at all. so can i go for generic extraction , by creating view on r/3 tables according to the requirement.
    is there any disadvantage in using generic extraction over the "Using Standard Datasources".We are developing reports for PM module.
    Srinivas--

    Srinivas
    No, There are no disadvantages and as you know this is general Practice only. If standard extractors are not suitable obiously we have to go for Generic Extraction method. Another suggestion please see if you could able to use standard extractors with doing enhancements rather than going completly for Generic extraction.
    Hope this helps
    Thnaks
    Sat

  • Generic Extraction (or) How to use table in R/3 system as datasource in BW?

    Hi all,
    Hope all are having a great day
    Can any1 tell me the steps, for Generic Extraction.
    It will be very helpful, if the steps are as much as simpler as posible.
    I know to create a simple cube in BW.
    I have this much knowledge, depending on this can any1 tell me the steps for Generic Extraction from R/3.
    examples wud be vry useful
    Regards,
    Sourav

    hi,
    Maintaining Generic DataSources 
    Use
    Independently of application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any kinds of transparent tables, database views, InfoSets of the SAP query or using a function module. As a result, you can make use of the generic extraction of data.
    Procedure
    Creating a Generic DataSource(RSO2)
           1.      Select the DataSource type and give it a technical name.
           2.      Choose Create.
    The creating a generic DataSource screen appears.
           3.      Choose an application component to which the DataSource is to be assigned.
           4.      Enter the descriptive texts. You can choose any text.
           5.      Choose from which datasets the generic DataSource is to be filled.
                                a.      Choose Extraction from View, if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After generation, you get a DataSource whose extract structure is congruent with the database view or the transparent table view.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
                                b.      Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    Notes on Extraction Using SAP Query
    After generation, you now have a DataSource whose extract structure matches the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
                                c.      Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    Interface Description and Extraction Process Flow
    For information about the function library, see the ABAP Workbench: Tools documentation.
                                d.      With texts, you also have the option of extraction from domain fixed values.
           6.      Maintain the settings for delta transfer where appropriate.
           7.      Choose Save.
    When extracting, look at SAP Query: Assigning to a User Group.
    Note when extracting from a transparent table or view:
    If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
    A screen appears in which you can edit the fields of the extract structure.
           8.      Editing the DataSource:
    &#61601;        Selection
    When scheduling a data  request in the BW Scheduler, you can enter the selection criteria for the data transfer. For example, you may want to determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extract structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
    &#61601;        Hide field
    You should set this indicator to exclude an extract structure field from the data transfer. As a result of your action, the field is no longer made available in BW when setting the transfer rules and generating the transfer structure.
    &#61601;        Inversion
    Reverse postings are possible for customer-defined key figures. For this reason, inversion is only possible for certain transaction data DataSources. These include DataSources that have a field that is indicated as an inversion field, for example, the field update mode in the DataSource 0FI_AP_3. If this field has a value, then the data records are interpreted as reverse records in BW.
    Set the Inversion indicator if you want to carry out a reverse posting for a customer-defined field (key figure). The value of the key figure is then transferred in inverted form (multiplied by –1) into BW.
    &#61601;        Field only known in exit
    You can enhance data by extending the extract structure for a DataSource using fields in append structures.
    The indicator Field only known in Exit is set for fields of an append structure. In other words, by default these fields are not passed onto the extractor from the field list and selection table.
    Deselect the indicator Field Only Known in Exit to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list as well as in the selection table.
    9. Choose DataSource ® Generate.
    The DataSource is now saved in the source system.
    Maintaining Generic DataSources
    •        Change the DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component as well as the texts of a DataSource. Double-clicking on the name of the table, view, InfoSet or extract structure takes you to the appropriate maintenance screen. Here you can make changes required to add new fields. You can fully swap transparent tables and database views, but not InfoSets. If you return to the DataSource maintenance and choose Create, the screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource  ® Generate.
    If you want to test extraction in the source system independently of a BW system, choose DataSource  ®  Test Extraction.
    •        Delta DataSource
    In the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the associated query. If you want to delete a DataSource, this must not be connected to a BW system.
    For more information about extracting using SAP Query, see Extraction using the SAP Query.
    hope this helps.
    assign point if so
    partha

  • Line items  AND GENERIC EXTRACTION

    what does line items exactly mean in DATASOURCES
    AND WHAT ARE DELTA TYPE EXTRACTIONS IN GENERIC
    TIME STAMPING
    CALENDAR DAY
    NUMERICAL POINTER
    COULD ANY PLEASE EXPLAIN THE DIFFERNCE  AND IN WHAT SCENARIOS WE USE IT ...
    LOOKING FOR YOUR REPLY

    Hi Guru,
    Check below doc & thread for Line Item Dimension:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a7f2f294-0501-0010-11bb-80e0d67c3e4a
    Line Item Dimenstion
    If a field (date, progressive document number, timestamp) exists in the extract structure of a DataSource that contains values which increase monotonously over time, you can define delta capability for this DataSource. If such a delta-relevant field exists in the extract structure, such as a timestamp, the system determines the data volume transferred in the delta method by comparing the maximum value transferred with the last load with the amount of data that has since entered the system. Only the data that has newly arrived is transferred.
    To get the delta, generic delta management translates the update mode into a selection criterion. The selection of the request is enhanced with an interval for the delta-relevant field. The lower limit of the interval is known from the previous extraction. The upper limit is taken from the current value, such as the timestamp or the time of extraction. You can use security intervals to ensure that all data is taken into consideration in the extractions (The purpose of a security interval is to make the system take into consideration records that appear during the extraction process but which remain unextracted -since they have yet to be saved- during the next extraction; you have the option of adding a security interval to the upper limit/lower limit of the interval).
    After the data request was transferred to the extractor, and the data was extracted, the extractor then informs generic delta management that the pointer can be set to the upper limit of the previously returned interval.
    To have a clear idea:
    1. If delta field is Date (Record Create Date or change date), then use Upper Limit of 1 day.
    This will load Delta in BW as of yesterday. Leave Lower limit blank.
    2. If delta field is Time Stamp, then use Upper Limit of equal to 1800 Seconds (30 minutes).
    This will load Delta in BW as of 30 minutes old. Leave Lower limit blank.
    3. If delta field is a Numeric Pointer i.e. generated record # like in GLPCA table, then use
    Lower Limit. Use count 10-100. Leave upper limit blank. If value 10 is used then last 10
    records will be loaded again. If a record is created when load was running, those records
    may get lost. To prevent this situation, lower limit can be used to backup the starting
    sequence number. This may result in some records being processed more than once.
    Refer this link from help.sap.com
    http://help.sap.com/saphelp_erp2005/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/frameset.htm
    Difference between timestamp used in copa and generic data extraction?
    COPA timestamps vs Generic timestamps
    Check this doc for more info:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Hope these helps u...
    Regards,
    KK.

  • When we go for Views and Function Modules for Generic Extraction

    Hi Experts,
    Can you please explain when we go for extracting the data using Views and when we got using Function Modules using Generic Extraction from R/3 system to BW with examples. And also can you explain when we go for delta for the above both scenarios.
    Thanks for you help in advance
    Rohith

    Hi,
    Scenario for Extarction using FM
    Imagine the scenario where you need to extract data from
    tables having no common field between them and thereby preventing you from creating a view on top of those tables..
    Or simply consider tables that are highly unrelatd in terms of fields, but you have a requiremnt to extract data from them.
    Also Refer.
    create generic extractor based on 2 tables
    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Steps.
    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
    Scenario for Extraction using View
    If there are more number of tables and data in those tables can be represented using joins then we can use this type of extraction
    For more info Refer these links
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
    Difference between "Help View" and "Search Help"
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
    for more detailed info look on:
    http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
    For GEneric Delta refer these links
    [generic with delta;
    [https://forums.sdn.sap.com/click.jspa?searchID=11388803&messageID=5164737]

  • Generic extraction (table,view,functionmodule)

    hi
    In generic Extaction when we use table and view and function module and sap qu (scenario)
    AND
    plz send some examples
    Please search the forums before posting

    Hi,
    when Standard Extractors are not supporting to your requirement then we go with Generic Extraction.
    Here we have Three different types to design generic extractors
    Table
    View
    Function Module
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    https://websmp103.sap-ag.de/~sapidb/011000358700007535452002
    Hope this will help you.
    Thanks
    Prasad

  • Function Module in a Generic Function Module Extractor

    I want to use a generic function module (ZFM_CONNECTION_DETAIL) in a Generic Function Module based Extractor.
    After Creating, I have checked it in RSA3... Data is showing properly on the Extractor Check.
    And replicated on BW side, after triggering the extractor using infopackageu2026 only one record is coming on the target side (BW).
    And one job is running endless on the source system.
    Generic extractor on the normal code is working properly on both sides.
    But problem occurs while I was using Function Module in the Generic function Module extractor.
    Waiting for a Reply with solution...........
    Hi Siegfried Szameitat,
    I have searched a lot to find out the solution of my Question (Problem). But there is no solution for the problem I have.
    Please let me to find out a proper solution of my issue....
    Thanks

    FUNCTION zcrm_questionnaire.
    Its a full Load...
    Codes are as followed..........
      DATA:lv_times     TYPE i.
      DATA:lv_datapakid TYPE numc4.
      CLEAR:lv_datapakid,lv_times .
      STATICS: s_s_if TYPE srsc_s_if_simple,
               sd_no_more_data  TYPE flag.
      DATA: l_s_select TYPE srsc_s_select.
      DATA :  s_counter_datapakid LIKE sy-tabix,
              s_cursor TYPE cursor.
      RANGES :  date  FOR  zresult_lt-date.
      DATA: lv_count TYPE i VALUE 1.
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check InfoSource validity
        CASE i_dsource.
          WHEN 'ZCRM_QUESTIONNAIRE'.
          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.
        APPEND LINES OF i_t_select TO s_s_if-t_select.
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource   = i_dsource.
        s_s_if-maxsize   = i_maxsize.
        APPEND LINES OF i_t_fields TO s_s_if-t_fields.
      ELSE.                 "Initialization mode or data extraction
        IF NOT sd_no_more_data IS INITIAL.
          RAISE no_more_data.
        ENDIF.
        LOOP AT s_s_if-t_select INTO l_s_select .
          MOVE-CORRESPONDING l_s_select TO date.
        ENDLOOP.
        DATA : v_questionire  TYPE  crm_svy_db_sid.
        DATA : itab_questionire TYPE zsurveyid.
        DATA : e_tt_data_get TYPE  zresult_lt OCCURS 10.
        v_questionire = 'CALL CENTER'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'METER INSTALLATION TEAM'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'METER READING & BILLING'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'NO SUPPLY'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'CASH COLLECTION CENTER'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'STREET LIGHT'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'CONSUMER CARE CENTER'.
        APPEND v_questionire TO itab_questionire.
        v_questionire = 'WEBSITE'.
        APPEND v_questionire TO itab_questionire.
        DATA : counter TYPE i,
              high  LIKE sy-datum,
               low LIKE sy-datum.
        CONCATENATE
        l_s_select-high+6(4)
        l_s_select-high+3(2)
        l_s_select-high+0(2)
        INTO
        high.
        CONCATENATE
        l_s_select-low+6(4)
        l_s_select-low+3(2)
        l_s_select-low+0(2)
        INTO
        low.
        BREAK-POINT.
       do i_maxsize times.
        CALL FUNCTION 'ZCRM_SURVEY_REPORTING'
          EXPORTING
            e_date_frm    = low
            e_date_to     = high
            e_questionire = itab_questionire
          CHANGING
            it_result     = e_tt_data_get.
        IF sy-subrc IS INITIAL.
          e_t_data[] = e_tt_data_get[].
          APPEND e_t_data.
        ELSE.
          EXIT.
        ENDIF.
         sd_no_more_data = 'X'.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    lk

  • Where to find deltas in generic extraction

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

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

  • Bussiness  Scenario for GENERIC   EXTRACTION

    Hi friends,
       can any one  explain me... in what situation we go for Generic Extractions..
    The normal reason is  When  the Bussiness Content  Datasource is not matching with our requirement.. we go for Generic extraction.. 
         I told like this only... but they are not satisfied with my answer.. and they asked .. tell me the  bussiness scenario( in what situation u  done  generic extraction)
      so, friends... could any one plz explain  me any scenario... which you done for generic extraction...
             i will appriciate  by giving   points  to the appropriate  answers..
    Thanks
    babu

    Hi,
    These 2 below links may be helpful,
    <u>GENERIC DATA EXTRACTION USING FUNCTION MODULE</u>
    <u>Difference between Generic Extraction and Enhancement of existing Extractor</u>
    1)Go to RSA6 and find the data source you need to enhance.--> Display
    2)Double click on the Extract structure.
    3)Now click on the append structure button to add the required field on to the existing structure.
    4) add your required fields with ZZ appended to your field.
    5) Save & Activate the append structure. Then go back and make sure you activate the extract structure also.
    6) Now again go back to RSA6 and select your Data Source. But this time go to change Data Source to remove the hide option to the enhanced fields. By default they’ll be in hide mode. If you don’t remove the hide field then this field will not be seen in BW side.
    7) Now go to SE38 to write the logic to populate the data into the enhanced field. Program name to write the logic is ZXRSAU01.
    8) Check + Save + Activate.
    9) Check in RSA3 if data is populated as per your requirement.
    10) Replicate your Data Source.
    11) Now go to Data Source/ Trans. Structure screen. Now you can see the enhanced field on the right hand side.Enhancements:
    <b>Enhancements:BW Side:
    Go to CMOD.</b>
    1. To Save&#61664; give Description &#61664; create&#61664;create new project—give the project name
    2. Select the radio button Enhancement Assignment and give the Enhancement name you want and press Enter.
    3. If the Enhancement is already assigned to some other project it will display the same message saying it is already assigned it some other project. Click on&#61664;
    4. If the Enhancement is not assigned to any project save.
    5. Give RSR00001 (For Variable Exits)
    6. Activate the Project.
    7. and click on the components button.&#61664;Now go to Display
    8. Now Double click on EXIT_SAPLRRS0_001. In that you can see an include ZXRSRU01.
    9. Double click on that include, it will say program name ZX…… are reserved for includes of exit Functions groups.
    10. Just Press Enter.
    11. It’ll Pop-Up a window Create Object.&#61664;saying Include ZX…. Does not exits
    12. That is where you have to write the code for the variable exits. BW: Virtual&#61664;
    13. RSR00002 Chars and Key Figures. BW: Moving Characteristics.&#61664;
    14. RSR00003
    Thanks,
    Aby Jacob

  • Scenarios for Generic extraction

    Hello experts ,
    Please give me some scenarios where we will go for the extraction using
    function module,
    infoset query,
    View.
    Thanks in advance,
    pragya.

    Hi Pragya,
    Generic extractors are of 3 types:
    1. Based on table/view
    2. Based on Infoset Query
    3. Based on Function module
    <i>In some cases Business Content will not give your required data sources , In such scenarios you need to develop your own data sources ( Views / Function modules ) , Then you can bring that data source to BW and use that .
    if you can't find the suitable business content data source then you have to create
    your own data source ( Generic )
    or enhance the given data source.</i>
    <b>Need for customized generic extractor</b>
    Business Content may not have a suitable
    Data Source for your application.
    Business Content may require additional enhancements that need data that is not supplied by SAP BW.
    The application may not have its own generic data extraction method.
    We have used our own custom programs to populate tables in SAP system.
    Please see link below
    <u>http://help.sap.com/saphelp_nw04s/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/frameset.htm</u>
    Good weblogs
    <b>/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    /people/sap.user72/blog/2005/04/19/logistic-cockpit-a-new-deal-overshadowed-by-the-old-fashioned-lis
    /people/sap.user72/blog/2004/12/16/logistic-cockpit-delta-mechanism--episode-one-v3-update-the-145serializer146
    /people/sap.user72/blog/2004/12/23/logistic-cockpit-delta-mechanism--episode-two-v3-update-when-some-problems-can-occur
    /people/sap.user72/blog/2005/01/19/logistic-cockpit-delta-mechanism--episode-three-the-new-update-methods
    Regards, ABY

  • Generic extraction -Infoset

    Hello Gurus,
    I searched a lot on this but could not find Why  and when we do we use Infoset for Generic extraction?
    when i searched the SDN they give info about why a Table/View and Function Module is used but not on Infoset.
    Any document is helpful with a scenario.
    I am asking this query after lot of research itself.
    I read the help and could not understand why joins in Infoset.
    Thanks,
    Sahasra.

    Hi Sahasra,
    Go through the below thread and article, you will get clear idea on when to create and how to to create generic data source using Infoset query
    when we would create genric extractor on a infoset query
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9018e4f3-5537-2e10-238e-ef06d9ab31e8?QuickLink=index&overridelayout=true
    Regards,
    Venkatesh

  • Generic extraction using function module and view

    hi every one ,
    iam new to bw and can anyone plz tell me how to extract the data from R/3 to bw using generic extractor by creating function module and a view
    thank u,
    kishore

    Hi Kishore,
    Check this blog:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Also Check this doc:
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/frameset.htm
    Generic Extractors
    Generic data sources
    Generic DS
    Bye
    Dinesh

  • Errors occurred during the extraction(Generic Extraction)

    Hi All,
    I am facing problems in solving BW Production issues .
    The following are the Problem  details.
    Actually there are two Datasources connected to BW System  One is from R/3 and other is from CRM.
    The problem is with Delta  Request which has been failed in ODS while uploading Data from R/3 in Background Scheduling but other DataSource is loading perfectly into BW System.
    Its a generic extraction created based on View.
    When i checked BW Side the error is displaying as follows:                                                                                Error occurred in the Data Selection.
         Error occurred in the Source System.
            No Data has been extracted from R/3 into BW.
    But when i checked R/3 (Source system)
    Firslty i executed RSA7  for checking Delta Records.  The records are 0 for the Datasource.
    I executed RSA3 with Full UpdateMode, the number of records extracted were displayed
    when i checked with Delta Update Mode its giving the following error.
    Errors occurred during the extraction
    Message no. RJ 012
    Diagnosis
    There was an error during the extraction phase of the extractor. An exception 'error_passed_to_mess_handler' has been triggered.
    Procedure
    Check the function module and the call from the extractor check program
    Messages from source system
    see also Processing Steps Request
    These messages are sent by IDoc from the source system. Both the extractor itself as well as the service API can send messages. When errors occur, several messages are usually sent together.
    From the source system, there are several types of messages that can be differentiated by the so-called Info-IDoc-Status. The IDoc with status 2 plays a particular role here; it describes the number of records that have been extracted in a source system and sent to BW. The number of the records received in BW is checked against this information.
    Regards,
    Chakri
    Message was edited by: Chakri
    Message was edited by: Chakri

    Hi,
    If Idoc are already sent to BW then goto Monitor in BW and in Details tab note the Idoc no in OLTP, and goto R?3 and BD20 tcode and give the Idoc no and execute it.And see the records are came or not in BW.
    Thanks
    Reddy

  • No BERDATUM while generic extraction with LDB ADA

    We do a generic extraction to BW with LDB ADA. Therefore it was created an additional field in InfoSet on note ANLAV, where BERDATE=BERDATUM. BERDATUM is a selection parameter in LDB ADA. In extractor checker BERDATE is not filled.
    Does anybody have an idea what the problem is?
    Regards
    Pramid Mehta

    Hi,
    thanks for that hint. I checked this already. DataSource is ok and the field is not hidden.
    Regards
    Pramid

  • Generic Extraction creation

    HI All,
    I want to extract data from two tables from CRM(Z tables).
    When I goto RSO2 to create a generic data source it is giving me the options of Extract from View,Extract from Info Set and Extract BY FM.
    But when I select Extraction from View it is giving me an option to select from one table only.
    HOw can I extract data from two tables?
    Please help me
    Sridath

    Hi,
    Check the below links, you will get more info on Generic Extraction.
    Generic Extraction:
    http://help.sap.com/saphelp_nw70/helpdata/en/28/4c553c42360a40e10000000a114084/frameset.htm
    Check the link.
    http://www.erpgenie.com/sapgenie/docs/MySAP%20BW%20Cookbook%20Vol%202.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Refer:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Generic Extraction with Table, View, FM & Infoset
    Creating a datasource for generic extraction
    Generic Extraction
    Customer and Generic extraction difference ?
    generic extraction
    Re: Generic extractors
    generic extraction
    Reg
    Pra

Maybe you are looking for