Delta error in GE-Function Module

Hi ,
my GE-delta is based on UDATE ( chenged date) from CDHDR table.
i created datasource in RS02 and i defined delta based in UDATE with upper limit 1 day and lower limit is '0'..
i created FM based on RSAX_BIW_GEDATA_SIMPLE.
for full load it working fine.
i put some extra code for delta.
it is not take any records...
i dont know much ABAP.
plz tell me where is wrong in my code for delta..
code ...
FUNCTION ZXBWMM_INV_POT_ID.
""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  ZVSAIPID OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
Example: DataSource for table SFLIGHT
TABLES: SFLIGHT.
TABLES: EBAN , CDPOS , CDHDR , ZVSAPR.
  TYPES : BEGIN OF TY_OBJDATE ,
        OBJECTID TYPE CDHDR-OBJECTID,
        VALUE_NEW TYPE CDPOS-VALUE_NEW,
        VALUE_OLD TYPE CDPOS-VALUE_OLD,
        UDATE TYPE CDHDR-UDATE,
        MINBE TYPE MARC-MINBE,
        BSTMA TYPE MARC-BSTMA,
        WERKS TYPE MARC-WERKS,
        VERPR TYPE MBEW-VERPR,
        STPRS TYPE MBEW-STPRS,
        LBKUM TYPE MBEW-LBKUM,
        BUDAT TYPE MKPF-BUDAT,
        MBLNR TYPE MSEG-MBLNR,
        MENGE TYPE MSEG-MENGE,
        DMBTR TYPE MSEG-DMBTR,
        END OF TY_OBJDATE.
  data : int_cdhdr type table of cdhdr with header line,
       int_cdpos type table of cdpos with HEADER LINE,
       INT_OBJDATE TYPE TABLE OF TY_OBJDATE WITH HEADER LINE.
      int_marc type table of marc with header line.
*DATA: int_pr1 TYPE TABLE OF ZVSAIPID WITH HEADER LINE.
  DATA : BEGIN OF INT_MATNR OCCURS 10,
         MAtnr like mara-matnr,
         end of int_matnr.
DATA : BEGIN OF INT_MARC OCCURS 10,
         matnr like marc-matnr,
         MINBE like marC-mINBE,
         BSTMA LIKE Marc-bstma,
         WERKS LIKE MARC-WERKS,
         end of int_marc.
DATA : BEGIN OF INT_MBEW OCCURS 10,
         MATNR LIKE MBEW-MATNR,
         VERPR LIKE MBEW-VERPR,
         STPRS LIKE MBEW-STPRS,
         LBKUM LIKE MBEW-LBKUM,
         end of int_MBEW.
DATA : BEGIN OF INT_MKPF OCCURS 10,
         MBLNR LIKE MKPF-MBLNR,
         BUDAT LIKE MKPF-BUDAT,
         END OF INT_MKPF.
DATA : BEGIN OF INT_MSEG OCCURS 10,
         MATNR LIKE MSEG-MATNR,
         MBLNR LIKE MSEG-MBLNR,
         MENGE LIKE MSEG-MENGE,
         DMBTR LIKE MSEG-DMBTR,
         END OF INT_MSEG.
Auxiliary Selection criteria structure
  DATA: L_S_SELECT TYPE SRSC_S_SELECT.
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.
  RANGES : ra_OBJECTID FOR E_T_DATA-OBJECTID.
          RA_UDATE FOR E_T_DATA-UDATE.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
  IF I_INITFLAG = SBIWA_C_FLAG_ON.
  IF NOT G_FLAG_INTERFACE_INITIALIZED IS INITIAL.
IF 1 = 2. MESSAGE E008(R3). ENDIF.
LOG_WRITE 'E' "message type
'R3' "message class
'008' "message number
' ' "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDIF.
Initialization: check input parameters
                buffer input parameters
                prepare data selection
Check DataSource validity
    CASE I_DSOURCE.
      WHEN 'ZOI_MM_INVENTORY_IPID'.
      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.
  Check for supported update mode
