Extractor based on function module

I have create an extractor based on
A function module: ZSALESTEXT_EXTRACT
Extract structure: ZOXDT20030
When I execute this extractor on debug mode, as the function module ZSALESTEXT_EXTRACT is called I have a short dump with the following message:
Since the caller of the procedure could not have expected this exception    
to occur, the running program was terminated.                              
The reason for the exception is:                                            
When calling the function module "ZSALESTEXT_EXTRACT", one of the parameters
needed according to the interface description was not specified.                                                                               
This parameter was "E_T_DATA".                                              
Do you know what's happen ?
Many thanks
Annexe Function module code :
FUNCTION ZSALESTEXT_EXTRACT.
""Local interface:
*"  TABLES
*"      E_T_DATA STRUCTURE  ZOXDT20030
*"      SELECTION STRUCTURE  RSSELECT
Data: D_NAME LIKE THEAD-TDNAME,
d_vbeln like vbap-vbeln,
d_posnr like vbap-posnr,
d_date1 like vbap-aedat,
d_date2 like vbap-aedat,
TRESULT LIKE TLINE occurs 1 with header line.
*internal table
Types: BEGIN OF SalesTextTable,
         VBELN Like VBAP-VBELN,
         POSNR  Like VBAP-POSNR,
         TextMST    Like TLINE-TDLINE,
         TextKPI    Like TLINE-TDLINE,
       END OF SalesTextTable.
*Tables:   Like SalesTextTable with header line.
DATA: ITAB TYPE TABLE OF SalesTextTable with header line
      WITH KEY              VBELN
                            POSNR,
      WA_ITAB LIKE LINE OF ITAB.
LOOP AT SELECTION WHERE FIELDNM EQ 'DATE1'.
  d_date1 = SELECTION-LOW.
ENDLOOP.
LOOP AT SELECTION WHERE FIELDNM EQ 'DATE2'.
  d_date2 = SELECTION-LOW.
ENDLOOP.
Select VBELN POSNR
  into corresponding fields of table ITAB
  from VBAP
  where AEDAT between d_date1 and d_date2.
Loop at ITAB into WA_ITAB.
Concatenate WA_ITAB-VBELN WA_ITAB-POSNR into d_name.
*     Material Sales Text
CALL FUNCTION 'ZSALES_ORDER_TEXT_BW'
  EXPORTING
  CLIENT                        = SY-MANDT
    ID                            = '0001'
    LANGUAGE                      = 'E'
    NAME                          = d_name
    OBJECT                        = 'VBBP'
  TABLES
    LINES                         = TRESULT.
If sy-subrc = 0.
  Read table TRESULT index 1.
E_T_DATA-TextMST = TRESULT-TDLINE.
  refresh TRESULT.
  clear TRESULT.
endif.
*     KPI Comment
CALL FUNCTION 'ZSALES_ORDER_TEXT_BW'
  EXPORTING
  CLIENT                        = SY-MANDT
    ID                            = 'Z004'
    LANGUAGE                      = 'E'
    NAME                          = d_name
    OBJECT                        = 'VBBP'
  TABLES
    LINES                         = TRESULT.
If sy-subrc = 0.
Read table TRESULT index 1.
E_T_DATA-TextKPIC = TRESULT-TDLINE.
   clear TRESULT.
endif.
E_T_DATA-SALES_ORDER = WA_ITAB-VBELN.
E_T_DATA-SALES_ITEM = WA_ITAB-POSNR.
Append E_T_DATA.
endloop.
ENDFUNCTION.

This FM does not have the correct import parameters. Have a look at RSAX_BIW_GET_DATA_SIMPLE.
FUNCTION RSAX_BIW_GET_DATA_SIMPLE.
""Lokale Schnittstelle:
*"  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
*"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*"  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  SFLIGHT OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
Your FM will be called from the service API and must have the same parameters as this same FM.
Cheers
Aneesh

