R/3 Master Data Extraction Using Function Module

Hi Experts,
   Could you please let me know why & How (Detail procedure) to extract R/3 master data using function module.
  My team manager asked me to extract master data from R/3 for 3 more attributes of info object '0material' which is already defined as data target.
I would like to know why they are extracting data using function module
Thanks

The steps for  creating extractor using Function Module. I
1. Create new Function group (if you have already not done so) in Se80
2. Copy Function module "RSAX_BIW_GET_DATA_SIMPLE" with suitable name.
3. Change the code that populate data.
Following table may give you the guideline for parameters.
Parameter Description
I_REQUNR (import) BW provides this request identifier. It is a system-generated identifier in the form REQU_XXXXXX. BW uses this same identifier in all function module calls that relate to a single load.
I_DSOURCE (import) The name of the generic extractor
I_MAXSIZE (import) The maximum number of records that BW expects to be in each data packet
I_INITFLAG (import) A Boolean flag that indicates if this is the initialization (first) call to the function module
I_READ_ONLY (import) A test flag not needed in most extraction scenarios
I_T_SELECT (table) This table holds any selections from the BW InfoPackage. The function module should examine these selections and only return data that matches the selections.
I_T_FIELD (table) This table holds the fields that BW requests
E_T_DATA (table) The function module fills this table with data records. These records then return to BW as data packets. This table has the same structure as the extract structure defined in the generic DataSource.
NO_MORE_DATA (exception) The function module raises this exception when no more data is available
ERROR_PASSED_TO_MESS_HANDLER (exception) The function module raises this exception if an error occurred during the extraction. It alerts BW to check for error logs.
Change following code to put the selection fields
Select ranges
RANGES: L_R_CARRID FOR SFLIGHT-CARRID,
L_R_CONNID FOR SFLIGHT-CONNID.
Change following to populate data
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.
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.
below links
Re: functionmodule
Re: FM for G. extractor
***Assign points if it helps.**
Regards
CSM Reddy