CASE I_UPDMODE.
WHEN 'F'.
WHEN 'D'.
WHEN 'R'.
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.
READ TABLE I_T_SELECT INTO L_S_SELECT
WITH KEY FIELDNM = 'UDATE'.
    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.
    G_S_INTERFACE-INITFLAG = I_INITFLAG.
    G_S_INTERFACE-UPDMODE = I_UPDMODE.
    G_S_INTERFACE-DATAPAKID = I_DATAPAKID.
    G_FLAG_INTERFACE_INITIALIZED = SBIWA_C_FLAG_ON.
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
  LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT
  WHERE FIELDNM = 'UDATE'.
  ENDLOOP
    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'.
     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.
     IF L_S_SELECT-LOW = '' AND L_S_SELECT-HIGH = ''. "FULL or INIT
      OPEN CURSOR WITH HOLD S_CURSOR FOR
      select * from cdhdr where OBJECTCLAS = 'MATERIAL' AND TCODE = 'MM02'.
      ELSE. "DELTA
     OPEN CURSOR WITH HOLD G_CURSOR FOR
     select * from cdhdr where OBJECTCLAS = 'MATERIAL'
     AND TCODE = 'MM02'
     AND UDATE >= L_S_SELECT-LOW
     AND UDATE <= L_S_SELECT-HIGH.
     ENDIF.
     ENDIF.
   ENDIF.
    "First data package ?
    FETCH NEXT CURSOR S_CURSOR
          APPENDING  TABLE int_cdhdr
          PACKAGE SIZE S_S_IF-MAXSIZE.
   into table int_cdhdr
    IF SY-SUBRC <> 0.
      CLOSE CURSOR S_CURSOR.
      RAISE NO_MORE_DATA.
    ENDIF.
    SELECT * FROM CDPOS INTO TABLE INT_CDPOS
         FOR ALL ENTRIES IN INT_CDHDR
         WHERE OBJECTID = INT_CDHDR-OBJECTID
         AND TABNAME = 'MARC'
         AND ( FNAME =  'BSTMA' OR FNAME = 'MINBE' ).
    LOOP AT int_cdpos.
      int_matnr-matnr = int_cdpos-objectid.
      APPEND int_matnr.
    ENDLOOP.
    SELECT  matnr MINBE BSTMA WERKS FROM MARC INTO TABLE INT_marc
            FOR ALL ENTRIES IN int_matnr
           WHERE MATNR = INT_matnr-matnr.
    SELECT  matnr VERPR STPRS LBKUM FROM MBEW INTO TABLE INT_MBEW
            FOR ALL ENTRIES IN int_matnr
           WHERE MATNR = INT_matnr-matnr.
    SELECT  matnr MBLNR MENGE DMBTR FROM MSEG INTO TABLE INT_MSEG
            FOR ALL ENTRIES IN int_matnr
           WHERE MATNR = INT_matnr-matnr.
     LOOP AT int_MSEG.
      int_MKPF-MBLNR = int_MSEG-MBLNR.
      APPEND int_MKPF.
    ENDLOOP.
    SELECT  MBLNR BUDAT FROM MKPF INTO TABLE INT_MKPF
            FOR ALL ENTRIES IN int_MKPF
           WHERE MBLNR = INT_MKPF-MBLNR.
*BREAK-POINT.
    LOOP AT INT_CDPOS.
      READ TABLE INT_CDHDR WITH KEY OBJECTID = INT_CDPOS-OBJECTID .
      IF SY-SUBRC = 0.
        INT_OBJDATE-OBJECTID = INT_CDPOS-OBJECTID.
        INT_OBJDATE-VALUE_NEW = INT_CDPOS-VALUE_NEW.
        INT_OBJDATE-VALUE_OLD = INT_CDPOS-VALUE_OLD.
        INT_OBJDATE-UDATE = INT_CDHDR-UDATE.
        READ TABLE INT_MARC WITH KEY MATNR = INT_CDPOS-OBJECTID .
        IF SY-SUBRC = 0.
          INT_OBJDATE-MINBE = INT_MARC-MINBE.
          INT_OBJDATE-BSTMA = INT_MARC-BSTMA.
          INT_OBJDATE-WERKS = INT_MARC-WERKS.
          ENDIF.
        READ TABLE INT_MBEW WITH KEY MATNR = INT_CDPOS-OBJECTID .
        IF SY-SUBRC = 0.
          INT_OBJDATE-VERPR = INT_MBEW-VERPR.
          INT_OBJDATE-STPRS = INT_MBEW-STPRS.
          INT_OBJDATE-LBKUM = INT_MBEW-LBKUM.
         ENDIF.
        READ TABLE INT_MSEG WITH KEY MATNR = INT_CDPOS-OBJECTID .
        IF SY-SUBRC = 0.
          INT_OBJDATE-MBLNR = INT_MSEG-MBLNR.
          INT_OBJDATE-MENGE = INT_MSEG-MENGE.
          INT_OBJDATE-DMBTR = INT_MSEG-DMBTR.
         ENDIF.
        READ TABLE INT_MKPF WITH KEY MBLNR = INT_MSEG-MBLNR .
        IF SY-SUBRC = 0.
          INT_OBJDATE-MBLNR = INT_MKPF-MBLNR.
          INT_OBJDATE-BUDAT = INT_MKPF-BUDAT.
         ENDIF.
        APPEND INT_OBJDATE.
      ENDIF.
    ENDLOOP.
*SELECT * FROM EBAN
    INTO CORRESPONDING FIELDS OF TABLE INT_PR1
    FOR ALL ENTRIES IN INT_OBJDATE
    WHERE BAnfn = int_objdate-objectid.