Similar Messages

  • Error while creating a extractor based on Functional Module

    Hi,
    I am building an extactor based on afunction module.I created a DS and created a structure in Se11.When i am trying to put the extract structure in the Tables tab of the function module it gives me an error saying Tables parameters are obselete and doesnt allow me to activate or go back and front to other tabs.Can anyone please tell me what might be the reason?
    Thanks,

    Hi,
            Just try to reactivate the structure once again. And when you open the function module, if the problem still persists just try to press Return key several times. The message you are getting is just a warning message.
    PS: I am not sure whether this is the correct way, but i personally resolved this by pressing the ENTER key 4 or 5 times. So just give a try.
    Regards
    Sunil

  • Generic Data Source Based On Function Module (Delta capable)

    Hi,
    My requirement is to develop a Generic Extractor based on Function Module (Delta capable). As I already found many threads explaining this concept, but most of them discussing FM RSAX_BIW_GET_DATA_SIMPLE with Extraction Method F2. There is another FM RSAX_BIW_GET_DATA which, one can use to build delta enabled extractor.
    Although I do have some doubts:
    what is the E_T_SOURCE_STRUCTURE_NAME ?
    read table i_t_select into l_s_select with key fieldnm = 'PGMID'. Use of this code ?
    Templet only showing
    case i_updmode.
          when 'F'.
          when others.
            if 1 = 2. message e011(r3). endif.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '011'                "message number
                      i_updmode            "message variable 1
                      ' '.                 "message variable 2
            raise error_passed_to_mess_handler.
        endcase.
    i.upmode as F, D(delta) is not included, do i need to include this?
    Can someone help to solve this. Appropriate points will be allotted to helpful suggestions.
    Edited by: Debjit_Singha_86 on Jul 23, 2011 8:35 AM

    Try using following piece of code;
    READ TABLE g_t_select INTO l_s_select
                                 WITH KEY fieldnm = 'Date Field for Delta'.
          IF sy-subrc EQ 0.
    SELECT SINGLE *
                           FROM ROOSGENDLM
                           WHERE oltpsource EQ 'DataSource Nameu2019
                           AND slogsys      EQ lw_slogsys.
              IF sy-subrc EQ 0.                                            
                lw_date = roosgendlm-deltaid+0(8).
                lw_time = roosgendlm-deltaid+8(6).
                                                                                    ENDIF.                       " IF SY-SUBRC EQ 0.
    ENDIF.
    OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT * FROM TABLE
                                   WHERE  CPUDT     GE   lw_date   AND
                                               CPUTIME  GE   lw_time.
        ENDIF.                            
    Table R00SGEMDLM stores the date and time data was last extracted from a data source.
    Alternatively, you can also try using the i_updmode.
    When 'F'.
    SELECT * FROM TABLE (without any where clause on last change date)
    When 'D'
    SELECT * FROM TABLE
                                   WHERE  CPUDT     GE   lw_date   AND
                                               CPUTIME  GE   lw_time.
    These are just suggestions. Try these out, I hope it helps.
    Regards,
    Gaurav

  • Problem with R/3 Data Source based on Function module in SAP BI

    Hi,
    We have a data source based on functional module. When we load data from R/3 to BI we face the following error.
    " No end-confirmation arrived in the Warehouse from the source system."
    We are getting data but due to no end confirmation from the source system, the load become timed-out and status becomes "RED". When we change the status to be "GREEN" and proceed tha load further, load is fine.
    Please suggest us a suitable solution.
    Thanks in Advance,
    Geetha

    Hi Geetha Devi Ramalingam.
    I faced the same problem since yesterday. I just resolve the issue.
    So here is my solution :
    try this code :
        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.
    if you add your
    bold
    IF sy-subrc <> 0.
          CLOSE CURSOR s_cursor.
          RAISE no_more_data.
        ENDIF.
    bold
    than the sy-subrc may be equal and than your CLOSE CURSOR s_cursor. will have no effect
    it work for me hope it will for u
    Hard luck!
    Salah
    Edited by: idrissi salaheddine on Jan 19, 2012 12:24 PM

  • How to create a generic data extractor using standard function module

    Hi,
    I have to generate report based on Function module(standard FM),client know only Fm Name n they have given FM Name n asked reports based on that, so can any one give me steps to create DS based on that.
    Thanks,
    Swapna

    check this blog
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    and this pdf:
    Generik extraction: https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    Generic delta:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Edited by: Aduri on Dec 17, 2007 4:04 PM

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

  • Howt 2 delta with the extractor created on Function Module..

    hi there,
    can anybody tell me how to update delta with the extractor created on Function Module..
    rgds,
    amol

    refer to the document at the below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Generic Extractor using FM with Delta Logic
    hope it helps,
    rgs,
    Parth.
    Edited by: Partho Mukherjee on Jan 12, 2009 6:00 PM

  • How to do Delta upload using Generic Extractor built on Function Module?

    Hello Guys,
    I have never created a Generic Extractor using a Function Module. I wanted to know how can we support Delta mechanism if we create Generic extractor using Function Module.
    Regards,
    Abhishek

    Hi Abishek,
    Please check the standard Function Module RSAX_BIW_GET_DATA for your delta mechnism.
    Hope it will help you.
    Thanks,
    Chandra

  • Extractor development for Function Module

    This is new project and we are working on Generic Extractor development with Function Modules. I am having a Function Module developed by the ABAP person, now I need to develop Extractor for this Function Module.
    Could anybody please give the steps for this.
    Thanks in advance
    Prasad

    Thanks, I created the FM. It is extracting more no records and sometimes the running is inifinit.
    And one thing in RSA3 Display Extr. Calls if i keep that 10 the extractor extracting records 10 times.
    What is the problem and what would be the solution.
    Thanks and regards,
    Prasad.
    And one thing I am unable to find this posted and answered questions from this forum, where can i check these answers after i logged into this forum.

  • Runtime Error while extracting data by datasource based on function module

    Hi all,
    I am facing an issue while extracting data from a customised data source based on a new function module.
    The datasource is extracting data successfully for only 15000 records but after that the runtime error is displayed.
    I am not able to extract whole data from R/3 system.
    Please take a look into the details and tell me what should I have to do.
    Details of Issue:
    Runtime Error : GETWA_NOT_ASSIGNED
    What happened?                                                                               
    Error in the ABAP Application Program                                                        
    The current ABAP program "SAPLZ_99Z_BW_SD_PRICING"had to be terminated because  it has  come across a statement that unfortunately cannot be executed.
    Error analysis                                                                               
    You attempted to access an unassigned field symbol                                          
        (data segment 32790).                                                                               
    This error may occur if                                                                   
        - You address a typed field symbol before it has been set with                               
          ASSIGN                                                                               
    - You address a field symbol that pointed to the line of an                              
          internal table that was deleted                                                          
        - You address a field symbol that was previously reset using                           
          UNASSIGN or that pointed to a local field that no                                        
          longer exists                                                                               
    - You address a global function interface, although the                                      
      respective function module is not active - that is, is                                  
          not in the list of active calls. The list of active calls                                 
          can be taken from this short dump. 
    Edited by: anshu13 on Apr 27, 2010 10:28 AM

    The code is displayed here:
    error is in line no. 625
    Source Code Extract                                                                               
    Line SourceCde                                         
      595            <fs_fldval> = l_fieldval.
      596            APPEND <fs_dyntable> TO <it_dyntable>.                               
      597            CLEAR :l_fieldval, wa_fldcat.                                                  
      598            CLEAR l_totlength.                                                             
      599            CLEAR <fs_dyntable>.                                                        
      600         ENDIF.                                                                           
      601        ENDIF.                                                                               
    602        MOVE-CORRESPONDING <dd03l_fields> TO wa_dd03l.                                    
      603        IF <dd03l_fields>-datatype EQ 'DATS'.                                             
      604          l_fieldval = 'X'.                                                                
      605       ELSE.                                                                               
    606        SHIFT <dd03l_fields>-intlen LEFT DELETING LEADING '0'.                         
      607          IF l_totlength IS INITIAL.                                                       
      608            SHIFT l_totlength LEFT DELETING LEADING '0'.                                   
      609            l_totlength = '0'.                                                            
      610          ENDIF.                                                                           
      611          l_currlength = <dd03l_fields>-intlen.                                            
      612          CONCATENATE l_totlength '('  l_currlength ') ' INTO l_fieldval .                 
      613          l_totlength = l_totlength + l_currlength.                                        
      614        ENDIF.                                                                               
    615*** Consider both field name and domian name for checking in range list:                   
      616        IF <dd03l_fields>-fieldname IN s_fieldlist.                                        
      617          wa_fldcat-fieldname = <dd03l_fields>-fieldname.                                  
      618        ELSEIF <dd03l_fields>-domname IN s_fieldlist.                                      
      619          wa_fldcat-fieldname = <dd03l_fields>-domname.                                    
      620        ELSE.                                                                               
    621          wa_fldcat-fieldname = <dd03l_fields>-fieldname.                                  
      622        ENDIF.                                                                               
    623        ASSIGN COMPONENT wa_fldcat-fieldname                                               
      624             OF STRUCTURE <fs_dyntable> TO <fs_fldval>.                                    
    >>>>|        <fsfldval> = l_fieldval._                                                             
      626        CLEAR l_fieldval.                                                                  
      627        CLEAR l_currlength.                                                                
      628      ELSE.                                                                               
    629        IF <dd03l_fields>-datatype EQ 'DATS'.                                              
      630          l_fieldval = 'X'.                                                                
      631       ELSE.                                                                               
    632          SHIFT <dd03l_fields>-intlen LEFT DELETING LEADING '0'.                           
      633          IF l_totlength IS INITIAL.                                                       
      634            SHIFT l_totlength LEFT DELETING LEADING '0'.                                   
      635           l_totlength = '0'.                                                              
      636          ENDIF.                                                                           
      637          l_currlength = <dd03l_fields>-intlen.                                            
      638          CONCATENATE l_totlength '('  l_currlength ') ' INTO l_fieldval .                 
      639         l_totlength = l_totlength + l_currlength.                                         
      640        ENDIF.                                                                               
    641*** Consider both field name and domian name for checking in range list:                   
      642        IF <dd03l_fields>-fieldname IN s_fieldlist.                                        
    643        wa_fldcat-fieldname = <dd03l_fields>-fieldname.                                   
      644       ELSEIF <dd03l_fields>-domname IN s_fieldlist.         
    Edited by: anshu13 on Apr 27, 2010 11:33 AM

  • Handling Init/Full/Delta-Loading for a generic DS based on function-module

    Hi Experts,
    we need to build a generic datasource based on a function-module; and we would like to
    implement a slightly different logic in the function-module depending on the data-staging-mode that was selected in the InfoPackage.
    What we're missing is a possibility to distinguish (in the ds-function-module) if an init/delta/full-load was requested.
    Could you please provide some information/hints about that topic?
    Thanks in advance,
    Marco

    Hi Anjum,
    we found an alternative that seems to be closer to SAPs idea of how it should work:
    We check the status of the Init-Table (RSA7) - depending on the result
    a) Init exists ---> Delta or Full
    b) Init does not exist --> Init or Full
    we check if the system itself passes a timestamp together with the data-request.
    1) If it does so --> Delta/Init
    2) If it doesn't provide a timestamp --> Full.
    Summary:
    a1 --> Delta
    a2 --> Full
    b1 --> Init
    b2 --> Full

  • Routine based on Function Module

    Hello All,
    i have to write code for a routine using a custom function module that is created previously.
    the function has input parameter IN_YEAR_WEEK  and output parameter EN_WEEK_1 ,  EN_WEEK_2.
    this routine is in the transformation between cube and open hub between the 0calweek of the cube and a custom field znum_week in the open hub.
    the input parameter of the function like 201005 (the fifth week in 2010 year) is the same value that i will have in the 0calweek of my cube and give in output 2 parameters between 0 and 5 that's mean the number of week in the month.
    the value between 0 and 5 should be puted in the znum_week field
    if the function return value between 1 and 5 i should have duplicate records in the open hub file.
    can you give me please some advice how should be my abap coding for this routine.
    should i use start routine? or routine of the single field?
    thanks
    Bilal

    Hi ALL,
    i have created this code for start routine to duplicate records in my open hub, can you tell me please if the logic is correct?
    data: v_week_1 like n.
    data : v_week_2 like n.
    DATA: vn_tabix LIKE sy-tabix.
    data: wa_temp LIKE SOURCE_PACKAGE.
    LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS>.
    CALL FUNCTION ' ZIV_DP_FUNC_NUM_WEEK_LA '
        EXPORTING
            IN_YEAR_WEEK = <SOURCE_FIELDS>-/bic/0calweek
        IMPORTING
          EN_WEEK_1  = v_week_1
           EN_WEEK_2  =  v_week_2.
    If v_week_1 between 1 and 5 and v_week_2 = 0
    <SOURCE_FIELDS>-/bic/0calweek = v_week_1.
    MODIFY SOURCE_PACKAGE INDEX vn_tabix FROM < SOURCE_FIELDS>.
    Endif.
    Else
    If  v_week_1 between 1 and 5 and v_week_2  between 1 and 5
    <SOURCE_FIELDS>-/bic/0calweek = v_week_1.
    MODIFY SOURCE_PACKAGE INDEX vn_tabix FROM < SOURCE_FIELDS>.
    MOVE <SOURCE_FIELDS> to wa_temp.
    wa_temp-/bic/0calweek = v_week_2.
    APPEND wa_temp TO SOURCE_PACKAGE.
    Endif.
    REFRESH: wa_temp.
    thanks a lot
    Bilal

  • How to - customize datasource by means of 'Function module'  via 'RSO2' ?

    Wilson, the topic of Function Module extractors is well documented in the forums - please search the forums before posting
    +__Hi,Expert:__+
    +__Could you please kindly advise me how to customize datasource by  'Function module',__+
    +__and which aspects I should pay more attention?__+
    +__Or provide me valuable documentation.__+
    +__Thanks very much !__+
    Edited by: Arun Varadarajan on Feb 11, 2009 9:58 AM

    Hi Wilson,
                  Check here..........
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Generic extractor based on function module RSAX_BIW_GET_DATA_SIMPLE
    Thanks,
    Vijay.

  • 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

  • Fields inclusion for Function Module Extractor

    Hi Gurus,
    I am planning to design a Function Module based extractor. This Function modules is supposed to extract data from approx 10 different tables. Most of the tables have 5 or more fields of it to be pulled in.
    However, there are also few tables, which have got just a single field or just 2 fields.
    As a design, is it a good idea to include the logic of extracting these fields in the Function module? or
    Is it recommended to have these fields included via a user exit, once the datasource is developed?
    I appreciate all the help

    Thanks Dash I have assigned the points.
    I guess you are recommending the User Exit approach as mentioned in my original post where few of my tables have got just a single field or just 2 fields.
    Let me know please.
    Other SDNers,
    Let me have your thoughts too

