‎2008 Jun 18 6:07 AM
Hi Experts,
Please help , it is very urgent.
Time-out problem.I have query given below
DELETE ADJACENT DUPLICATES FROM ITAB12 COMPARING BKTXT.
LOOP AT itab12.
SELECT SINGLE BKTXT BELNR STBLG FROM bkpf CLIENT SPECIFIED
INTO CORRESPONDING FIELDS OF itab11
WHERE bktxt = itab12-bktxt
and bukrs = 'NDPL'
and mandt = sy-mandt.
IF ITAB11-BKTXT NE SPACE.
APPEND ITAB11.
CLEAR ITAB11.
ENDIF.
ENDLOOP.
ITAB12 contains 8888 number of record
and BKPF contains 453144 records.
I have used other syntex also , it is given below but i am facing same problem
SELECT * FROM bkpf INTO CORRESPONDING FIELDS OF TABLE itab11 FOR ALL ENTRIES IN itab12
WHERE bktxt = itab12-bktxt
and bukrs = 'NDPL'.
still when this query comes it stuck here and give time-out runtime error.
Please help.
thanks in advance
abhishek
‎2008 Jun 18 6:11 AM
hi,
tables BSEG,BKPF consists of huge data.
so when ever u r selecting data from these tables use as many conditions as possible.
try to use all primary key fields in selection even if thy r not required.
check ur select statements in se30 to know how much time is taken by ur select staments to retrive data.
rerward points if hlpful.
‎2008 Jun 18 6:12 AM
Try if indexing helps....
can make a index with BKTXT BELNR STBLG fields...
‎2008 Jun 18 6:14 AM
Hi,
try running the program as the background job. Then you wont get any time-out error.
Thanks and regards.
‎2008 Jun 18 6:17 AM
Hi,
Try the following ways.
1. do not use select * into corresponding fields, rather mention the required fields.
2. write both the methods which u wrote above in se30 and check the time consumption for data retreival
Sometimes, for all entires takes too much of time than loop statements.
3. Try indexing the table on the fields which u r accessing.
Indexing helps fastens the data retrieval process.
Reward if useful******
Regards,
Ruby.
‎2008 Jun 18 6:30 AM
Hi,
Dnt use select *..
Instead give specific fields.
And declare TABLE itab11 with that fields only and then instead of giving into corresponding fields give INTO TABLE itab11 .
And give more conditions in where if possible.
Reward pts if helpfull.
Regards,
Dhan