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

Insert ITAB INDEX SY-TABIX Problem

Former Member
0 Likes
2,265

Hi Experts,

I have a problem in my report.

Please look into the code.

loop at li_basez980.

read table i_z980 with key spmon = l_spmon

matnr = li_basez980-matnr

kunnr = li_basez980-kunnr

werks = li_basez980-werks

vkorg = li_basez980-vkorg binary search.

if sy-subrc ne 0.

i_z980-spmon = l_spmon.

i_z980-matnr = li_basez980-matnr.

i_z980-kunnr = li_basez980-kunnr.

i_z980-werks = li_basez980-werks.

i_z980-vkorg = li_basez980-vkorg.

i_z980-basme = li_basez980-basme. " 8/6/07

i_z980-waers = c_waers.

i_z980-cpudt = v_datum.

i_z980-cputm = v_uzeit.

i_z980-znetsalekg = 0.

i_z980-znetsalevl = 0.

insert i_z980 index sy-tabix.

clear i_z980.

endif.

endloop.

When run my report in Foreground it runs fine. But when i run the same report in Background job gets cancelled when the index reaches to 228984 once 230070 once and 230104 once at insert statement i.e " insert i_z980 index sy-tabix." . I found this by debugging the Job.

Please help me if you know the solution.

Regards,

Ravikumar P

Edited by: Ravikumar P on Mar 30, 2010 4:40 PM

Hi Experts,

I have a problem in my report.

Please look into the code.

loop at li_basez980.

read table i_z980 with key spmon = l_spmon

matnr = li_basez980-matnr

kunnr = li_basez980-kunnr

werks = li_basez980-werks

vkorg = li_basez980-vkorg binary search.

if sy-subrc ne 0.

i_z980-spmon = l_spmon.

i_z980-matnr = li_basez980-matnr.

i_z980-kunnr = li_basez980-kunnr.

i_z980-werks = li_basez980-werks.

i_z980-vkorg = li_basez980-vkorg.

i_z980-basme = li_basez980-basme. " 8/6/07

i_z980-waers = c_waers.

i_z980-cpudt = v_datum.

i_z980-cputm = v_uzeit.

i_z980-znetsalekg = 0.

i_z980-znetsalevl = 0.

insert i_z980 index sy-tabix.

clear i_z980.

endif.

endloop.

When run my report in Foreground it runs fine. But when i run the same report in Background job gets cancelled when the index reaches to 228984 once 230070 once and 230104 once at insert statement i.e " insert i_z980 index sy-tabix." . I found this by debugging the Job.

Please help me if you know the solution.

Regards,

Ravikumar P

Edited by: Ravikumar P on Mar 30, 2010 4:40 PM

9 REPLIES 9
Read only

Former Member
0 Likes
1,433

What does the job log say?

Read only

0 Likes
1,433

Job log is

Date Time Msg.ID Message

03/30/2010 10:02:49 00516 Job started

03/30/2010 10:04:13 00554 Job also cancelled due to process termination. See the system log

Read only

0 Likes
1,433

>

> See the system log

So, what does the system log say??

Rob

Read only

0 Likes
1,433

System log:

10:06:06 D2 088 PAKALRA SM37 R0L S Program set manually to debug mode by user BACKJOB

10:09:27 B4 088 BACKJOB Q0E K Signal 4 received by operating system

10:09:27 B4 088 BACKJOB R68 W Perform rollback

10:09:27 B4 088 BACKJOB R68 W Perform rollback

10:09:27 B4 088 BACKJOB AB2 X > Program ZSDUZ980, Include ZSDUZ980, line 1171

10:09:27 B4 088 BACKJOB AB0 T Run-time error getwa_abswa

10:09:27 B4 088 BACKJOB Q02 S Stop Workproc 4, PID 23796

10:09:47 B4 Q01 S Start Workproc 4, 12 times since system startup. PID 23800

10:09:47 B4 088 BACKJOB F6F W TemSe object JOBLGX10055001X43418 was closed remotely

10:09:47 B4 088 BACKJOB R47 K Delete session 001 after error 023

Read only

0 Likes
1,433

Hi Ravi,

in ST22 you will probably see a short dump that tells you that no more memory space could be allocated.

This happens if you hold too many data in internal tables or it is a programming error like appending to internal table within loop.

- avoid SELECT *

- process packages

Regards,

Clemens

Read only

0 Likes
1,433

But the same program when run in foreground is running fine with no memory overflows.

Read only

former_member302911
Active Participant
0 Likes
1,433

HI,

Sorry for mistake, i haven't seen internal table.

Angelo.

Read only

Subhankar
Active Contributor
0 Likes
1,433

Hi,

This is happening because after read you inserting the records when sy-surbc <> 0. At that time did you check the sy-tabix value. This value is comming correctly. You directly append the same.

loop at li_basez980.

read table i_z980 with key spmon = l_spmon

matnr = li_basez980-matnr

kunnr = li_basez980-kunnr

werks = li_basez980-werks

vkorg = li_basez980-vkorg binary search.

if sy-subrc ne 0.

i_z980-spmon = l_spmon.

i_z980-matnr = li_basez980-matnr.

i_z980-kunnr = li_basez980-kunnr.

i_z980-werks = li_basez980-werks.

i_z980-vkorg = li_basez980-vkorg.

i_z980-basme = li_basez980-basme. " 8/6/07

i_z980-waers = c_waers.

i_z980-cpudt = v_datum.

i_z980-cputm = v_uzeit.

i_z980-znetsalekg = 0.

i_z980-znetsalevl = 0.

insert i_z980 index sy-tabix.

clear i_z980.

endif.

endloop.

Read only

Former Member
0 Likes
1,433

Assuming "i_z980" is the internal table, use "Append i_z980" instead of "Insert i_z980 index sy-tabix".

Regards

Vinod