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

Shotdump In internal table population

shishupalreddy
Active Contributor
0 Likes
1,021

In one of my program I am populating the internal table which leads to the following dump error saying that 'System couldnto extend the size of internal table '

TSV_TNEW_PAGE_ALLOC_FAILED is the exception raised .

Will you please get me the solution for this issue asap

Thanks

In one of my program I am populating the internal table which leads to the following dump error saying that 'System couldnto extend the size of internal table '

TSV_TNEW_PAGE_ALLOC_FAILED is the exception raised .

Will you please get me the solution for this issue asap

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
970

How r u populating that internal table. And how much data is it getting populated with?

Read only

Former Member
0 Likes
970

How did u declare ur internal table.

Paste the code it may help us to understand more.

Regards

Read only

shishupalreddy
Active Contributor
0 Likes
970

In program this is the way internal table is populated .

1. It will be populated with data from a customized database table .

2. The customized table contains around 3 laks of records.

3. with the populated data it is trying to modify one more custmized table .

here in this step it will populate the second customized table in no of versions as per the selection criteria.

We can say that internal table population is giving dump as the population is in number of versions ranging from 1 to 99 .

So here if you could provide me the solution how to extend the size of the internal table it would be a gr8 help for me

Thanks

Read only

shishupalreddy
Active Contributor
0 Likes
970

her is the code of the program .

REPORT /rb17/ym_forc_model_ext_new .

&----


*& T Y P E S *

&----


TYPES: BEGIN OF typ_itab_rec.

INCLUDE STRUCTURE /rb17/ym_mod_new.

TYPES: END OF typ_itab_rec.

  • table types

TYPES: typ_itab_table TYPE STANDARD TABLE OF typ_itab_rec

WITH KEY matnr werks .

&----


*& D A T A *

&----


  • Internal table to store records from database

DATA : g_t_itab TYPE typ_itab_table WITH HEADER LINE .

  • Internal table to fill datbase

DATA : g_t_jtab TYPE typ_itab_table WITH HEADER LINE .

  • Work area

DATA : g_r_itab TYPE typ_itab_rec.

DATA : counter TYPE i .

************************************************************************

  • SELECTION SCREEN

************************************************************************

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS : p_vers TYPE vrsio.

SELECTION-SCREEN END OF BLOCK b1.

&----


*& Event START-OF-SELECTION

&----


PERFORM get_data.

PERFORM populate_data.

PERFORM assign_version.

PERFORM update_table.

&----


*& Form get_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM get_data .

REFRESH : g_t_itab[].

SELECT * FROM /rb17/ym_model INTO CORRESPONDING FIELDS OF

TABLE g_t_itab.

ENDFORM. " get_data

&----


*& Form populate_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM populate_data .

DATA : l_f_bstrf TYPE bstrf,

l_f_prctr TYPE prctr,

l_f_maabc TYPE maabc,

l_f_mfrnr TYPE mfrnr,

l_f_kondm TYPE kondm,

l_f_ktgrm TYPE ktgrm,

l_f_bezek TYPE bezap,

l_f_lifnr TYPE lifnr.

CLEAR : l_f_bstrf , l_f_prctr , l_f_maabc, l_f_mfrnr,

l_f_kondm , l_f_ktgrm , l_f_bezek, l_f_lifnr.

CLEAR g_r_itab.

LOOP AT g_t_itab.

SELECT SINGLE bstrf prctr maabc INTO

(l_f_bstrf , l_f_prctr , l_f_maabc) FROM marc

WHERE matnr = g_t_itab-matnr AND

werks = g_t_itab-werks.

SELECT SINGLE mfrnr INTO l_f_mfrnr FROM mara

WHERE matnr = g_t_itab-matnr.

SELECT SINGLE kondm ktgrm INTO (l_f_kondm , l_f_ktgrm) FROM mvke

WHERE matnr = g_t_itab-matnr.

SELECT SINGLE bezek INTO l_f_bezek FROM t25b1

WHERE wwz02 = g_t_itab-prmgr.

SELECT SINGLE lifnr INTO l_f_lifnr FROM eord

WHERE matnr = g_t_itab-matnr AND

werks = g_t_itab-werks AND

flifn = 'X'.

