Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

select

Former Member
0 Likes
541

hi all,

i am using a select statement extracting matnr werks from mseg table,

the table contains 3 crore records. and i want to update these records in to

data base table(ztable).

wen i run the program. for executing select statement its taking lot of time and after some time its saying timed out.

wat is the way i can update al the records in ztable.

thanks in advance

siva

1 ACCEPTED SOLUTION
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
523

Hi,

Instead of using one SELECT statement to READ all the data into an internal table.

What you can do is use

SELECT .......... PACKAGE SIZE 1000.

  • Push 1000 records on to Ztable

  • update your Ztable with the internal table data.

  • Clear the internal table.

ENDSELECT.

The performance will be bad, but since you just want to run this program once so that you copy the data onto the Ztable this should not be a problem.

Regards,

Sesh

4 REPLIES 4
Read only

Former Member
0 Likes
523

Hello,

Execute ur Program in the Background.

Regards,

Deepu.K

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
524

Hi,

Instead of using one SELECT statement to READ all the data into an internal table.

What you can do is use

SELECT .......... PACKAGE SIZE 1000.

  • Push 1000 records on to Ztable

  • update your Ztable with the internal table data.

  • Clear the internal table.

ENDSELECT.

The performance will be bad, but since you just want to run this program once so that you copy the data onto the Ztable this should not be a problem.

Regards,

Sesh

Read only

Former Member
0 Likes
523

SELECT EBELN " Purchasing Document Number

ERNAM " Name of Person who Created

" the Object

LIFNR " Vendor's account number

EKGRP " Purchasing group

BEDAT " Purchasing Document Date

FROM EKKO

PACKAGE SIZE 10000

APPENDING TABLE T_EBELN

WHERE EBELN IN S_EBELN

AND BEDAT IN S_BEDAT.

ENDSELECT.

Write the code similar to the above SELECT QUERY.... this helps you.......

Regards,

Pavan

Read only

varma_narayana
Active Contributor
0 Likes
523

Hi..

Use the code below and run the program in background incase of probelm in Foreground.

DATA : ITAB TYPE TABLE OF ZTABLE.

SELECT MATNR WERKS

FROM MSEG

INTO TABLE ITAB

PACKAGE SIZE 10000.

INSERT ZTABLE FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.

<b>Reward if Helpful.</b>