Skip to Content
0
Former Member
Dec 18, 2008 at 10:24 PM

sorted table problem.

60 Views

My program is dumping while assinging 9767297 records from gt_kna1_ext to lt_kna1_ext by saying TSV_TNEW_PAGE_ALLOC_FAILED.

lt_kna1_ext[] = gt_kna1_ext[].

I have declared as

TYPES : BEGIN OF t_kna1_ext,

kunnr TYPE kunnr,

name2 TYPE name2_gp,

j_3astcu TYPE j_3astcu,

sales_org TYPE vkorg,

sold_to TYPE kunnr,

END OF t_kna1_ext.

DATA : gt_kna1_ext TYPE TABLE OF t_kna1_ext,

-


in subroutine declared as sorted table becasue later it has to be used to select from knvp table.

DATA : lt_kna1_ext TYPE SORTED TABLE OF t_kna1_ext WITH NON-UNIQUE KEY sold_to sales_org kunnr.

here while assiging dumping

lt_kna1_ext[] = gt_kna1_ext[].

DELETE ADJACENT DUPLICATES FROM lt_kna1_ext COMPARING sold_to sales_org kunnr.

*-KNVP table read----


IF NOT gt_kna1_ext[] IS INITIAL.

SELECT kunnr

vkorg

spart

parvw

kunn2

FROM knvp

INTO TABLE gt_knvp

FOR ALL ENTRIES IN lt_kna1_ext

WHERE kunnr = lt_kna1_ext-sold_to

AND vkorg = lt_kna1_ext-sales_org

AND spart = gc_01

AND parvw = gc_we

AND kunn2 = lt_kna1_ext-kunnr.

REFRESH : lt_kna1_ext.

LOOP AT gt_kna1_ext INTO gs_kna1_ext.

LOOP AT gt_knvp INTO wa_knvp

WHERE kunn2 = gs_kna1_ext-kunnr

AND vkorg = gs_kna1_ext-sales_org.

wa_knvp-j_3astcu = gs_kna1_ext-j_3astcu.

wa_knvp-name2 = gs_kna1_ext-name2.

MODIFY gt_knvp FROM wa_knvp

TRANSPORTING j_3astcu name2

WHERE kunnr = wa_knvp-kunnr

AND kunn2 = wa_knvp-kunn2

AND vkorg = wa_knvp-vkorg

AND spart = wa_knvp-spart

AND parvw = wa_knvp-parvw.

ENDLOOP. " LOOP AT gt_knvp INTO wa_knvp

ENDLOOP. " LOOP AT gt_kna1_ext INTO gs_kna1_ext.

ENDIF. " IF NOT gt_kna1[] IS INITIAL.