Skip to Content
author's profile photo Former Member
Former Member

Generic Funcion Module: E_T_DATA is cleared after RAISE NO_MORE_DATA

I have constructed a generic function module and also an extract structure in order to build a generic extractor. The abap code fills the E_T_DATA with all the data of the SELECT statement, and a RAISE NO_MORE_DATA instruction was included on the end of the code. I tested my extractor using RSA3 and it returns 0 records. I debugged the code and E_T_DATA is receiving the data (it's filled ok) but data is lost after entering to the RAISE NO_MORE_DATA.

What i am trying to say is that my code is filling E_T_DATA , if i cut the RAISE NO_MORE_DATA then the RSA3 is returning the data, but it never ends because it need the RAISE NO_MORE_DATA in order to stop.

But when i put the RAISE NO_MORE_DATA , the E_T_DATA is cleared and the RSA3 returns 0 records.

Please help me...

Carlos España

CEMPRO.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jun 22, 2005 at 11:47 PM

    Hi,

    Try this,

    e_t_data[] = t_fras[].

    if i_initflag is initial.

    raise no_more_data.

    endif.

    But, Basically the no_more_data exception is raised only when there is no data for the selection.This will be the first checkup once you start fetching the cursor. As per your logic e_d_data will be updated only if there is no data which is when i_initflag is initial.Because somewhere else in the top of the code you will be setting i_initflag = some value.

    let me know if you have any problem.

    Thank you

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 22, 2005 at 11:42 PM

    THIS IS MY CODE, PLEASE NOTE THAT I AM USING ALL THE RELEVANT INSTRUCTIONS IN ORDER TO BUILD A GENERIC EXTRACTOR.

    FUNCTION ZTPM001.

    *"----


    ""Interfase local

    *" IMPORTING

    *" VALUE(I_REQUNR) TYPE RSAAPI_IF-REQUNR

    *" VALUE(I_DSOURCE) TYPE ROOSOURCE-OLTPSOURCE OPTIONAL

    *" VALUE(I_MAXSIZE) TYPE RSAAPI_IF-MAXSIZE OPTIONAL

    *" VALUE(I_INITFLAG) TYPE RSAAPI_IF-INITFLAG OPTIONAL

    *" VALUE(I_READ_ONLY) TYPE ARCHREAD OPTIONAL

    *" TABLES

    *" T_FRAS STRUCTURE ZTPM_FACTURAS OPTIONAL

    *" T_RES_FRAS STRUCTURE ZTPM_RESUMEN_FACTURAS OPTIONAL

    *" T_CONDICIONES STRUCTURE ZTPM_CONDICIONES OPTIONAL

    *" E_T_DATA STRUCTURE ZTPM_FACTURAS OPTIONAL

    *" I_T_SELECT STRUCTURE RSSELECT OPTIONAL

    *" I_T_FIELDS STRUCTURE RSFIELDSEL OPTIONAL

    *" EXCEPTIONS

    *" NO_MORE_DATA

    *"----


    perform load_my_data.

    if i_initflag is initial.

    e_t_data[] = t_fras[].

    raise no_more_data.

    endif.

    ENDFUNCTION.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.