IF sy-subrc NE 0.

SELECT SINGLE lifnr INTO l_f_lifnr FROM eord

WHERE matnr = g_t_itab-matnr AND

werks = g_t_itab-werks .

ENDIF.

*get backorder value

PERFORM get_backorders USING g_t_itab-matnr

CHANGING g_t_itab-backord.

g_r_itab-bstrf = l_f_bstrf.

g_r_itab-prctr = l_f_prctr.

g_r_itab-maabc = l_f_maabc.

g_r_itab-mfrnr = l_f_mfrnr.

g_r_itab-kondm = l_f_kondm.

g_r_itab-ktgrm = l_f_ktgrm.

g_r_itab-bezek = l_f_bezek.

g_r_itab-lifnr = l_f_lifnr.

*set version = 1 for new rows.

g_r_itab-version = 1.

MODIFY g_t_itab FROM g_r_itab TRANSPORTING bstrf mfrnr prctr kondm

ktgrm lifnr bezek maabc

backord version.

ENDLOOP.

SORT g_t_itab BY spmon vrsio bukrs matnr version.

ENDFORM. " populate_data

&----


*& Form get_backorders

&----


  • text

----


  • -->P_G_T_ITAB_MATNR text

  • <--P_G_T_ITAB_BACKORD text

----


FORM get_backorders USING p_g_t_itab_matnr TYPE matnr

CHANGING p_g_t_itab_backord TYPE netwr_ap.

TYPES: BEGIN OF typ_outord.

INCLUDE STRUCTURE /rb17/yv_outord.

TYPES: END OF typ_outord.

DATA: t_outord TYPE TABLE OF typ_outord WITH HEADER LINE.

REFRESH: t_outord.

  • first load outstanding orders for out materials from

  • nightly extract of data (run from /rb17/yv_outstanding_orders)

SELECT * FROM /rb17/yv_outord INTO TABLE t_outord

WHERE matnr = p_g_t_itab_matnr.

  • accumulate all past due orders

LOOP AT t_outord .

IF t_outord-edatu < t_outord-wadat "backorder

OR t_outord-edatu < sy-datum.

IF t_outord-bmeng > 0.

ADD t_outord-bmeng TO p_g_t_itab_backord. "+ confirmed

ELSE.

ADD t_outord-kwmeng TO p_g_t_itab_backord. "+ ordered

ENDIF.

SUBTRACT t_outord-lfimg FROM p_g_t_itab_backord. "- delivered

ENDIF.

ENDLOOP.

ENDFORM. " get_backorders

&----


*& Form update_table

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM update_table .

DELETE FROM /rb17/ym_mod_new.

MODIFY /rb17/ym_mod_new FROM TABLE g_t_jtab .

COMMIT WORK.

ENDFORM. " update_table

&----


*& Form assign_version

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM assign_version .

  • delete records with version = no of versions given by user.

LOOP AT g_t_itab .

IF g_t_itab-version EQ p_vers.

DELETE g_t_itab.

CONTINUE.

ENDIF.

ENDLOOP.

  • Changing versions and populating final internal table

LOOP AT g_t_itab .

counter = p_vers - 1 .

DO counter TIMES .

MOVE-CORRESPONDING g_t_itab TO g_r_itab.

g_r_itab-version = counter + 1 .

****here in this line it z going for dump *******

APPEND g_r_itab TO g_t_jtab .

counter = counter - 1.

CLEAR g_r_itab.

ENDDO .

ENDLOOP.

SORT g_t_itab BY spmon vrsio bukrs matnr version.

ENDFORM. " assign_version

thanks

Read only

0 Likes
970

you had used so many select singles in the loop.

remove all those and for each select , declare one internal table and select all the records at a time

then use read table inside the loop

Read only

0 Likes
970

Hello,

1. Try not use select within a loop statment,try to use for all entries.This just suggestion.

2. Try declaring internal using occurs 0,it may help u.

Regards

Read only

Former Member
0 Likes
970

Hi,

Can you reduce the number of records fetched from the custom table in step 1 using selection criteria and then update the other custom table in step2.

Also you can increase the header size of the table from 0 to higher value in data declaration for itab.

Hope that wud help.

Cheers,

Vikram

Pls reward for helpful replies!!