Function Module - E_T_DATA does not return data

10-11  Source: Network gathering  Views:1 

Advertisement
Hi
I am trying to create a fuction module Generic extraction, the code belwo dosen't return any data.
when i debug YBW_MAT_STAT does have but after E_T_DATA = YBW_MAT_STAT it dose not return any data
can you help?
Ramesh
FUNCTION YBW_FM_ACTIVE_MATERIAL.
""Local Interface:
*"  IMPORTING
*"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
*"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*"     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  YBW_MAT_STAT OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
Example: DataSource for table SFLIGHT
  TABLES: YBW_MAT_STAT.
Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
   DATA : YBW_MAT_STAT type YBW_MAT_STAT occurs 0 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
Comment copy code
RANGES: L_R_CARRID  FOR SFLIGHT-CARRID,
         L_R_CONNID  FOR SFLIGHT-CONNID.
DATA: begin of t_marc occurs 0,
ZMATNR type MATNR,
ZWERKS type WERKS,
end of t_marc.
DATA: begin of t_ytmd_mat_ref occurs 0,
ZMATNR type MATNR,
ZYNA_MATNR_ST type YNA_MATNR_ST,
ZYEAME_MATNR_ST type YEAME_MATNR_ST,
ZYFIN_MATNR_ST type YFIN_MATNR_ST,
end of t_ytmd_mat_ref.
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 'ZAINV_MAT_STATUS'.
      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'.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
      SELECT MATNR WERKS FROM MARC into table t_marc where MATNR BETWEEN '4233940M1' and '4233950M1'.
      loop at t_marc.
        SELECT MATNR YNA_MATNR_ST YEAME_MATNR_ST FROM YTMD_MAT_REF into table t_ytmd_mat_ref where MATNR = t_marc-zmatnr.
          loop at t_ytmd_mat_ref.
            if t_marc-zwerks = 'GB71' AND t_ytmd_mat_ref-ZYEAME_MATNR_ST = 'A'.
              read table t_ytmd_mat_ref with key zmatnr = t_marc-zmatnr.
              YBW_MAT_STAT-matnr = t_marc-zmatnr.
              YBW_MAT_STAT-plant = t_marc-zwerks.
            append YBW_MAT_STAT.
            clear YBW_MAT_STAT.
            endif.
           endloop.
      endloop.
    ENDIF.                             "First data package ?
     clear E_T_DATA.
     refresh E_T_DATA.
     E_T_DATA = YBW_MAT_STAT.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
  ENDIF.              "Initialization mode or data extraction ?
