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

Similar Messages

  • 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

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

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

  • Problem in Function Module

    Hi gurus,
      I have created a genric extractor by using function module and i took extract structure as a DB View, FM is working fine, when i am checking the extractor in RSA3 for records, it is showing 0 records.  When i am executing FM, it is showing the data.
    Thanks&Regards
    Phani

    Hey.  The best way would be to set a break point in the FM and just see what's happening.  Couple thoughts...
    1) You may not be passing the data to E_T_DATA, but that is just a guess.  If that is the case, you just need to append the records to E_T_DATA as that is what the FM needs to populate for the records to be processed further/sent to BW.
    2) Is the selection criteria the same when you are running RSA3 and testing the FM?
    Thanks

  • Problem using Function Module IDOC_INBOUND_ASYNCHRONOUS

    Hi friends,
    I have a critical problem load idoc ARTMAS05. I development a program for load the data with idoc but my program call the function module IDOC_INBOUND_ASYNCHRONOUS close my session of the SAP GUI and lose the load. This problem begining today because yesterday was work well. This morning when I'm load the idoc gave to me a short dump with this message "SNAP_NO_NEW_ENTRY" I have find some notes and obtained this note 17537.
    Note Solution
    Solution
    When the SNAP Table is full: Reorganize the table e.g. via Transaction ST22->Go to->Reorganize. Please also refer to Note 16083. This may lead to other errors of this kind since not all dumps e.g. from SM21 can be displayed.
    In case of database problems, the errors should no longer occur with new short dumps after correcting the database error. Here, other errors of this kind may occur in SM21 as well.
    After apply the correction begin the error that I close me the Session of SapGui and lose all my data proccessing. Please need your help.
    Thank and regards..

    Hi Sir,
    I am also facing the same issue...i need to update dependents Information  Date Of Birth n Perid(Which is stored in IT0106)...in IT 0021..
    Kindly correct my code....
    I am using the following code for this...
    data: w_return type  bapireturn1.
    data: p0021_struc TYPE p0021,
          p0106_struc TYPE p0106,
          p_pskey   TYPE pskey.
    start-of-selection.
    get pernr.
    p0021_struc = p0021.
    p0021_struc-favor = 'Gaurav'.
    p0021_struc-fgbdt = '05/10/1955'.
    Move p0021_struc-favor to p0021-favor.
      p0106_struc = p0106.
      p0106_struc-stras = '2235 BOmbay Road'.
      p0106_struc-perid = '123456789'.
      MOVE p0106_struc-stras to p0106-stras.
    Enqueue personnel number
      call function 'BAPI_EMPLOYEE_ENQUEUE'
        exporting
          number = pernr-pernr
        importing
          return = w_return.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty            = p_pskey-infty
          number           = p_pskey-pernr
          subtype          = p_pskey-subty
          objectid         = p_pskey-objps
          lockindicator    = p_pskey-sprps
          validityend      = p0021-endda         " '99991231'
          validitybegin    = p0021-begda
          record           = p0021_struc
          operation        = 'mod'
          tclas            = 'A'
          dialog_mode      = '2'
         nocommit         = p_test
          VIEW_IDENTIFIER  = '07'              "p0003-viekn
          secondary_record = p0106_struc
        IMPORTING
          return           = w_return
         key              = familykey
        EXCEPTIONS
          OTHERS           = 0.
    Enqueue personnel number
      call function 'BAPI_EMPLOYEE_DEQUEUE'
        exporting
          number = pernr-pernr
        importing
          return = w_return.

  • Hi  problems in function module

    Hi friends I have the following problems.........
    When I am using this  following code  in a function module
    its not giving me output until i comment those two fields kwmeng and netwr..i have use VRKME and WAERS  for those two..........which are the components of a structure i have created....unless i comment them its giving dump
    but when i am using the same thing in report...i am getting
    values..off course there is no use of structures......i am creating internal tables and using them ...
    i need to use this functio module...how can i get the data from those two fields..tell me the
    SELECT vbak~vbeln
           vbak~erdat
           vbak~vkorg
           vbak~ABRVW
           vbak~augru
           vbak~kunnr
           vbap~posnr
           vbap~matnr
           vbap~vkaus
           vbap~spart
         vbap~netwr
           vbap~waerk
         vbap~kwmeng
           vbap~kondm
           vbap~mvgr1
           vbap~mvgr2
           vbap~mvgr3
           vbap~mvgr4
           vbap~mvgr5
      FROM vbak AS vbak INNER JOIN vbap AS vbap
      ON vbakvbeln EQ vbapvbeln
      INTO corresponding fields of TABLE tvbak
    WHERE vbak~vbeln = vbeln1.

    there is aproblem witht he last line of your code:
    WHERE vbak~vbeln = vbeln1.
    it should be
    WHERE vbakvbeln = vbapvbeln.
    There is no problem with selection of netwr or Kwmeng .
    Edited by: Rachana Singh on Jan 21, 2008 9:09 AM

  • Problems in Function Module of a Custom Virtual Cube

    Hi all,
    I have copied a Function Module-- RS_BCT_FIGL_DATA_GET_VC10 into a custom one ZRS_BCT_FIGL_DATA_GET_VC10. A custom Virtual Cube(ZFIGL_V10) was also created using this FM. The Function Module and Function Group are activated and there are no syntax errors in the custom FM.
    When I try to check data of this virtual cube using the T-CODE "listcube" it gives me the following errors.
    1. "An exception with the type CX_SY_DYN_CALL_ILLEGAL_FUNC occurred, but was neither handled locally, nor declared in a RAISING"
    2. "The function call failed; the function ZRS_BCT_FIGL_DATA_GET_V10 is either not activated or contains no code"
    Also some queries are not executing in this Virtual Cube.
    Could not figure out what the problem was.Can someone help me on this?
    Thanks
    Maddy

    HI,
    Can you check whether the FM is activated. Also check the function module group is activated or not. You can check the status of the same via SE80.
    Goto SE80 -> Select function grp -> give your function grp and press enter
    Double click on the below funtion grp to check status.
    Also expand FM and check whether it is activated.
    Also check the import and export parameters of the FM. Try to see whether there is any discrepancy.
    If any default values are specified, check whether they are correct.
    Also try to debug, put a breakpoint in your code and check whether it gets into the code or not.
    Regds,
    Shashank

  • Reg: code problem in Function module

    Hi Friends,
    I am facing problem while developing Function module.
    i declared following things in Import.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(SOURCETABLETXT) TYPE  STRING
    *"     VALUE(SELECTTXT) TYPE  STRING
    *"     VALUE(SOURCEINFOOBJECT) TYPE  STRING
    *"     REFERENCE(ITAB_OUTTAB)
    *"     REFERENCE(ITAB_SOURCEPAK)
    In source code writen as,
    DATA DREF1 TYPE REF TO DATA.
    FIELD-SYMBOLS: <ITAB_SPACK> TYPE ANY TABLE,
                        <WA1> TYPE ANY,
    TYPES: BEGIN OF SOURCEIOJ,
            SOURCEINFOOBJECT(72) TYPE C ,
           END OF SOURCEIOJ.
    DATA: ITAB_SOURCEIOJ TYPE TABLE OF SOURCEIOJ.
    DATA: WA_SOURCEIOJ LIKE LINE OF ITAB_SOURCEIOJ.
    ASSIGN ITAB_SOURCEPAK->* TO <ITAB_SPACK>.
    CREATE DATA DREF1 LIKE LINE OF <ITAB_SPACK>.
    ASSIGN DREF1->* TO <WA1>.
    LOOP AT <ITAB_SPACK> assigning <WA1>.
    READ TABLE ITAB_SOURCEIOJ INTO WA_SOURCEIOJ WITH KEY SOURCEINFOOBJECT = <WA1>-SOURCEINFOOBJECT.
    IF SY-SUBRC <> 0.
    WA_SOURCEIOJ-SOURCEINFOOBJECT = <WA1>-SOURCEINFOOBJECT.
    INSERT WA_SOURCEIOJ INTO TABLE ITAB_SOURCEIOJ.
    ENDIF.
    ENDLOOP.
    While checking i am getting error as The data object "<WA1>" has no structure and therefore no componentcalled "SOURCEINFOOBJECT". called "SOURCEINFOOBJECT".
    SOURCEINFOOBJECT is not field in internal table which passing as reference and hence not in WA1.
    But the input field which i give to SOURCEINFOOBJECT while calling the FM, that input field is the part of the intenal table
    <ITAB_SPACK>, which ref of ITAB_SOURCEPAK passing to FM.
    Please give some idea how to handle this.
    Regards
    MRK

    Hey,
    you declared <wa> as field symbol, so it won't contain the field that you are trying to read. Go through the following; it may help you.
    Loop at <ITAB_SPACK> assigning <WA1>.
            do.
              assign component sy-index of structure <wa1> to <dyn_field>.
              if sy-subrc <> 0.
                exit.
              endif.
              if sy-index = 1.
                WA_SOURCEIOJ-SOURCEINFOOBJECT = <dyn_field>.
              else.
                WA_SOURCEIOJ-SOURCEINFOOBJECT = <dyn_field>.
              endif.
            enddo.
           endloop.
    with regards
    Mahesh

  • Urgent: problems in function module extraction

    Hi Gurus,
    I am new to BW and My requirement is to extract the notes from CRM as it is not stored in database tables i used functional module to extract it i have used standard FM RSAX_BIW_GET_DATA_SIMPLE but in that when i map E_T_DATA with my own structure with like or type keyword in tables tab(e.g. E_T_DATA LIKE/TYPE ZCRM_OREDR_STR) i am getting a warning msg "tables parameters are obsolete". Would anyone please suggest me what i need to do. I appreciate it in advance. I def. award points.
    Thanks a lot
    With Regards
    Venkat

    Hi PSG,
    Thanks a lot for quick response. when i use tables it is once again giving an error "The typing method can be 'Like', 'Type', or 'Type Ref To'" I even used all the three than also same problem. Actually it is coming in Function Builder in Tables tabstrip when i use E_T_DATA Like/tables/type/type ref to ZCRM_ORDER_STR I donot know why it is happening. Please would you suggest me what to do.
    Thanks a lot
    With Regards
    Venkat.

  • 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

  • Problem in Functional Module on BW Query

    Hi,
    We are working on below requirement in BW.
    We have to fetch the data of BW Query via a functional module to web services. We have created a query and a functional module based on that query. To create the function module on query, we have followed the standard method suggested in SAP blog. (ie. Input parameters for Functional Module is Filters use in Query and output parameters will be Keyfigures and Char. Of the Query).
    We have 0PLANT in the raw section in query. We want to fetch plant text in the Function module output. But, our problem is we are getting Plant KEY value only in the output of functional module.
    0PLANT properties in query designer is set to TEXT only.
    So, in short, we want to have 0PLANT Text in the function module output.
    Please suggest.
    Regards,
    Macwan James.

    Hi,
    In your Function module, I hope the code is perfect. Please check your Infoobject maintenance whether text was maintained.
    Regards,
    Suman

  • Functional Module Extractor not pulling all the record on BW side

    Hi,
    i have written a FM extractor to pull data from CDHDR and CDPOS table. the Records count shows on RSA3 is more than 3,00,000 but while pulling it on BW side it brings only 41,000  Around records.
    I steps i have taken is -
    tried setting and resetting the package side in Info package.
    Tried putting the default package size to 50K in FM setting
    but nothing is working.
    It seems like the pacet size is not incrementing in the code. i have tired to find ou the fault but coult not and RSA3 is working fine.
    can anyone please suggest a correct piece of code or find out where exactly the fault is?

    Vikrant,
    The structure of your generic extractor function module should be something like:
    If initialisation
      Store parameters, clear packet count
    Else
      If first packet
        Create cursor
      Endif
      Read block of records from cursor
      If cursor returns no more records
        Raise NO_MORE_DATA exception
      Endif
      Process records from cursor and output
      Add one to packet count
    Endif
    This function module code can get called repeatedly.  Possibly you are only extracting data for the first packet?
    Mark

  • 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

  • My second BT ordeal in six months - second attempt

    Oops.. I think I may have only posted the title of this message first time around. Earlier this year, I made what I thought was a simple request to BT to upgrade my broadband from Option 1 to Option 3. This they did, but at the same time they cancell

  • The Thread which won't let go...

    I posted very late last night and those who responded were a big help. Still, even though I changed my code I'm worked my way right around into a big circle and the exact same stopping point. Here is some sample code to try to simplify my complicatio

  • Regarding error in my program

    In the program, when i extend z class i got an error.so when i put an z(){} its working.But the same program when i dont extend class z im not getting the error.why is it so? kindly help me class z int x; z(int a) { System.out.println("parentconstruc

  • Remove Item From Calendar When List Item is Set To Cancelled

    I have created a custom workflow where users submit a request form to a mailing list. The approvers can choose to approve, deny or cancel the request. If the request is approved, it is added to the calendar on the site. The problem that I am having i

  • Issues access 2010 EMC from a remote server

    so I have a little bit of a different issue.  We are currently on 2010 sp3 RU 8v2.  We have created a new Role group for our Helpdesk agents so that they can create new mailboxes and modify existing mailbox but to not be able to delete or disable the