*ZZPRREL
    LOOP AT INT_OBJDATE.
      E_T_DATA-OBJECTID = INT_OBJDATE-OBJECTID.
      E_T_DATA-UDATE = INT_OBJDATE-UDATE.
      E_T_DATA-VALUE_NEW = INT_OBJDATE-VALUE_NEW.
      E_T_DATA-VALUE_OLD = INT_OBJDATE-VALUE_OLD.
      E_T_DATA-MINBE = INT_OBJDATE-MINBE.
      E_T_DATA-BSTMA = INT_OBJDATE-BSTMA.
      E_T_DATA-WERKS = INT_OBJDATE-WERKS.
      E_T_DATA-VERPR = INT_OBJDATE-VERPR.
      E_T_DATA-STPRS = INT_OBJDATE-STPRS.
      E_T_DATA-LBKUM = INT_OBJDATE-LBKUM.
      E_T_DATA-MBLNR = INT_OBJDATE-MBLNR.
      E_T_DATA-MENGE = INT_OBJDATE-MENGE.
      E_T_DATA-DMBTR = INT_OBJDATE-DMBTR.
      E_T_DATA-BUDAT = INT_OBJDATE-BUDAT.
      APPEND E_T_DATA.
      CLEAR  E_T_DATA.
    ENDLOOP.
Fetch records into interface table.
  named E_T_'Name of extract structure'.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
  ENDIF.              "Initialization mode or data extraction ?
ENDFUNCTION.
i assign points....
Regards,
PSR.

Hi ,
i am not find any sollution for this..
any body help me for this problum...
i assign points..
Regards,
PSR