Similar Messages

  • R/3 Master Data Extraction from Function Module

    Hi Experts,
       I need to extract R/3 Master Data (Attr & Text) using function Module.
      It is already developed and in Live system,I need to extract Master Data for 3 more attributes.
      Could you please specify detailed steps on how to proceed wit this once i made changes to Function Module (ABAP Code),Extract Structure...how shall i proceed once this is done.
    Thanks

    Hi,
    Check the following,
    http://help.sap.com/bp_biv235/BI_EN/html/bw.htm
    business content
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20co-pa%20extraction%203.0x
    https://websmp203.sap-ag.de/co
    http://help.sap.com/saphelp_nw04/helpdata/en/37/5fb13cd0500255e10000000a114084/frameset.htm
    (navigate with expand left nodes)
    also co-pa
    http://help.sap.com/saphelp_nw04/helpdata/en/53/c1143c26b8bc00e10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/fb07ab90-0201-0010-c489-d527d39cc0c6
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1910ab90-0201-0010-eea3-c4ac84080806
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ff61152b-0301-0010-849f-839fec3771f3
    FI-CO 'Data Extraction -Line Item Level-FI-CO'
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a7f2f294-0501-0010-11bb-80e0d67c3e4a
    FI-GL
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/fe943b2bcbd11ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_470/helpdata/en/e1/8e51341a06084de10000009b38f83b/frameset.htm
    http://www.sapgenie.com/sapfunc/fi.htm
    FI-SL
    http://help.sap.com/saphelp_nw2004s/helpdata/en/28/5ccfbb45b01140a3b59298c267604f/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/41/65be27836d300ae10000000a114b54/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ee/cd143c5db89b00e10000000a114084/frameset.htm
    Please reward for the same.

  • Error in Data selection in R/3 Generic Extraction Using function Modules

    Hi Friends,
    I have created a a generic data source using function module to load data from PA0000 and PA0001 Tables ,Function module is working fine when i execute it indipendently and  the data source is also working fine when i extract data using RSA3. it is showing correct no of records 157.
    When loading data into DSO from BW (using 3.x/7.0 flows) data is comming to PSA  all 157 records but in the RSMO the load status is showing yellow when i look into the step by step analysis it is
    data selection successfully started
    Data selection successfully ended
    All Data packets completed.
    are showing in red.
    after and hour time load getting failed and in the error message it is showing " job terminated in source system---> Request set to red"
    it is giving this message wir no RSM 78.
    Please let me know it

    Hi Jerry,
    Thanks for the immediate replay
    But here in my source system job is getting terminated.
    this is the status of job in Job logs.
    the job is running till this step not going ahead.
    Call customer enhancement BW_BTE_CALL_BW204010_E (BTE) with 157 records 
    Result of customer enhancement: 157 records                             
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 301 records     
    Result of customer enhancement: 157 records                             
    Asynchronous send of data package 000001 in task 0002 (1 parallel tasks)
    pl. update me if any idea.

  • 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.

  • Delta Problem while extracting the data by using function module

    Hi Experts,
    I have extracted the data by using Function module, for delta loads I have given Calday and additive delta in Generic delta settings, in BW side I have initialized the data after that I have given delta update option in infopackage and I made process chain also, every day process chain is running successfully but it is showing zero records, but there is a data in Data source (RSA3), means delta is not working.
    What is the problem,
    Is there any another settings for delta loads,
    Please help me to do this,
    Helpful answer will be appreciated with points,
    Regards,
    Venkat

    Hi,
    Try this delta type :NEW STATUS FOR CHANGED RECORDS.
    More information from Nagesh, this information may help
    1. New status for changed Records.
    2. Additive delta.
    New status for changed records means
    New Order
    order no quantity
    1000 10
    order changed to quntity 8. then 2 records will posted 2 BW in first case.
    1000 -10
    1000 8
    if you come to Additve delta.
    for the same case it will send the same record as
    1000 10
    changed records
    1000 -2
    this is the difference. New status with changed records should be used only in association with ODS not cube becoz we don't have overwrite option.
    Additive delta we can use for ODS and Cubes with update mode Addition.
    Regards,
    Satya

  • Delta Extraction Using Function Module ( Customization )

    Dear Experts,
    I want a sample code for Delta Extraction using Function Module ( If it is customized already working code very helpful ), I have already created Function Module but Full update is happening. If I give delta update again it is retrieving all records. It is very urgent, if you have please send me to the following mail ID.
    [email protected]
    Best Regards,
    SGK.

    Hi SGK,
    I've done this for a delta based on a timestamp and it's actually pretty easy.  The basic steps are:
    1) Create an extract structure in SE11.  Make sure the structure has a date or timestamp field in it that you can use for delta.  You'll need to include the field twice if you also want to extract it to BW/BI since once it's chosen as the delta field then it will be hidden in the interface.
    2) Create the extractor function module in SE37.  You can use RSAX_BIW_GET_DATA_SIMPLE as a template.  Make sure your logic restricts the data it retrieves according to the selections that are passed in I_T_SELECT, including restrictions on the delta field.
    3) Create a generic DataSource in RSO2.  Click Extraction by FM then fill in your extract structure and function module.  Click Generic Delta and pick your delta field and the appropriate radio button (time stamp or calendar day).  If your delta field is a timestamp field then be sure to set the upper and lower safety limits to -86400 and 86400 respectively.  This might not be necessary on your version of SAPI but on mine there is a bug where it doesn't translate between system time and UTC (GMT) correctly so this was necessary.
    You don't need to program any special delta handling logic in your function module as long as you restrict the data you retrieve based on the delta field (I_T_SELECT).  This is because the SAPI takes care of catching the init, delta and repeat requests, translating them to the appropriate delta field values, and then passing them to your function module as if it was a full extraction for a specific date or timestamp range.
    Hope this helps!
    Jason

  • Code For Delta Extraction Using Function Module

    Dear Experts,
    I want a sample code for Delta Extraction using Function Module ( If it is customized already working code very helpful ), I have already created Function Module but Full update is happening. If I give delta update again it is retrieving all records. It is very urgent, if you have please send me to the following mail ID.
    [email protected]
    Best Regards,
    SGK.

    Dear KJ,
    Thank for your response. I saw the code that you sent, you have used some ztables like ZSC_DELTA_IP, ZSC_SAFETY_DELTA, ZSC_SET_EXT_TIME
    What are the fields that you have created in these tables , what is use of these tables, can you send the fields that you have used in these tables.
    Thanks & Regards,
    SGK

  • Generic Extraction - Using Function Modules

    Hi Friends,
    Can you pl let me know the step by step process for creating generic extraction using function module?
    Thanks in Advance.
    Regards,
    Ari.
    Please search the forum before posting a thread
    Edited by: Pravender on Aug 5, 2010 7:31 PM

    Hi,
    Plz find this doc.
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33.
    And go this link...
    http://www.sdn.sap.com/irj/scn/advancedsearch?query=genericextractionwithfunctionmadule
    Regards.....KP
    Edited by: kundan.sap on Aug 5, 2010 4:35 PM

  • How to extract the data by using function module?

    hi experts,
    what are the steps i have to fallow to extract the data from R/3 by using FUNCTION MODULE.
    thanks & regards
    venkat

    Hi,
    Extracting data from R/3 extract structure thru function modules
    You can proceed with create function module using SE37, thereu2019s sample in system RSAX_BIW_GET_DATA_SIMPLE,
    You need to know the logic how to populate the structure,
    after that RSO2, create datasource specify extract structure and
    function module,
    activate and replicate to bw.
    Chheers
    Raj

  • 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

  • Error occurred while loading Generic extraction using Function module

    Hi all
    I'm trying to do INIT for Generic Extractor using Function module, but i'm getting error as "Error occurred in the source system"
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
    Job terminated in source system --> Request set to red
    Message no. RSM078
    Can u help plz....

    Hi Vishnu
    This are the Job log details i found in source system...Can u tell what whould be the problem?
    Message
    Job started
    Step 001 started (program SBIE0001, variant &0000000002861, user ID
    Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
    DATASOURCE = ZYFI102
    RLOGSYS    =
    REQUNR     = REQU_D9Y4CZDQULRIHRRVU33KOLQZO
    UPDMODE    = D
    LANGUAGES  = *
             Current Values for Selected Profile Parameters               *
    abap/heap_area_nondia......... 0                                       *
    abap/heap_area_total.......... 10737418240                             *
    abap/heaplimit................ 40000000                                *
    zcsa/installed_languages...... DE                                      *
    zcsa/system_language.......... E                                       *
    ztta/max_memreq_MB............ 2047                                    *
    ztta/roll_area................ 3000000                                 *
    ztta/roll_extension........... 2000000000                              *
    No authorization for Acct type D
    Job cancelled after system exception ERROR_MESSAGE
    Thanks in advance
    Edited by: MohanDP on Feb 25, 2011 11:58 AM
    Edited by: MohanDP on Feb 25, 2011 12:01 PM

  • Creation of Generic Data source using function module based on the program which was used to created ABAP report

    Hi,
    We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
    Thanks,
    Ravi

    Hi,
    Step1-Create a table structure which you need to create same as the fields you require in you data source.
    Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
    Step 3-create infoset query.In the infoset query give your table structure name and  program name which you developed.
    Step4-create data source on top of that query

  • Generic delta extraction using function module

    Hi.
    I have a generic datasource , extraction being performed by a function module. The extraction works fine in full update mode. The extract structure has a timestamp field.
    I have enabled generic delta using this field(i.e., marked this field in RSO2). I understand that with this setting, I should be able to get delta data when I do a delta request. But it does not seem to happen.
    I checked the ROOSPRMSC table for the last(local) timestamp stored there. Now when I do the delta upload I expect to see only those records which are younger than the stored timestamp of last upload.
    But I still get the entire set of records.
    Questions are :
    1. Do I need to explicitly code for fetching the delta in the extractor ?
    2. If not, what could be the reason why generic delta is not working ?
    Thanks and regards,
    Anuradha

    Hi GFV,
    I read-up all the forum entries on this topic but could not find anything specifically dealing with my problem. I have browsed through the how-to paper on generic delta as well.
    I am quite sure that we don't need any special coding in the extrator for generating delta generically. Even the how-to paper does not mention that.
    I have used the FM RSAX_BIW_GET_DATA_SIMPLE as a template
    for my extractor(as suggested by F1 help in RSO2). This FM does not even have the i_updmode flag in its interface. 
    Thus this function module always does full extraction and I expect the system to take care of delta using the timestamp field.
    Are these assumptions incorrect ?
    Regards,
    Anuradha

  • Generic Extraction using Function Module

    i want to know the step by step procedure for this extraction and also why we need to go for this, i mean in which scenario this is the best method. and do we need to write any abap code for doing this.and also i need what alla transaction codes we use including concepts.

    1> I don't have a step by step procedre doc. But, there is a sample fucntion module, RSAX_BIW_GET_DATA_SIMPLE. You can take a look at this to create urs.
    2> It is an alternative to the of using InfoSet query (using ABAP datasource) where you cannot split the data to be extracted into DataPackages. So, it is very helpful for huge extracts.
    3> Yes, you have to write ABAP code for this.
    4> Transactions used.
    Create function module - SE37
    Create DataSource  using FM - RSO2
    that is all!
    Regards,
    Sree
    Message was edited by: Sree Damodararaj

  • Error in Generic extraction using function module

    Hi,
    I have created a generic datasource which will will have the same fields as table tcurr(except client field).
    whenever i am trying to check it in rsa3..it is giving the error"Error in extracting data".
    Can you kindly suggest where is the mistake?
    The code of my function module is as follows:
    TABLES: ZMOHSTRUCT.         "Name of the structure
    DATA: L_S_SELECT TYPE SBIWA_S_SELECT.
    STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize,
    g_counter_datapakid LIKE SY-TABIX,
    g_cursor TYPE CURSOR.
    RANGES: L_R_GDATU  FOR ZMOHSTRUCT-GDATU.
    IF i_initflag = sbiwa_c_flag_on.
    CASE I_ISOURCE.
          WHEN 'ZDSTCURR'.
          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.
    APPEND LINES OF i_t_select TO g_t_select.
    g_s_interface-requnr    = i_requnr.
        g_s_interface-isource   = i_isource.
        g_s_interface-maxsize   = i_maxsize.
    APPEND LINES OF i_t_fields TO g_t_fields.
    ELSE.
      IF g_counter_datapakid = 0.
    LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'GDATU'.
            MOVE-CORRESPONDING l_s_select TO L_R_GDATU.
            APPEND L_R_GDATU.
          ENDLOOP.
    l_maxsize = g_s_interface-maxsize.
         OPEN CURSOR WITH HOLD g_cursor FOR
         SELECT KURST
          FCURR
          TCURR
          GDATU
          UKURS
          FFACT
          TFACT
    FROM TCURR
      WHERE GDATU IN L_R_GDATU.
    ENDIF.
    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.             
    Regards,
    Mohua

    Hi
    Look at below links
    Re: Generic function module for delta - which FM ?
    http://www.jt77.com/business-warehouse/work-flow-03485.html

Maybe you are looking for

  • Urgent: Issue while displaying the PDF Reports Using XDO Common region

    Hi all, In our product code we are trying to display the PDF Reports, using the xdo common region. Previously we were writing the pdf reports direclty onto the response direclty. This displays the report onto the browser but if navigate throw browser

  • How to use BeforeCompose and AfterApply CallBack Customization

    Hi, I have oracle lite running on Windows 2000, I have installed all the samples working fine. I have also created a very application for testing purpose, just one table getting syncronized both ways (front end is a VB application on Windows CE devic

  • Removing system preferences in Network

    I have configured a multitude of network settings in System Preferences. To keep things tidy I would like to remove some of them. How do I go about doing this? 15" PowerBook G4   Mac OS X (10.4.4)   1,25GHz 512 MB RAM

  • Studio Creator drop down Prob

    pls any one help me to sort out this prob. this error is occured in this type of situation i have to drop down , i select value for both (i fill the values using data provider ) after selecting second drop down , i call "auto submit on change" that i

  • Pause and score in this tutorial?

    Hello guys, im new, i didnt knew where to post this, so i choosed this one, if im bad im really sorry... Btw, im "Mudi" introducing in Flash, and wanna be a pro soon ;) camed from C#, VB But anyway back to topic, how do i insert a pause and score in