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

Open Cursor - internal table

Hello,

I'm trying to use the

OPEN CURSOR

statement in my FM which is used for data extraction to split the data in packages of 10 000.

The problem is that I have an internal table where my data is (because I had to extract it first from a cluster table). How is the correct syntax?

 OPEN CURSOR s_cursor FOR SELECT * FOR ALL ENTRIES IN it_tab

does not work.

Or is there any other possibility to split the data into packages?

thanks

Margit

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Jan 16, 2009 at 01:27 PM

    Try this :

    E_T_DATA[] = your internal table[].

    Donot use Open Cursor and fetch cursor statements.

    While pulling it to BI you can restrict the package size.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2009 at 01:17 PM

    Hi Margit,

    you usually limit the package not at the open cursor command but at the fetch statement by fetch next cursor into.... package size x.

    regards

    Siggi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      yes, i know that i have to limit the package size with the fetch statement

      but i'm not able to define the cursor correctly... i don't know why.. 😔

      OPEN CURSOR s_cursor FOR SELECT * from 

      after from it always wants a transparent table, but i do not have a transparent table, but only an internal table (data from internal table were fetched from a cluster table)

  • Posted on Jan 16, 2009 at 01:19 PM
    Open cursor ...

    This is not valid for internal table (I feel) it sets cursor at database level.

    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.