ENDFUNCTION.
Hi
I have a question,
With the above code i have all my records (450000+) in a single data package.
how do i break this in multiple data packages
regards
Ramesh
Related articles
  • Function Module - E_T_DATA does not return data 10-11

    Hi I am trying to create a fuction module Generic extraction, the code belwo dosen't return any data. when i debug YBW_MAT_STAT does have but after E_T_DATA = YBW_MAT_STAT it dose not return any data can you help? Ramesh FUNCTION YBW_FM_ACTIVE_MATERI

  • 0EC_PCA_3 does not return data in RSA3 if the target system is entered 11-30

    Hello all, Datasource 0EC_PCA_3 is not transferring data to the BW 7.0 system. In the ECC 6.0 system datasource 0EC_PCA_3 does not return data in RSA3 if the target system (BWDCLNT100) is entered in the selection fields. When omitting the target syst

  • SQL Developer bug? It does not return DATEs if database is only MOUNTED 11-30

    I'm logging into a mounted database as SYS to check on things using the V$ views, but any query I do involving DATEs never returns any data. If I remove the DATE column, the query works fine. If the database is OPEN, the query works fine with the DAT

  • Function Module SWK_LOCAL_INBOX_GET does not exists 10-11

    Hi, I configured UWL in the Portal. When i am trying to acess UWL, throwing an exception. it says "Exception type:com.sap.netweaver.bc.uwl.connect.ConnectorException Message:Thu Apr 12 15:58:26 GMT+05:30 2007 :Function Module SWK_LOCAL_INBOX_GET not

  • Request having function group released but function module attribute shows not released 11-30

    Hi experts,                I am a beginner.               There is a transport request in which my function group and other objects were present . This transport request and its task were released . But if i check the attributes section of the functi

  • Very Very Urgent Issue: Restricted Key Figure does not return any data 10-11

    Hi all, Please help me solving this urgent issue. created customer exit variable on characterstics version and also other customer exit variable on Value type. I coded that in variable exit. Problem is when I include these in restrickted keyfigure My

  • Fetching Form Data... does not return form's field list to edit 11-30

    I have a Portal Form based on a view. It works fine if I run it. Suddenly I am unable to edit the form field properties: 1) In the application list, I do not get run option for the form. 2) If I go to manage and edit, "Fetching Form Data..." doe

  • Function does not return a value 11-30

    CREATE OR REPLACE PACKAGE BODY Promo_Version_Logo_Pkg IS   FUNCTION Promo_Version_Logo_Rule(Rc IN test.Ot_Rule_Context)     RETURN Ot_Rule_Activation_Result    IS     PRAGMA AUTONOMOUS_TRANSACTION;     v_Result NUMBER;     CURSOR Cur_Promo_Logos IS  

  • [Solved] (WW) fglrx(0): Kernel Module version does *not* match driver. 10-11

    fglrx has just recently stopped working, and I can't quite pinpoint when that was because I honestly hadn't noticed until checking.  I've tried a few reinstalls and different xorg options so far, but had no luck. glxinfo: name of display: :0.0 displa

  • FM HRTRV_IF_GET_TRIP does not return USERDATA 10-11

    Hi, it's me, yet again... I'm using the FM "HRTRV_IF_GET_TRIP" in FITE_VC_GENERA_DATA in a post exit of comp-controller method "ON_SHOW" to get the structure/Table USER/PTK99 from the TE Cluster for binding to the context afterwards. A

  • WebI does not return failed when scheduling a report which only holds parti 10-11

    WebI does not return failed when scheduling a report which only holds partial results. We have scheduled reports which take some time to run. When they are scheduled they sometimes show successful even though the report only holds partial results. Th

  • Function Module for Creation of classification data for a Routing 10-11

    Hi Can you please let me know if there are any function modules/Bapi's to create Classification data for a Routing? THanks ShekarFor creating classification data, have a look at the function group CTMS and function module CTMS_DDB_SET_VALUE_INTERNAL.

  • My Mini Ipad Does not return to the Home screen after I press the Home button 10-11

    My Mini Ipad Does not return to the Home screen after I press the Home button. I have also tried to turn it off and it is not responding.Check the following: 1. Check credit card number 2. Check security code 3. Billing Address must be the same as cr

  • WB_RT_GET_JOB_METRICS does not return values 10-11

    DB v 10.2.0.2 OWB repository/client v 10.2.0.3 A DB function has a call to the Control Center transformation WB_RT_GET_JOB_METRICS to extract and preserve the metadata of number of records inserted/updated/deleted in a DB table. +++++++++++++++++++++

  • OCIStmtExecute does not return immediately when client is busy. 10-11

    Hi. I'm testing a very busy multi-threaded client server that consistently generates a large number of simple queries through oci. The problem is that, when the server(client) is busy, OCIStmtExecute does not return immediately in non-blocking mode.

  • Page does not show data 10-11

    Hi all, I would appreciate any help for the following problem that I am facing. I have created master-detail pages sharing the same AM. The details page shows details of the request from 3 different VOs. The VOs are entity-based and I modify the VOs

  • Website page with jquery datepicker does not calculate dates while other pages without datepicker and all other browsers do their job 10-11

    I wrote two mobile pages with dreamweaver cs5.5 and jquery. Both do online calculations. Both appear and accept input. One page using jquery datepicker does not calculate. Solely in Firefox. IE9, Safari, Chrome display correct results. Debuggers show

  • Server does not return query metadata check the query 10-11

    hi, i want know how to  use bex query designer, when i  insert a data provider,the message is appear "server does not return query metadata check the query", who can help me ? thanks a lot ! addition: my current entironment is: gui710 with sp4,b

  • BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition 10-11

    Dear All, BAPI function module 'BAPI_PO_CHANGE' is not updating aacural condition in PO pricing. Please give me a right solution on this query. Below I have given my code. Thanks and Regards Makarabd poitem-po_item = '00010'. poitem-net_price = '1060

  • Select query does not return rows 11-30

    Hi all, The following query does not returning rows even though values are there in table. Kindly let me know why it is creating problem. thanks, P Prakash /* Formatted on 2011/05/11 16:44 (Formatter Plus v4.8.8) */ SELECT pr.pa_rqst_sid, ptr.sbmtr_t