Similar Messages

  • Getting error in the function module

    Hi everybody.
    I have created one function module in se37 and i am calling that function module in the se38 report, when i am executing the report it is throwing me an error.
    here in my report i am having the select option fields ex matnr, in the function module importing i have given the parameter matnr over there and when i am running the report it is through an error that 
    "The function module interface allows you to specify only 
    fields of a particular type under "MATNR".               
    The field "S_MATNR" specified here is a different        
    field type                                                "
    IF i am giving the parameter instead of select-options in the report and executing, then the function module is getting triggered and receiving the data what ever the code is available in the source code.
    can anyone help me out in this issue so that i can get the data while using the select-option instead of parameter.
    Thanks in advance

    Hi,
    Actually, I wouldn't recommend the use of that tables parameter...
    From sap help:
    Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    So i definitely would go with either importing or changing parameter...
    Cheers,
    m.

  • Type error while calling function module with in FOX formula

    Hi,
    I am getting following error while calling function module from FOX Formula:
    "Types of parameter DAY_IN () and variable J_CALDAY(D) are inconsistent"
    Following is the code:
    DATA    I_CALDAY       TYPE  0CALDAY.
    DATA    N_CALDAY       TYPE  0CALDAY.
    DATA    KYF              TYPE KEYFIGURE_NAME.
    FOREACH   I_CALDAY, KYF.
       CALL FUNCTION SLS_MISC_GET_LAST_DAY_OF_MONTH
          EXPORTING
             DAY_IN  =  I_CALDAY
          IMPORTING
             LAST_DAY_OF_MONTH = N_CALDAY.
        {KYF, N_CALDAY}  =  {KYF, L_CALDAY}.
    ENDFOR.
    Import parameter DAY_IN is of type sy-datum (that inturn is data element SYDATUM of data type DATS - same as 0CALDAY). Not sure why error is being thrown. Any idea? Thanks.
    Edited by: SAP_BOY on Dec 4, 2009 5:26 PM

    Hi,
    I think It will not identify ,though you have  (data element SYDATUM of data type DATS - same as 0CALDAY).Check it out by assigning it through a variable of type D.
    Data I_CALDAY TYPE D.
    Hope it may work out.
    Regards,
    Indu

  • How to capture errors when a Function module is called as BACKGROUND TASK

    How to capture errors when a Function module is called as BACKGROUND TASK?.Please advise.
    FUNCTION ZRPM_DELETE_PROJECT_DATA_API.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(IV_EXTERNAL_ID) TYPE  RPM_TV_EXTID OPTIONAL
    *"     VALUE(IV_PROJECT_GUID) TYPE  RPM_TV_GUID OPTIONAL
    *"     VALUE(FLAG) TYPE  BOOLEAN OPTIONAL
    *"  EXPORTING
    *"     VALUE(EV_RC) TYPE  I
    *"     VALUE(EV_MSG) TYPE  STRING
    *"     VALUE(ET_MSG) TYPE  RPM_TT_MESSAGES
      IF flag = cl_rpm_co=>sc_true.
        Call function 'RPM_DELETE_PROJECT_DATA' IN BACKGROUND TASK
          EXPORTING
            IV_EXTERNAL_ID  = IV_EXTERNAL_ID
            IV_PROJECT_GUID = IV_PROJECT_GUID
          IMPORTING
            EV_RC           = EV_RC
            EV_MSG          = EV_RC
            ET_MSG          = ET_MSG.
        COMMIT WORK.
      ELSE.
        CALL FUNCTION 'RPM_DELETE_PROJECT_DATA'
          EXPORTING
            IV_EXTERNAL_ID  = IV_EXTERNAL_ID
            IV_PROJECT_GUID = IV_PROJECT_GUID
          IMPORTING
            EV_RC           = EV_RC
            EV_MSG          = EV_MSG
            ET_MSG          = ET_MSG.
      ENDIF.
    ENDFUNCTION.
    In above code how to capture 'EV_RC' when FM is called as background task.

    Prakash,
    CALL FUNCTION IN BACKGROUND TASK allows no IMPORTING parameters, so that your code will produce a syntax error.
    The calling program can only handle errors of remote function calls (RFC) if these are either
    - synchronous RFC  (that is CALL FUNCTION ... DESTINATION ...) or
    - asynchronous RFC (that is CALL FUNCTION STARTING NEW TASK ... DESTINATION ...).
    Both synchronous and asynchronous RFC allow the capturing of errors by means of exceptions. But that is a different topic.

  • There seems to be an error in the function module OPEN_FORM obstructing the

    Hi,
    There seems to be an error in the function module OPEN_FORM obstructing the process.
    Some vendors are not cabaple of usinf EDI and for some reason also not willing to use TTOOL solutions (example Hewlet Packard). In those cases the supplier still would like to get purchase order electronically via e-mail. Sending POu2019s via external mail (SMTP) is basically standard function in R/3 that has been possible since the version 4.5. It is not pre-configured, so (almost) all the required elements needs to be configured.
    When we send the output message through ME9F t'code i facing the problem in the above FM.
    Please help me how to solve this.
    Vijay

    Got you, the digital display for Cupertino and Frankfurt are wrong too.
    Submit feedback:
    http://www.apple.com/feedback/iphone.html

  • Error EU 802: Function Module does not exist

    Hello everyone!
    While running a DTP, I'm getting the following error:
    EU 802: Function Module RSD_YPERSON_TXT_GET does not exist
    Anyone has any idea what this is about?
    Thanks in advance for your responses!
    Best Regards,
    Luís.

    Hi,
    I have resolved this issue. Turns out that I was mapping a source field INPER (In-Period) directly to 0CALMONTH. The problem is that this source field can have more than 12 periods per year.
    The error message was totally misleading... there's SAP for you
    Points assigned for the effort.
    Best regards,
    Luís.

  • Error Error 6 in function module RSS_PROGRAM_GENERATE

    Hello Experts,
    When I attempt to run the extract checker for datasource, 0material_LPRH_HIER I receive the following error: Error 6 in function module RSS_PROGRAM_GENERATE.
    I referred to the oss notes 328948. But the note is addressing to lower versions of R/3.
    I am working on ECC 6.0 and no way that note is helpful to me. I did check for the previous posts addressing this issue and i said already those posts refer to the older version of R/3.
    I did check for the previous post and all are addressing to the lower version of release.
    KK

    This is the reply I got from SAP:
    The error error 6 RSS_PROGRAM_GENERATE is more related to Hierarchy .
    Are you creating a hierarchy data source if so you need to use
    RSA1HCAT report .But normally you will not get any errors when you
    create the data source by your own .
    705212--> Syntax error in the generated extraction program
    Please use the program RSA1HCAT in SE38 to check your hierarchy.

  • Error 6 in function module RSS_PROGRAM_GENERATE

    Hi friends,
    While testing the extraction of a hierarchy data source (0CMMT_ITEM_FMCI_PU_HIER) from RSA3, I encountered the above error. I looked into some notes and it was not of much help for me. Please let me know if someone have come across this error and know the solution.
    Thanks and Regards
    Subray Hegde

    Hi,
    look at oss note 705212:
    Syntax error in the generated extraction program   Symptom
    You notice the error by one of the following symptoms:
    The loading of transaction data from an R/3 system terminates with a syntax error in the generated extraction program. The monitor displays the error messages:
                            R3027 "Error & during the generation of the data transfer program"
                            RSM340 "Error in the source system"
    The extraction within the extractor checker terminates with error message <b>RJ028 "Error 6 in function module RSS_PROGRAM_GENERATE".</b>The activation of transfer rules ends in BW with error message RG102 "Syntax error in GP$ERR$, row... (-> long text)" from the source system. Usually, the diagnosis in the long text of the error message is: "...could not be interpreted. Possible error causes: Incorrect notation or... "
    Other terms
    OLTP, extractor, data extraction, DataSource, Service API, SAPI,
    R3 027, R3 27, RSM 340, RJ 028, RJ 28
    Reason and Prerequisites
    The error only occurs in the source system, if this contains Basis Release 3.1I and Service API (SAPI) 3.0C Support Package 6. SAPI 3.0C Support Package 6 is contained, for example, in PI 2003.1 Support Package 7 (see attached composite SAP note 673002).
    Solution
    To correct the problem you need service API 3.0C Support Package 7 in the affected source system. The attached composite SAP note 704971 explains in which software components service API 3.0C is contained, and what the corresponding Support Packages of these components are.
    Alternatively, you can also copy the advance correction from the appendix.
    /manfred

  • Error message for function module

    I have created a custom function module. I have activated it. But when i'm trying to use it in a program it is showing an error. The function module has 'TABLES' but it is showing error as:
    "field "TABLES" is unknown. It is neither in one of the specified tables nor defined by a DATA statement".
    Please help me!!
    Thank you.

    Hello Titan,
    Generally you get these kind of syntax errors when there is some problem with the format of the program. Please recheck the format of the program in which you are calling the newly created function module. Please check if there are any erroneous '.' or ',' in the program before the 'Tables' partameter of the function module.
    Please verify the same.
    Regards,
    Pavan

  • Errors in Update Function Modules

    Hi Gurus,
    Please provide me the ways to handle Errors in Update Function Modules.
    (I.e. I should export errors from Update Function Module)
    Warm Regards,

    Use Raise statement ...
    FUNCTION-POOL CSTR.
    FUNCTION STRING_SPLIT.
      IF STRING NA DELIMITER.
        RAISE NOT_FOUND.
      ENDIF.
    ENDFUNCTION.
    Regards,
    Santosh

  • Delta extraction(date) with Function module problem

    Hi All,
    FUNCTION zrsax_biw_get_data_pr_d.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     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_PRIVATE_MODE) OPTIONAL
    *"     VALUE(I_CALLMODE) LIKE  ROARCHD200-CALLMODE OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZPR_ST OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    * The input parameter I_DATAPAKID is not supported yet !
    * Example: InfoSource containing TADIR objects
    *  TABLES: tadir.
    *DATA: BEGIN OF zpr_st_copy,
    *        banfn TYPE zpr_st-banfn,
    *        bnfpo TYPE zpr_st-bnfpo,
    *        zebkn TYPE zpr_st-zebkn,
    *        knttp TYPE zpr_st-knttp,
    *        vbeln TYPE zpr_st-vbeln,
    *        ps_psp_pnr TYPE zpr_st-ps_psp_pnr,
    *        gsber TYPE zpr_st-gsber,
    *        werks TYPE zpr_st-werks,
    *        statu TYPE zpr_st-statu,
    *        ekgrp TYPE zpr_st-ekgrp,
    *        menge TYPE zpr_st-menge,
    *        frgdt TYPE zpr_st-frgdt,
    *        meins TYPE zpr_st-meins,
    *         loekz TYPE zpr_st-loekz,
    *      END OF zpr_st_copy.
    * Auxiliary Selection criteria structure
      DATA: l_s_select TYPE sbiwa_s_select.
    * Maximum number of lines for DB table
      STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize.
    * Select ranges
    *  RANGES: l_r_pgmid  FOR tadir-pgmid,
    *          l_r_object FOR tadir-object,
        RANGES: PRNO for zpr_st-banfn,
                DATE1 FOR zpr_st-frgdt.
    * Parameter I_PRIVATE_MODE:
    * Some applications might want to use this function module for other
    * purposes as well (e.g. data supply for OLTP reporting tools). If the
    * processing logic has to be different in this case, use the optional
    * parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
    * between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
    * (I_PRIVATE_MODE = X).
    * If the message handling has to be different as well, define Your own
    * messaging macro which interprets parameter I_PRIVATE_MODE. When
    * called by BIW, it should use the LOG_WRITE macro, otherwise do what
    * You want.
    * 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
    * The input parameter I_DATAPAKID is not supported yet !
    * Invalid second initialization call -> error exit
        IF NOT g_flag_interface_initialized IS INITIAL.
          IF 1 = 2. MESSAGE e008(r3). ENDIF.
          log_write 'E'                    "message type
                    'R3'                   "message class
                    '008'                  "message number
                    ' '                    "message variable 1
                    ' '.                   "message variable 2
          RAISE error_passed_to_mess_handler.
        ENDIF.
    * Check InfoSource validity
        CASE i_isource.
          WHEN 'ZPR_ST_DS_D' OR ''.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_isource            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
    * Check for supported update mode
        CASE i_updmode.
          WHEN 'F' OR ''.
          WHEN 'C'.
          WHEN 'R'.
          WHEN 'S'. " DELTA INITIALIZATION
          WHEN 'I'. "DELTA INITIALIZATION FOR NON CUMULATIVE
          WHEN 'D'. "DELTA
          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.
    BREAK-POINT.
    * Check for obligatory selection criteria
    *    READ TABLE i_t_select INTO l_s_select WITH KEY fieldnm = 'ZPR_ST-FRGDT'.
    *    IF sy-subrc <> 0.
    *      IF 1 = 2. MESSAGE e010(r3). ENDIF.
    *      log_write 'E'                    "message type
    *                'R3'                   "message class
    *                '010'                  "message number
    *                'PGMID'                "message variable 1
    *                ' '.                   "message variable 2
    *      RAISE error_passed_to_mess_handler.
    *    ENDIF.
        APPEND LINES OF i_t_select TO g_t_select.
    * Fill parameter buffer for data extraction calls
        g_s_interface-requnr    = i_requnr.
        g_s_interface-isource   = i_isource.
        g_s_interface-maxsize   = i_maxsize.
        g_s_interface-initflag  = i_initflag.
        g_s_interface-updmode   = i_updmode.
        g_s_interface-datapakid = i_datapakid.
        g_flag_interface_initialized = sbiwa_c_flag_on.
    * 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 g_t_segfields.
    *   Start tracing of extraction
    *    bice_trace_open g_r_tracer i_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 g_counter_datapakid = 0.
    * Fill range tables for fixed InfoSources. In the case of generated
    * InfoSources, the usage of a dynamical SELECT statement might be
    * more reasonable. BIW will only pass down simple selection criteria
    * of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'PGMID'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_pgmid.
    *        APPEND l_r_pgmid.
    *      ENDLOOP.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'OBJECT'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_object.
    *        APPEND l_r_object.
    *      ENDLOOP.
    LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'ZPR_ST-FRGDT'.
                MOVE-CORRESPONDING l_s_select to DATE1.
                DATE1-sign = 'I'.
                DATE1-option = 'GE'.
                clear DATE1-high.
                APPEND DATE1.
          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 InfoSource table lines and database entries, this is trivial.
    * In other cases, it may be impossible and some estimated value has to
    * be determined.
          l_maxsize = g_s_interface-maxsize.
          OPEN CURSOR WITH HOLD g_cursor FOR
    *      SELECT (g_t_fields) FROM tadir
    *                               WHERE pgmid  IN l_r_pgmid AND
    *                                     object IN l_r_object.    "#EC CI_GENBUFF
    *@ CODE FOR THE STRUCTURE TO FILL IN FROM EBAN AND EBKN@*
                SELECT a~banfn a~bnfpo k~zebkn a~knttp k~vbeln k~ps_psp_pnr k~gsber a~werks a~statu a~ekgrp a~menge a~menge a~frgdt a~meins
    * INTO CORRESPONDING FIELDS OF TABLE IT1
                FROM  eban AS a INNER JOIN ebkn AS k ON ( a~banfn = k~banfn AND a~bnfpo = k~bnfpo )
                WHERE a~banfn GE '2000000000' AND a~banfn LE '2999999999' and a~loekz eq ' ' and a~frgdt ge '20130401' and a~FRGKZ eq '2'.
    *BREAK-POINT.
        ENDIF.                             "First data package ?
    * Fetch records into interface table. There are two different options:
    * - fixed interface table structure for fixed InfoSources have to be
    *   named E_T_'Name of assigned source structure in table ROIS'.
    * - for generating applications like LIS and CO-PA, the generic table
    *   E_T_DATA has to be used.
    * Only one of these interface types should be implemented in one API !
        FETCH NEXT CURSOR g_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE e_t_DATA
                   PACKAGE SIZE l_maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR g_cursor.
    *      bice_trace_close g_r_tracer.
          RAISE no_more_data.
        ENDIF.
    *    bice_collect_table g_r_tracer e_t_data.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    in the above I_t_fields and I_T_select structures  are not getting data .....
    can any one pleasee let me know what mistake i hvae done with my code?
    and i m unbale to change data source value to F1 if i am trying to change my function module and extract structure are disappearing....
    i m not getting why it is happening .......
    thank you
    vijay

    Hi yasemin,
       I m bit confused here with the line below
                                     IF i_initflag = sbiwa_c_flag_on.(if we pass 'X' then it will enter loop and checks for F or D and then assigns values to I_T_SELECT and I_T_Fields structure)
          accordfing to my code i feel it will work for any one not both(F or D).
    one more doubt rsax_biw_get_data extraction method is F2 few of them are asking to change to F1.
    so tried running a code then in RSO2 extact structure and FM both dissapeared i did not get why it happened ?
    can you please let me know why it happend
    thanks
    vijay

  • Creating a delta against a custom Function Module datasource

    I currently created a datasource via RSO2 against a function module.  The function module uses the RSAX_BIW_GET_DATA_SIMPLE as a template and I molded this against the data that I need.  Full loads for this extractor work without any problems but I'm having issues with creating a delta load.  Is there someone that can create a list on how to createa delta against a function module.  I believe there is more to do this than just have RSO2 set up against a field.  How do I get the new records into RSA7?  Thanks for your help.
    Tim

    We are trying to create the same delta extract from r/3 against a custom z table to an infocube in BW. Were you able to do this successfully using the f RSVD_BW_GET_DELTA_DATA as a template and did u receive the code? If so, are you able to send your code?
    My function modules works and fetches the data normally but the info package when scheduled gives an error
    <b>Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Service API .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.</b>
    You can send the code or procedure to my mail id
    [email protected]
    Thanks in advance,
    Best Regards,
    Vishal

  • Error executing custom function module

    Hi all,
    am trying to read a function module form my java code as below.
    There is no problem with the function module.
    I think there is some problem with the java code that is written. I am sure the problem lies with the  TABLES IT_PRODUCT_DATA STRUCTURE  ZOG_ITEM_SCREENSTR.
    Function module parameters and signature.
    FUNCTION ZGET_CUST_ORDERGUIDE_ITEMDATA.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(IV_ORDER_GUID) TYPE  CRMT_OBJECT_GUID OPTIONAL
    *"     VALUE(IV_CUSTOMER) TYPE  BU_PARTNER
    *"  TABLES
    *"      IT_PRODUCT_DATA STRUCTURE  ZOG_ITEM_SCREENSTR
    Java Code that is Implemented is attached above.
    public ArrayList fetchOrderGuide(String customerNumber) {
              ArrayList itemList = new ArrayList();
                                       ItemSalesDoc itemSalesDoc = new ItemSalesDoc();
              if (log.isDebugEnabled()) {
                   log.debug("inside ZAdminLogin");
              try
              JCoConnection aJCoCon = (JCoConnection) getConnectionFactory().getConnection(com.sap.isa.core.eai.init.InitEaiISA.FACTORY_NAME_JCO,
                                                                                                 com.sap.isa.core.eai.init.InitEaiISA.CON_NAME_ISA_STATEFUL);
                   try
                        try
                             JCO.Function zFetchSalesOrderFunctionModule = aJCoCon.getJCoFunction("ZGET_CUST_ORDERGUIDE_ITEMDATA");
                             // set the import values
                             Table zItemsTable = new Table("ITEMS");
                                       //zPackagesTable.addColumn(Table.TYPE_STRING,"HUI");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JOGITEM");
                             zItemsTable.addColumn(Table.TYPE_INT,"JPRUOM");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JPRSEQ");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JOGDESC");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JLINE");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JOGNR");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JPACK");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JSIZE");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JBRAND");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JWEEKAVG");
                             zItemsTable.addColumn(Table.TYPE_STRING,"JDELFLAG");
                             JCO.ParameterList importParams = zFetchSalesOrderFunctionModule.getImportParameterList();
                             importParams.setValue("BP-104", "IV_CUSTOMER");
                             aJCoCon.execute(zFetchSalesOrderFunctionModule);
                             JCO.Table zRtItems = zFetchSalesOrderFunctionModule.getTableParameterList().getTable("IT_PRODUCT_DATA");
                                            int numberOfPackages = zRtItems.getNumRows();
                                            if (log.isDebugEnabled()) {
                                                 log.debug("number of packages " + numberOfPackages);
                                            if (numberOfPackages > 0)
                                                 for (int j=0; j<numberOfPackages; j++)
                                                      TableRow itemRow = zItemsTable.insertRow();
                                                      //itemRow.setRowKey(new TechKey(zRtItems.getString("EXIDV")));
                                                      //packageRow.getField("HUI").setValue(zGoods.getString("EXIDV"));
                                                      itemRow.getField("JOGITEM").setValue(zRtItems.getString("OGITEM"));
                                                      itemRow.getField("JPRSEQ").setValue(zRtItems.getString("PRSEQ"));
                                                      itemRow.getField("JOGDESC").setValue(zRtItems.getString("OGDESC"));
                                                      itemRow.getField("JLINE").setValue(zRtItems.getString("LINE"));
                                                      itemRow.getField("JOGNR").setValue(zRtItems.getString("OGNR"));
                                                      itemRow.getField("JPACK").setValue(zRtItems.getString("PACK"));
                                                      itemRow.getField("JSIZE").setValue(zRtItems.getString("SIZE"));
                                                      itemRow.getField("JBRAND").setValue(zRtItems.getString("BRAND"));
                                                      itemRow.getField("JWEEKAVG").setValue(zRtItems.getString("WEEKAVG"));
                                                      itemRow.getField("JDELFLAG").setValue(zRtItems.getString("DELFLAG"));
                                                      zRtItems.nextRow();
                        catch(JCO.AbapException abapException)
                             //Exception thrown, user is not valid
                             if(log.isDebugEnabled())
                                  log.debug(  abapException.getKey());
                   catch (Exception ex)
                        if (log.isDebugEnabled()) {
                             log.debug(ex);
                   finally
                        aJCoCon.close();
              catch(BackendException beeEx)
                   if(log.isDebugEnabled())
              return itemList;     
    LOGDETAILS
    ZGET_CUST_ORDERGUIDE_ITEMDATA:: - IN: INPUT * IV_CUSTOMER='BP-104' IV_ORDER_GUID='00000000000000000000000000000000'
    Oct 9, 2008 6:48:41 AM,507 SAPEngine_Application_Thread[impl:3]_7 Error com.sap.isa.core.eai.sp.jco.JCoConnectionStateful Error occcurred in EAI layer "com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Trying to access row values in a table which does not have any rows yet".
    [EXCEPTION]
    com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Trying to access row values in a table which does not have any rows yet
                at com.sap.mw.jco.JCO$Record.checkRowCapacity(JCO.java:12354)
                at com.sap.mw.jco.JCO$Record.getString(JCO.java:12827)
                at com.sap.mw.jco.JCO$Field.getString(JCO.java:11055)
                at com.sap.isa.core.eai.sp.jco.JCoUtil.paramIterator(JCoUtil.java:412)
                at com.sap.isa.core.eai.sp.jco.JCoUtil.logCall(JCoUtil.java:382)
                at com.sap.isa.core.eai.sp.jco.JCoUtil.logCall(JCoUtil.java:236)
                at
    All helpful answers will be rewarded heavily

    hi,
    first of all you do not set the import values for your table correct. You should do something similar like this:
    Function myFunction = connection.getJCoFunction(Z_FM");
    Table myTable = myFunction.getTableParameterList().getTable("Z_TABLE");
    for(int i=0; i<2; i++) {
        myTable.appendRow();
                        myTable.setValue(value1,"VALUE1");
                        myTable.setValue(value2,"vALUE2");
                   connection.execute(myFunction);
    Did you debug your java class? You should check at which point your java class throws the error.
    Regards
    Michael

  • Error while executing Function Module UNIT_CONVERSION_WITH_FACTOR.

    Hi experts:
        I'm trying to use the UNIT_CONVERSION_WITH_FACTOR Function Module on
    BW but an error message appears, I searched for Notes on the SAP
    Marketplace but only found a single note that describes the same
    situation that we're experiencing (SAP Note 1333415), the thing is that
    such a note is applicable for SAP BASIS version 702 but I'm using SAP
    BASIS version 700.
    Steps for Reconstruction    
    - On transaction SE37 call the u201CUNIT_CONVERSION_WITH_FACTORu201D Function
    Module.
    - Click on the u201CTest/Executeu201D button (or press the F8 key).
    - Enter the following values:
       o ADD_CONST = 0
       o DENOMINATOR = 1
       o INPUT = 20
       o NUMERATOR = 1568
    - Click on the u201CExecuteu201D button (or press the F8 key).
    - The Exception u201CTYPE_INVALIDu201D is reached and the following message
    appears: u201CUse a number field for field OUTPUTu201D.
    I also tried to use this Function Module on R/3 and the result was the same.
    Do you have any suggestion to fix this error?
    Thanks in advance for your help,
    Francisco Milán.

    Hi Francisco,
    Check with SAP Note No. 854978.
    Hope this would help you.
    Rgds,
    Mohit

  • Error while activating function module

    Hi,
    I copied a standard SAP function module L_TO_CREATE_DN.
    When i activated the function group it throws an error saying that " Field "I_COMMIT_WORK" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement".
    All the global data has been copied properly in the TOP include but still while activating the function group we are getting the above said error.
    If anyone has encountered same kind of issue.......Please guide.
    Thanks and regards,
    Ramesh

    I was also facing the same issue, when I tried copying just 1 or 2 FM's from that FG L03B.
    Finally, I copied the whole function group, including all FM's into Z FG, and FM's, and it got activated w/o any hitches. Looks like there is lot of dependency between the includes and FM's code.
    Regards
    Deepthi

Maybe you are looking for

  • Will Apple help me with this issue?

    Dear Sir or Madam, I am a student in China, I really need your help, my iphone now problems bothers me! HELP ME PLEASE!!! As I bought my iPhone 4s(16GB,White) in the USA from Sprint, full price with tax,  unlocked ,it was excepted to be a global phon

  • Error in List cube at info cube

    Hi All While checking data in info cube level using traction listcube  and selecting info objects and keyfigure for output and also selecting setting tab under 3 checkboxs while executing the info cube ,we are getting error message line  Error readin

  • How do I add borders in numbers -

    When I add a border in Numbers, it looks right but when I go to add another in the same table, the first one disappears -

  • Why can my buddy see me online, but I can't see him?

    For the last 2-3 weeks I have not been able to see my buddy online, but he sees me online. He can call me, but I can't call him because it says he is offline. I have checked all the preferences and I don't have him blocked anywhere. Any suggestions a

  • Feedback Thread for MX200

    Please use this thread to provide any feedback for firmware MU02 for MX200. Firmware revision MU02 for the Crucial MX200 (all form factors) is now available. This firmware update applies to the MX200 SSD (all form factors), and should not be applied