Generic Extraction business Requirement, through function module,

Generic Extraction business Requirement, specifically through function module and source code in function module.

Dear Karthik,
Go to transaction SBIW -> Generic Datasource -> Maintain Generic Datasources -> Choose Master/Transaction Data -> Maintain proper entries (Application Component, Descriptions) -> Extraction by FM if you want to extract using FM.
Maintaining Generic DataSources - 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.
Creating a Generic DataSource
       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.
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.
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.
Maintain the settings for delta transfer where appropriate.
       7.      Choose Save.
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:
       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.
       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.
       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.
       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.
Also visit :[Data Extraction from SAP Source System | http://help.sap.com/saphelp_nw04/helpdata/en/28/4c553c42360a40e10000000a114084/content.htm]
Regards,
Naveen.

Similar Messages

  • Binding Data through function module in adobe to display charts

    Hello Gurus,
    This is the requirement :-
    Through function module output i have to display the chart.
    For ex:-In sales order transaction there is a field called status.For every order there is status (open, complete, inprocess). Display the chart based on the order status that how many open, complete and inprocess are there.
    Thanks,
    Karan

    post Adobe related questions to RIA forum at
    User Interface Technology

  • How to extract data by using function module in generic extraction please

    how to extract data by using function module in generic extraction please  give me steps  required

    Dear Deba,
    Generic Extraction via Function Module
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    If the requirement is like extracting data from multiple tables with some complex logic then views cannot be used..so u cna go for FM is used where it can be achieved.
    Chk these
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    check the following thread
    generic extraction with function module
    Generic Extraction with function module
    Regards,
    Ram.

  • EXtraction through function module

    Hello
    I have craeted generic extractor which is using function module for pulling sales document data..
    Here is the code
    UNCTION ZRSAX_BIW_GET_DATA_SIMPLE.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZBWPRICING OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
      tables: vbak, vbap, konv.
    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,
               ls_s_if type srsc_s_if_simple,
    counter
              s_counter_datapakid like sy-tabix,
    cursor
              s_cursor type cursor.
    Select ranges
      ranges: l_r_vbeln  for vbak-vbeln,
              l_r_erdat  for vbak-erdat,
              l_r_kschl  for konv-kschl,
              l_r_posnr  for vbap-posnr.
    break-point.
    data:
    gv_tabix                type sytabix,
    gs_order                type gts_order,
    gs_konv_hold            type gts_konv,
    gs_konv                 type gts_konv,
    gt_konv                 type gtt_konv.
    statics: gt_order       type gtt_order.
    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 'ZPRICING'.
          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.
        clear: gt_order, gt_order[].
    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 = 'VBELN'.
            move-corresponding l_s_select to l_r_vbeln.
            append l_r_vbeln.
          endloop.
          loop at s_s_if-t_select into l_s_select where fieldnm = 'ERDAT'.
            move-corresponding l_s_select to l_r_erdat.
            append l_r_erdat.
          endloop.
          loop at s_s_if-t_select into l_s_select where fieldnm = 'POSNR'.
            move-corresponding l_s_select to l_r_posnr.
            append l_r_posnr.
          endloop.
    loop at s_s_if-t_select into l_s_select where fieldnm = 'KSCHL'.
            move-corresponding l_s_select to l_r_KSCHL.
            append l_r_KSCHL.
          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.
          select avbeln bposnr aerdat aknumv aauart avkorg
                 from       vbak as a
                 inner join vbap as b on bvbeln eq avbeln
                 appending table gt_order
                 where a~vbeln in l_r_vbeln and
                       a~erdat in l_r_erdat and
                       b~posnr in l_r_posnr.
    Delete Extra fields.
          move: s_s_if-t_fields to ls_s_if-t_fields.
          delete ls_s_if-t_fields
                 where fieldnm eq 'VBELN' or
                       fieldnm eq 'POSNR' or
                       fieldnm eq 'ERDAT' or
                       fieldnm eq 'AUART' or
                       fieldnm eq 'VKORG'.
          open cursor with hold s_cursor for
          select (ls_s_if-t_fields) from konv
                 for all entries in gt_order
                 where knumv eq gt_order-knumv and
                      kposn eq gt_order-posnr. "jlm
                        kposn eq gt_order-posnr and  "jlm
                        kschl in l_r_kschl. "jlm
        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.
          loop at e_t_data.
            move: sy-tabix to gv_tabix.
            read table gt_order into gs_order
                 with key knumv = e_t_data-knumv
                          posnr = e_t_data-kposn.
            check sy-subrc is initial.
            move: gs_order-vbeln to e_t_data-vbeln,
                  gs_order-posnr to e_t_data-posnr,
                  gs_order-erdat to e_t_data-erdat,
                  gs_order-auart to e_t_data-auart,
                  gs_order-vkorg to e_t_data-vkorg .
            modify e_t_data index gv_tabix.
            clear: gs_order, gv_tabix.
          endloop.
          raise no_more_data.
        endif.
        s_counter_datapakid = s_counter_datapakid + 1.
        loop at e_t_data.
          move: sy-tabix to gv_tabix.
          read table gt_order into gs_order
               with key knumv = e_t_data-knumv
                        posnr = e_t_data-kposn.
          check sy-subrc is initial.
          move: gs_order-vbeln to e_t_data-vbeln,
                gs_order-posnr to e_t_data-posnr,
                gs_order-erdat to e_t_data-erdat ,
                gs_order-auart to e_t_data-auart,
                gs_order-vkorg to e_t_data-vkorg .
          modify e_t_data index gv_tabix.
          clear: gs_order, gv_tabix.
        endloop.
      endif.              "Initialization mode or data extraction ?
      loop at e_t_data.
        move: sy-tabix to gv_tabix.
        read table gt_order into gs_order
             with key knumv = e_t_data-knumv
                      posnr = e_t_data-kposn.
        check sy-subrc is initial.
        move: gs_order-vbeln to e_t_data-vbeln,
              gs_order-posnr to e_t_data-posnr,
              gs_order-erdat to e_t_data-erdat ,
              gs_order-auart to e_t_data-auart,
              gs_order-vkorg to e_t_data-vkorg .
        modify e_t_data index gv_tabix.
        clear: gs_order, gv_tabix.
      endloop.
    It works ok if I give selection ERDAT or KSCHL but when I enter ERDAT & KSCHL value it only filters  data based on ERDAT.
    I debugged but everything looks OK..
    can anyone Pls tell me whats is missing here in above code
    Thanks for help
    Regards
    Doug

    Hi Nishu,
    For this u have to write user exit in enhancement RSAP0001.
    A sampe code for that is:
    WHEN '2LIS_11_VAITM'.
        SELECT  * FROM vbak INTO CORRESPONDING FIELDS OF TABLE c_t_data .
        TABLES : vbak.
    *DATA : I_AUDAT LIKE VBAK-AUDAT,
          I_VBELN LIKE VBAK-VBELN occurs 0 with header line.
    *DATA : I_EXT LIKE MC11VA0ITM OCCURS 0 WITH HEADER LINE.
        DATA : i_t_tab LIKE mc11va0itm OCCURS 0 WITH HEADER LINE.
        DATA: BEGIN OF it_vbak OCCURS 0,
                   vbeln TYPE vbak-vbeln,
                   audat TYPE vbak-audat,
                   END OF it_vbak.
        i_t_tab[] = c_t_data[].
        BREAK-POINT.
        SELECT vbeln
               audat
               INTO TABLE it_vbak
               FROM  vbak
               FOR ALL ENTRIES IN i_t_tab
               WHERE vbeln = i_t_tab-vbeln.
        LOOP AT i_t_tab.
          READ TABLE it_vbak WITH KEY
                               vbeln = i_t_tab-vbeln.
          IF sy-subrc = 0.
            i_t_tab-zzaudat      = it_vbak-audat.
            MODIFY i_t_tab.
            CLEAR : i_t_tab,it_vbak.
          ENDIF.
        ENDLOOP.
        c_t_data[] = i_t_tab[].
        REFRESH : i_t_tab,it_vbak.
    I think u know where to write this.
    Vinod.
    Assign points if helpful.

  • Generic data extractor using a function module

    Hi All,
    I want to create a generic data extractor using a function module within the BW system. i.e. the extractor will run in BW and and store the data in a cube( in BW). No R/3 is invloved. I proceeded as follows:
    1. Created a structure through se11.
    2. Created a function module. But while defining "E_T_DATA" in the "Tables" section of the function module, I am getting the error "TABLES parameters are obsolete". I defined as follows:
    E_T_DATA TYPE ZBW_EXTRACT 
    ZBW_EXTRACT is the name of the structure.
    What should i do in this case ?
    Thanks,
    Satya

    Hello Satya,
    The message "TABLES parameters are obsolete" is just a warning and not an error. The structure of the interface is strict (defined by SAP). You should opt to proceed even if you receive the warning.
    Hope this clarifies.

  • Printing ALV Report output through Function Modules

    Hi All,
    I want to print my ALV Grid output through function modules/statement (not through print option in menu).
    This is because, i am generating a PDF from spool when user clicks on a button. If any changes happened in the ALV output layout, they will be captured in spool through printing it.
    So can you please tell me how to print the ALV Output through FMs or sending the ALV output to spool.
    Thanks & Regards,
    Senthil.
    Edited by: senthil nathan on May 17, 2010 2:49 PM

    Hi Dev,
    Thanks for the reply.
    I want to print the ALV when the user clicks on a button in toolbar. Lets say the user has made some changes to the layout, (E.g hiding a field) and when i print that output it should use the changed layout, If i use the FM suggested by you, i cant acheive this.
    If you try to print this manually, the system uses the changed layout and not the original. Thats why i want to know FMs/statement to print.
    Regards,
    Senthil.

  • Save EAN11 field while creating POrder creation through Function module

    Hi All,
    I want to update EAN11 field in material master while creating Purchase Order through function module. I am using function module BAPI_PO_CREATE1 for creating purchase order. There are no structures in the PO creation FM in which EAN11 field is there. I have also tried using function module MEPO_DOC_ITEM_PROCESS for updating EAN11 field. It is not working. Please suggest some method to do that.
    Note: I am receiving EAN11 through an external system by proxy.
    Thanks,
    Chinmay

    Hi,
    Use BAPI_MATERIAL_SAVEDATA to updat ean numbers for materials.
    tables INTERNATIONALARTNOS is used to update EAN.
    Regards,
    Shanmugavel Chandrasekaran

  • How Procurement cost can be captured in product master through functional module?

    Hi
    I have following Queries
    1) How Procurement cost can be captured in product master through functional module in SAP APO?
    2) How we can transfer procurement cost to product master in SAP APO through BAPI?
    Thanks
    Poorna

    Hi Poorna,
    Could you please check FM /SAPAPO/DM_PRODUCTS_POST.
    Table it_matloc of this FM can used to update Cost .

  • Exporting Custom table through function module

    <b>How can i Export Custom table through function module.</b> when we add some table in the function module table tab it asks for a ref. table which is some table in database .. but i want to add some custom table with some user defined column names..how can i do this
    <b>n plz tell me how to loop thru select options</b>
    i have to loop thru select option and assign all the values to a variable.
    plz help me out
    Message was edited by:
            Karan Chopra

    Hi Karan,
    Do one thing, Just in the tables tab give the name of the table and don't write anything else. no TYPE and no ANY.
    Hope it will resolve issue.
    reward points if useful.
    Regards,
    Atish

  • Possible to trigger output type through Function module?

    Hi,
    Is it possible to trigger output type through Function modules or through some codings or any standard FM's?
    Regards
    Bala.

    You did not specify what area you need to retrigger an output type for, but here is a sample to retrigger a delivery output.
      CALL FUNCTION 'BAPI_LIKP_PROCESS_MSG_DIRECT'
        EXPORTING
      DYNAMICOUTPUTDEVICE       =
          processing                       = PROCESSING
      SORTMESSAGE               = 1
        TABLES
          deliverynumber                 = delnbrs
          outputtype                       = outputs
          messageprotocol              = bapimsgprot
          return                              = bapiret2.
    Thanks

  • Modify TRIP through function module( HRTRV_IF_MODIFY_TRIP )

    Hi Experts,
    I am trying to modify existing trip for employee through function module HRTRV_IF_MODIFY_TRIP in se37 in this i am passing employee no, trip no, framedata and in changing parameter fcode as "MOD". There is also a field as trip_guid whos value i don't know so left it blank. When i execute it in return table show message as "No suitable trip schema could be found".
    Can any one help me in this case. Our java developer using this fmi to change a trip.
    Thanks And Regards
    Ranjeet Singh

    Hi,
    The system tries to read a valid trip schema in table T706S and no relevant entry found.
    Sujay
    PS: Please don't post all bold
    Edited by: Sujay Venkateswaran Krishnakumar on Oct 15, 2010 4:54 PM

  • Delete a Infocube Request  through Function module

    Hi Experts,
    I need to delete a request in Infocube through Function module. i have written a logic which request we have to delete, but i'm unable to find the exact function module to delete particular request.
    Quick response would be appriciated greatly and points will be assigned.
    Regards,
    Navin Achanta

    Hi,
    All the requests of InfoCube are available in table RSICCONT, so u create a function module to delete a records from this table.
    Hope this helps u a lot.........
    Assigning points is the way of saying Thanks in SDN
    Regards
    Ramakrishna Kamurthy

  • How to create delta extraction through function module?

    Hi all,
    So far i have created the data source through full load. But currently i would like to convert the couple of function module generic extraction converted through delta.
    Can anyone let me know how to convert from full load to delta using generic extraction
    thanks

    Hi,
    Try these Links, helps u in getting an idea.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30aefb04-7043-2c10-8e92-941536eebc79?QuickLink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f1a423-02ae-2e10-bd85-bde64e61fe7b?QuickLink=index&overridelayout=true&51947629650864
    Regards,
    Aravind.

  • HOW WE EXTRACT SALES FLOW DATA FROM VBFA TABLE TO BI THROUGH FUNCTION MODUL

    HI EXPERTS,
    i am working on SD. i need how VBFA data extrcted into BI using function module. how to report relationship between SALESORDER- PGI-INVOICE. can anyone help me.
    thanks in advance

    Hi,
    If you are looking for standard extractor then check the metadata repository, and if you want generic extractor then you can take help of RSAX_BIW_GET_DATA_SIMPLE extractor for writing your own extractors.
    Regards,
    Durgesh.

  • Error in extracting data through function module

    Hi All
             Need  ur help .I am extracting data from crm thru function module.I have copied RSAX_BIW_GET_DATA_SIMPLE and modified it by using code.I am getting an error while testing extraction
    Structure I have created ztest_01
    Data Source :zmgc_ds1.
    There 3 crm tables from where data is picked crmd_orderadm_h,crmd_customer_h,crmd_order_index.
    I am attaching the code,can any body help me in correctring the error.Tell me if tthe placing of the code in the template is correct.please give details.
    Error which I got:
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_FUNC', was
      not caught in
    procedure "RSA3_GET_DATA_SIMPLE" "(FUNCTION)", nor was it propagated by a
      RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The program "SAPLRSA3" contains the CALL FUNCTION statement.
    The name of the function module to be called is "ZRSAX_BIW_GET_DATA_SIMPLE_01"
    but "ZRSAX_BIW_GET_DATA_SIMPLE_01" cannot be found in its function group.
    Possible reasons:
    a) The function module "ZRSAX_BIW_GET_DATA_SIMPLE_01" has not been activated.
      Therefore,
        it cannot be found at runtime.
    b) The Function Library contains an incorrect entry for
      "ZRSAX_BIW_GET_DATA_SIMPLE_01".
    c) The function module contains no code, even FUNCTION ... ENDFUNCTION
        is missing.
    You help would be appreciated.
    Don't worry about points,.

    Did you create your function module without problems...assigned the Z* function group? activate the function module? i assume that you copy the function module code and the variables definition on TOP include of RSAX_BIW_GET_DATA_SIMPLE
    Regards
    Message was edited by:
            Oscar Díaz

Maybe you are looking for