Function Module Extractor with Delta

I'm very new to working with the BW, so I hope I'm explaining my question in a way that makes sense.
I need to make a BW extractor that pulls data from at least one table, possibly more, and which also calculates some data.
I think the only way I can do that is by using an extractor with a function module.
I've been looking at the examples in function group RSAX, and I think I sort of get it, except for one part.
I'm really confused about how the delta works.
I'm looking at the example: RSAX_BIW_GET_DATA_SIMPLE
Does it even use a delta?
I'm trying to understand how the delta gets passed, and how it gets used to filter the data in the function module.  I'm not sure if it's something I need to code in myself, or if it's something that BW does by itself, or what.
I'm not sure if I'm making sense, but if anyone could help me, I'd appreciate it.

Thanks guys, you've been super helpful so far, so I'm just going to keep asking questions.  I promise to award points at the end
I'm looking at it now, and I think if I change it to read from a table, instead of read from a function module I can use the 'numeric pointer' option for the delta.  (Does that just mean a number?  For example, payroll runid is a number, so I could use that and only get new payroll runs?)
However, there still are some calculated fields they want.  Someone mentioned doing that on the BW side.  How would that work?
Sorry for such vague questions, but any help is really appreciated.

Similar Messages

  • Function Module Extractor with Delta Functionality

    Hi Friends,
         I have to extract the entire data of CDPOS table in R/3 , as its a cluster table I am unable to build a view, I am planning to go for FM extraction, Could someone help me as how to build it with Delta Functionality.
    I think I need to develop the Datasource, with Extract Structure,( Do I need to create a Structure in SE11)  Please help me out .
    Thanks,
    Krish

    Hi,
    you can either use an existing structure or else create one on your own. (SE11).
    The DeltaHandlig fairly easy.
    When having finished the extractor (FunctionModule, Structur and DatasSource), go to the "generic Delta" button and select the relevant field.
    The Generic Delta and its DeltaPointer is managed within the DeltaQueue (RSA7) and works more or less like a selection. Don't think too hard about it in your function module except taht you need to select by this field in your FM.
    Did that come clear?
    hth
    Cheers
    Sven

  • Function Module Extractor with Internal Table

    Hi All,
    I have a need to extract records from a complex SQL Statements, so I will be using different SQL Statements and merging the results in to a single internal table. In the function modules what will happen if I do not use cursor WITH HOLD option, (I know it maintains the cursor position) and what if I directly load into E_T_DATA  from my internal table. How this will affect the datapackage size?
    In the future I will have records beyond 1 million and I am concerned to send all the 1 million record in one package rather than multiple packages during extraction.
    Please give a solution if you have come acroos this kind of situation with your development.
    Thanks,
    Alex.

    Alex,
    I do not see why the complexity of ABAP statements should make you change the data processing logic proposed by SAP by way of the sample Function module.  
    It appears to me that you are changing something knowing fully well its implications and then trying to find a solution for it.
    Good Luck!
    Mathew.

  • Generic FM extractor with Delta

    Hello all,
    I am trying to create a delta function module extractor on a table. I have creation date ANDAT, last change date AEDAT and a deletion flag on the table.
    FM has to handle history, new and changes.
    How can I generate delta? Can I just use RSO2 to set up delta? How can it be done? Also, can I get the code for a generic FM delta extractor?
    Please help.
    Thanks,
    Anirudh.

    Hi Sajeed,
    So, I do not have to handle delta in the extractor at all? Just create a function module based extractor with all the fields and actually take care of delta in the infopackage??
    The creation date is for newly created records and the change date is for changed records.
    My email is [email protected]
    Thanks,
    Anirudh.

  • 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

  • How to Function module extractor

    Can anybody give me a step by step procedure to do a function module extractor ?
    Like the steps that I need to perform even before i start writing my code
    Thanks
    Shruti

    Dear Shruthi,
    Do a Search in SDN .you get lot of threads for FM Extraction ...
    The easiest way to work out with Function Module is to copy the standard one and modify according to your reqirement.
    The standard one is RSAX_BIW_GET_DATA_SIMPLE .
    Dont forget to copy the Function grp RSAX into a custom defined Grp and Modify the Ranges options as per ur req.
    and in Function module, in Sourcecode and Tables, Do modify the E_T_data with ur Generic datasource ,make sure u also modify the select statements within the sourcecode. If you have an idea on ABAP its really easy to work out.
    And regarding the creation of Datasource.
    Its really Simple.
    Goto RSo2.
    Give the name of Datasource.
    Give the Fm name and Extract Struc ( name of D.S only).
    Save and Generate.
    thats it.
    Dont forget to assign points.Its a way of saying thanks.
    Thanks,
    Krishna

  • Function Module extractor extracting as a Single Package?

    Hi All,
    I have created a generic function module extractor, which works fine, but extracts all the records in a single package. The default is set in SBIW as 50000 records. But right now I have only 2500 records. But I changed the packet size to 100 in my info package setting and also specified as 100 with in the function module.
    But still I get all the data come as a single package of 2500. I want to make sure that this extractor will not create any problem in production, so I want to test the data packet size. Any suggestion. I have used he standard function module DATASIMPLE and I do setup I_MAXSIZE as 100 in the IMPORT parameter in the function and hav ethe following code in the function module...
             APPEND mgremp_stru to E_T_DATA.
              mseq = mseq + 1.
              if mseq = 100.
                 G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
                 mseq = 0.
              endif.
        endloop.
        IF SY-SUBRC <> 0.
           RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    Any Suggestions?
    Thx,
    Alex.

    Ramesh,
    The simple truth is that what ever you define as a data structure for E_T_DATA should be exactly matching to your selections in the CUSOR. My scenario is way too trichy not just because too many sqls, but because of the nature of HR Tables. Same field will have two different values such as in one record SOBID refers to Org Unit, in the next record the same is Person and in the next record it is Position. So I should have the same field 3 times in a single record. But it is not possible. SO what I did was found 3 different fields whose length and type are same as what I need and selected them but inside my function module I manipulated with internal tables. So the extractor thinks I declare cursor for the same fields I defined in the data source (the value you use in E_T_DATA) and extract them in the FETCH. In the fetch all it checks internally is that whether the only the CURSOR selected fields are extracted , because you will update the E_T_DATA. I know this is little more than what I explained here, but this is the concept.
    I am planning to have a weblog or a white paper published on this in a week or two.
    If this idea helps assign points.
    Goodluck,
    Alex.

  • Function module call with destination

    Hi,
    how can check if a function module call with destination works or not ?
    How can I debug.
    What can be the reason if it is not calles
    regards
    ertas

    * to chcek the rfc Destination By pass RFC destination name and Connection Type..
    RFC_CHECK_DESTINATION
    or
    RFC_CHECK_DESTINATION_ID
    or
    You can use this FM RFC_VERIFY_DESTINATION if your release is greater than 4.6C.
    Check this sample code from Craig Cmehil's weblog.
    CALL FUNCTION 'RFC_VERIFY_DESTINATION'
      EXPORTING
        DESTINATION = TMP
            TIMEOUT = 10
      EXCEPTIONS
        INTERNAL_FAILURE           = 1
        TIMEOUT                    = 2
        DEST_COMMUNICATION_FAILURE = 3
        DEST_SYSTEM_FAILURE        = 4
        UPDATE_FAILURE             = 5
        NO_UPDATE_AUTHORITY        = 6
        OTHERS                     = 7.
      IF SY-SUBRC EQ '0'.
        "* Do code here
      ENDIF.
    Prabhu

  • Error while using Function module SPELL_AMOUNT with arabic language AR

    Hi ,
    When i am trying to convert the number to words, using function module SPELL_AMOUNT with arabic language(AR),following abend message is coming and FM is getting abended.
    Entry AR 0 1 in table T015Z does not have a delimiter (
    Can you please provide me how to overcome this error?
    Thanks & Regards
    Seshagiri.

    Hi Santosh,
    Thanks for quick inputs.
    And amount is not having any delimitors.
    I have checked in table T015Z and it has entries with AR as SPRAS.
    All entries are having ':' at the beginning of the arabic words,and there is no single entry with ';'.
    All entries with EN as SPRAS are having delimiters ';' at the end of the words.
    Numbers are correctly converted to words in english,but abending in arabic.
    Any idea please.
    Thanks & Regards
    Seshagiri.

  • Enabling FI-SL extractor with delta capability

    I am working on enabling FI-SL (3FI_SL_*) extractor with delta capability.
    Implemented OSS note 328197 successfully and also related OSS notes.
    This works on totals table. Source system is 4.6C
    Tested BW01, BW03 and everything seems to be fine, and shows as if extractor is enabled for delta loads.
    I have done initialization. it works fine and got records.
    But when I do delta - it shows ZERO records.
    In RSA7 also I see Zero records.
    If you have any experience , will you please share with me.
    It's a very urgent one.
    Venu

    Create some records in the source system so that the base tables for this extractor will add some records.
    Then check rsa7 whether it shows any records for next delta.
    As Hari said..there might not be fresh records created or records changed,if you do delta load immediately after an init load.
    cheers,
    Vishvesh

  • Extractor on Function Module Not Passing Deltas

    Hi Experts,
    We have created an extractor on a function module in ERD and initialized it in BWD with no issue. However, when we change a record in ERD, the delta is not passed to BWD. We have debugged the function module and it appears the records are being written to the BW Delta Queue tables but they are not visible in RSA7 and are not picked up by BW. We think there may be a problem in the Decode by Playback method writing the records back to the structure.
    The Generic Delta of the extractor is set to Additive Delta and the Delta Mode is AIM (After images by Delta Queue); however we have tried different modes to no avail. Any insight you can share is appreciated.
    Thanks,
    Michael

    Hi
    In FM check on which fields you have written delta logic, data will populate if we have changes to that field.
    we have some good documents on step by step of creating FM based generic extractors. check if you miss any steps
    http://explore-sapbw.blogspot.in/p/sdn-articles-extraction.html
    Regards,
    Venkatesh

  • Doubt in function module relating to delta upload

    Hi,
        Is there any ABAPer alive around who can tell me how i can write a funtion module to update data to BW side.
    They only tell me data is not going to BW side. Can anyone throw light as to how function module should be structured. I  have a function module that works very finely for full update mode in RSA3. What should be done in my function module for delta update mode to work on BW side?????
    <h1> THIS IS CRITICAL </h1>
    Regards,
    Prakash.K

    Critical?  Why?  Should I respond faster because you've a problem that's urgent for you?
    Does full extraction work when you run the extraction from BW?  Extraction only stops when you return an empty package.  Hence, RSA3 won't tell you if you've made this mistake. RSA3 will work fine, but the extraction will never end when run from BW.  I refer you to this discussion I had earlier. [Re: Transport Organ9izer]  I'll emphasise one important point: Also SAP supply RSAX_BIW_GET_DATA_SIMPLE as an example of how to write FM extractors 
    If your FM is actually working with full, then to get your function module to work as a delta load, you need to be able to determine which data records have changed with since the last extraction, and only send those.  How you do this depends very much on the data.  You'll also have to define the datasource as Generic.
    matt

  • PROBLEM in function module extractor

    Hi ,
    i m facing a problem in creating a function module as extractor in srm but its not working plz letme know the way i can create the zfunction module as extrator.
    i created a datasource ZSRM_CS in which i m using BBP_PDS_CND as extraction structure and Z_BIW_GET_DATA_SIMPLE as zfunction module
    but even wen i use rsa3 in debug mode its not stoping and gives error
    ERROR6 plz letmme know the problem.
    i copied the standard module RSAX_BIW_GET_DATA_SIMPLE .
    n hide the irrelvant things. tell me y its not stoping in debug mode in rsa3
    Thnx
    Regards

    Thnx for ur concern ...but i have already mentioned. my code goes llike this.plz have a luk
    FUNCTION Z_BIW_GET_DATA_SIMPLE.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR OPTIONAL
    *"     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 TYPE  ZT_BBP_PDS_CND OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
      TABLES: ZQUOTATION.
    Auxiliary Selection criteria structure
      DATA : L_S_SELECT TYPE SRSC_S_SELECT.
      DATA : GIT_QTN type table of ZQUOTATION with header line .
      DATA : GIT_TAB type table of BBP_PDS_CND with header line .
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
              S_CURSOR TYPE CURSOR.
    Select ranges
    RANGES: L_R_CARRID  FOR SFLIGHT-CARRID,
             L_R_CONNID  FOR SFLIGHT-CONNID.
    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 '0SAPI_SFLIGHT_SIMPLE'.
         WHEN OTHERS.
          IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like this
           LOG_WRITE 'E'                  "message type
                     'R3'                 "message class
                      '009'                "message number
                     I_DSOURCE   "message variable 1
                    ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
       ENDCASE.
        APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE = I_DSOURCE.
       S_S_IF-MAXSIZE   = I_MAXSIZE.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
       APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
    ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
       IF S_COUNTER_DATAPAKID = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
       select * from ZQUOTATION
                into table GIT_QTN .
       LOOP AT GIT_QTN .
        CALL FUNCTION 'BBP_PDCND_GETDETAIL'
          EXPORTING
            i_p_guid                      = GIT_QTN-GUID1
           I_P_KIND                      = 'B'
           I_OBJECT_TYPE                 = GIT_QTN-OBJECT_TYPEH
         IV_VERSION_TYPE               = ' '
            iv_header_guid                = GIT_QTN-HEADER
          IV_WITH_DELETED_RECORDS       = ' '
         IMPORTING
           ET_CONDITIONS                 = GIT_TAB
          E_COM                         =
        TABLES
          E_T_DATA                      =
          MOVE-CORRESPONDING GIT_TAB TO E_T_DATA.
        ENDLOOP.
         LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CARRID'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
           APPEND L_R_CARRID.
         ENDLOOP.
         LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
           APPEND L_R_CONNID.
         ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
         OPEN CURSOR WITH HOLD S_CURSOR FOR
         SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
                                  WHERE CARRID  IN L_R_CARRID AND
                                        CONNID  IN L_R_CONNID.
       ENDIF.                             "First data package ?
    Fetch records into interface table.
      named E_T_'Name of extract structure'.
       FETCH NEXT CURSOR S_CURSOR
                  APPENDING CORRESPONDING FIELDS
                  OF TABLE E_T_DATA
                  PACKAGE SIZE S_S_IF-MAXSIZE.
       IF SY-SUBRC <> 0.
         CLOSE CURSOR S_CURSOR.
         RAISE NO_MORE_DATA.
       ENDIF.
       S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    plz letme know where i m wrong in code,
    wt my code is doing its picking the GUID! and header from view zquation and through fm 'BBP_PDCND_GETDETAIL' its returning et conditions whichi have to pass to data source .
    Thnx

  • Functional module extractor for INDX

    Help to write please an optimum code of the functional module for an extractor from table INDX

    While in the functional module on the basis of RSAX_BIW_GET_DATA_SIMPLE ' has made the following
    * Data transfer: First Call      OPEN CURSOR + FETCH
    *                Following Calls FETCH only
    * íà÷àëî îáðàáîòêè
    * First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
    delete from zdbasetable1.
    import inttable1 inttable2 inttable3 from database INDX(IM) ID 'IDENT'.
    loop at inttable1.
      move-corresponding inttable1 to zdbasetable1.
      modify zdbasetable1.
      clear  zdbasetable1.
    endloop.
          OPEN CURSOR WITH HOLD S_CURSOR FOR
          SELECT (S_S_IF-T_FIELDS) FROM zdbasetable1.
        ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR S_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.
    But it would be desirable, without use database table - zdbasetable1

  • Create Function Module  Extractor

    Hello Friends, Please help me in developing the extractor. I want to write the custom extractor using the three Table fields FAGLFLEXA and FAGLFLEXT with some logic to merge data. if you have any abap code. please email me at [email protected] will be very thankful for the help. i do not want to use the generic datasource. want to use the finction module option beacuse the logic is there from 3-4 tables.
    Thanks
    Soniya Kapoor

    Refer to sample function module RSA3_GET_DATA_SIMPLE. it's on every system.
    Tomer.
    FUNCTION RSA3_GET_DATA_SIMPLE.
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"             VALUE(I_CHABASNM) TYPE  SBIWA_S_INTERFACE-CHABASNM
    *"                             OPTIONAL
    *"             VALUE(I_ISOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE
    *"                             OPTIONAL
    *"             VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE
    *"                             OPTIONAL
    *"             VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG
    *"                             OPTIONAL
    *"             VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE
    *"                             OPTIONAL
    *"             VALUE(I_DATAPAKID) TYPE  SBIWA_S_INTERFACE-DATAPAKID
    *"                             OPTIONAL
    *"             VALUE(I_RLOGSYS) TYPE  SRSC_S_INTERFACE-RLOGSYS
    *"                             OPTIONAL
    *"       TABLES
    *"              I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"              I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"              E_T_DATA OPTIONAL
    *"       EXCEPTIONS
    *"              NO_MORE_DATA
    *"              ERROR_PASSED_TO_MESS_HANDLER
      STATICS: S_S_IF_SIMPLE TYPE SRSC_S_IF_SIMPLE,
               S_FNAME     LIKE TFDIR-FUNCNAME.
      IF I_INITFLAG = 'X'.
    *====== INIT ===========================================================
    *------ create interface structure -
        S_S_IF_SIMPLE-REQUNR = I_REQUNR.
        IF NOT I_ISOURCE IS INITIAL.
          S_S_IF_SIMPLE-DSOURCE = I_ISOURCE.
        ELSE.
          S_S_IF_SIMPLE-DSOURCE = I_CHABASNM.
        ENDIF.
        S_S_IF_SIMPLE-MAXSIZE = I_MAXSIZE.
        S_S_IF_SIMPLE-INITFLAG = I_INITFLAG.
        APPEND LINES OF I_T_SELECT TO S_S_IF_SIMPLE-T_SELECT.
        APPEND LINES OF I_T_FIELDS TO S_S_IF_SIMPLE-T_FIELDS.
        DATA L_S_OSOURCE TYPE RSAOT_S_OSOURCE.
        CALL FUNCTION 'RSA1_SINGLE_OLTPSOURCE_GET'
             EXPORTING
                  I_OLTPSOURCE    = S_S_IF_SIMPLE-DSOURCE
             IMPORTING
                  E_S_OLTPSOURCE  = L_S_OSOURCE.
       S_FNAME = L_S_OSOURCE-EXTRACTOR.
    call extractor in init mode -
        DATA L_DEBUG(1).
        IMPORT L_DEBUG FROM MEMORY ID 'RSFH_DBG'.
        IF L_DEBUG = RSFH_C_DEBUG_LATE.
          BREAK-POINT.                                        "#EC NOBREAK
        ENDIF.
        CALL FUNCTION S_FNAME
             EXPORTING
                  I_REQUNR                     = S_S_IF_SIMPLE-REQUNR
                  I_DSOURCE                    = S_S_IF_SIMPLE-DSOURCE
                  I_MAXSIZE                    = S_S_IF_SIMPLE-MAXSIZE
                  I_INITFLAG                   = S_S_IF_SIMPLE-INITFLAG
             TABLES
                  I_T_SELECT                   = S_S_IF_SIMPLE-T_SELECT
                  I_T_FIELDS                   = S_S_IF_SIMPLE-T_FIELDS
             EXCEPTIONS
                  NO_MORE_DATA                 = 1
                  ERROR_PASSED_TO_MESS_HANDLER = 2
                  OTHERS.
      ELSE.
    *======= FETCH =========================================================
        REFRESH E_T_DATA.
        CLEAR E_T_DATA.
        CLEAR S_S_IF_SIMPLE-INITFLAG.
        CALL FUNCTION S_FNAME
             EXPORTING
                  I_REQUNR                     = S_S_IF_SIMPLE-REQUNR
                  I_ISOURCE                    = S_S_IF_SIMPLE-DSOURCE
                  I_DSOURCE                    = S_S_IF_SIMPLE-DSOURCE "30C
                  I_MAXSIZE                    = S_S_IF_SIMPLE-MAXSIZE
                  I_INITFLAG                   = S_S_IF_SIMPLE-INITFLAG
             TABLES
                  I_T_SELECT                   = S_S_IF_SIMPLE-T_SELECT
                  I_T_FIELDS                   = S_S_IF_SIMPLE-T_FIELDS
                  E_T_DATA                     = E_T_DATA
             EXCEPTIONS
                  NO_MORE_DATA                 = 1
                  ERROR_PASSED_TO_MESS_HANDLER = 2
                  OTHERS                       = 3.
      ENDIF.
    *========= ERROR HANDLING ==============================================
      CASE SY-SUBRC.
        WHEN '0'.
        WHEN '1'. RAISE NO_MORE_DATA.
        WHEN '2'.
          LOG_WRITE SY-MSGTY SY-MSGID SY-MSGNO SY-MSGV1 SY-MSGV2.
          RAISE ERROR_PASSED_TO_MESS_HANDLER.
        WHEN OTHERS.
          LOG_WRITE SY-MSGTY SY-MSGID SY-MSGNO SY-MSGV1 SY-MSGV2.
          RAISE ERROR_PASSED_TO_MESS_HANDLER.
      ENDCASE.
    ENDFUNCTION.

Maybe you are looking for

  • I got an old/lost iPhone. How do I reboot the phone and tie it to my own apple-id/iCloud?

    I lost my phone, but luckily I got an old/lost iphone from my work. It had been in a box with forgotten stuff for more than 6 months, so everybody assumed that the previous owner wouldn't care to get it back (they even called the number shown on the

  • Issues with external hard drive

    hello, i recently purchased a seagate external hard drive 2TB. i am trying to copy videos onto the external hard drive from my macbook( mac osx version 10.6.3 but the files wont copy. i checked the details of the external hard drive, formatted for wi

  • Unable to achieve Gigabit speeds with onboard NIC (iMAC Intel based)

    Hi, I've recently noticed that my iMAC's built in 10/100/1000 NIC is only negotiating up to 100mb. I have a direct (cat5e straight through) connection from the iMAC to a 10/100/1000 port on an Airport Extreme Base station. I've tried several differen

  • Monitor tearing issue...

    Win7 PPro CC2014 and CC I am observing "tearing" on monitors* in both CC versions of PPro since upgrading to CC2014 (which required updating Nvidia Driver on install.) Geforce GTX 670 4GB 5DDR - Driver 337.88 (19/5/14) Monitors affected...*Source , P

  • Xorg - help with rotation on dual monitor setup

    i have two monitors that im trying to get rotated properly but im having some trouble. i think its easiest to list out what i have going on here... 1. im using a BFG nvidia geforce 7600 with the nvidia driver, and everything on the system is up to da