Ansicht
Dokumentation

03484 - FOR ALL ENTRIES IN itab WHERE cond since 4 0B_COM

03484 - FOR ALL ENTRIES IN itab WHERE cond since 4 0B_COM

CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

FOR ALL ENTRIES IN itab WHERE cond since 4 0B_COM


Use:

DESCRIBE TABLE <ITAB> LINES N.

where N:

DATA: N TYPE I.

This will return the number of lines in an internal table.

Hope we are helping you,

Brian


-----Original Message-----
From: Rick Githens
To: 'SAP400 ListServer'
Sent: 10/15/01 4:54 PM
Subject: RE: FOR ALL ENTRIES IN itab WHERE cond since 40B_COM

Hi Jim,Mike,Brian et al

Mike - I am just a dabbler also (mainly a cutter and a paster). I saw
that
help and I took it to mean the exact opposite - that if the itab had no
records, I'd get no records. Perhaps my view was skewed because I was
assured that this used to work.
Brian - yes all of the above - when we moved to the new 40B_COM kernel,
we
also applied all the latest kernel, r3trans, etc. patches. It failed
before
any new HotP's or LCP's but some of them have also been installed on top
of
this.
Jim - sy-dbcnt is indeed dynamic, it holds the record count of the last
read/written to?? table. If I set a breakpoint right before the select
statement, it has a sy-dbcnt (record count) for another table. I guess I
need to define a variable and update it with sy-dbcnt right after the
last
entry is written to the internal table I'm using, and checking it later.
Or
maybe there is a better way?? Is there some trick to getting the number
of
records in an internal table when you need it? For that matter, how do I
define an individual field (not part of a data structure) that is like
sy-dbcnt and then eval it to the value of sy-dbcnt when needed?

Hope that's confusing enough,
Rick

-----Original Message-----
From: MMartinZs... [mailto:MMartinZs...]
Sent: Monday, October 15, 2001 4:38 PM
To: RGithensZg...
Cc: sap400Zm...
Subject: RE: FOR ALL ENTRIES IN itab WHERE cond since 40B_COM


Hi Rick,

I did notice in the help text that the clause 'For all entries..' will
perform as follows:
" If the internal table itab contains no entries, the processing
continues as if there were no WHERE condition cond."

This tells me that if your itab is empty, you will select * from KONV
which
could cause the below dump. Of course, I just dabble in ABAP, and I am
by
no means an expert at programming.

I hope this helps,
Mike D. Martin
SAP Basis Administrator
SOLA Optical, USA
707-763-9911 x6106
mmartinZs...


-----Original Message-----
From: Rick Githens [mailto:RGithensZg...]
Sent: Monday, October 15, 2001 11:46 AM
To: 'SAP400 ListServer'
Subject: FOR ALL ENTRIES IN itab WHERE cond since 40B_COM


Greetings,

I think this is DB2/400 specific but I'm not sure. We have a few
programs
which hit very large tables (KONV, BSEG, etc.). In order to reduce the
number of records required before selecting from these big guys, we
usually
build an internal table which narrows down the number of records we
really
want and then when we do the select-into-from statement, we use the "for
all
records in" the internal table where (for instance) the document number
in
the internal table equals the document number in KONV. This has worked
for a
long time (and is a pretty common ABAP sql procedure from what I can
tell).
Now if the internal table has no records in it, it selects 4 times the
total
number of records in KONV into an internal table and then blows up as
soon
as a sort is issued (TSV_INDEX_INDEX_NO_ROLL_MEMORY). I have read most
of
the notes on that error and agree you can't protect an idiot from
himself.
If they want to try and select a volume of data which would choke an
elephant, they deserve to get a dump. However, that is not the case
here.
They should get NO RECORDS (and actually fall through rather quickly).
Has
anyone else seen this? Is this maybe an IBM DB problem where since the
split
from the kernel, it is not resolving that "for all entries in" clause
correctly? Is there a coding alternative to that "for all entries in".
(i.e.
If I were in interactive SQL, I would use a subselect where
"file1.docnumber
in (select docnumber from file2) or something like that)

Thanks,
Rick


The group has decided in January 2000
to be free of recruiting and other SPAM!
Violaters will be banned from the group.

SAP on System i-unsubscribeZegroups.com



Your use of consolut is subject to
http://www.consolut.net


Durban Tours - Südafrika Safari

Vendor Master (General Section)   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 5947 Date: 20240329 Time: 030110     sap01-206 ( 2 ms )