Maybe you are looking for

  • SD-How to find table link of special delivery and sales order number?

    Hi Experts, I have a requirement as below. In LIPS table (SD document: Delivery: Item data), in this table has one kind data. One record has maintianed 2 fields PSPNR(Project definition (internal)) and PS_PSP_PNR(Work Breakdown Structure Element (WBS

  • Can I filter out books that have explicit content?

    I have turned on the Restrictions under Settings -> General -> Restrictions... however this only works for some works..  You can try it your self and you will notice that this only effects a small percentage of the items with explicit content. I went

  • JNI (Java from C) -- multiple JREs installed, need to use non-default one

    Hello, I don't know how many Google/forum searches I must have tried -- I can't seem to find a solution to my problem. I am calling Java from C. We have two types of environments: (1) 1.3/1.4 mix, and (2) 1.4 only. The mixed environments are configur

  • How can i use an inner Jpanel in another JPanel

    Hi, i need to put an inner panel in a container panel.I have been trying for hours but I couldn't make it work. Please waiting for help... public class Gui extends JFrame{      public Gui() {           setDefaultCloseOperation(EXIT_ON_CLOSE);        

  • Queries in SQL developper do not return anything?

    Hello there, First of I am completely new to Oracle and IT in general. Apart from having used computers since the heyday my knowledge of programming is very little. I have been reading Oracle documentation and bought the CBT nuggets tutorials to prep