Application Development 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: 

dump error

Former Member
0 Kudos
204

hi experts

while executting this query, it goes to dump error,

what could be the problem, please advice on the same.

select matnr

KALAB

KAINS

KASPE

from mska

into corresponding fields of table i_mska

FOR ALL ENTRIES IN itab1

where matnr = itab1-matnr.

Thanks in advance.

Regards

Rajaram

12 REPLIES 12

former_member188827
Active Contributor
0 Kudos
140

wat does the error say?

0 Kudos
140

Error in RSQL module of database interface.

Following a SELECT statement, the data read could not be placed in AN

the output area.

A conversion may have been intended that is not supported by the

system, or the output area may be too small.

dev_parbutteea
Active Contributor
0 Kudos
140

Hi,

could you please give the message being displayed on the screen. I would be useful to better understand the problem.

Regards.

Former Member
0 Kudos
140

Hi,

Please check whether your internal table itab1 is filled properly as well as the structure of table i_mska should be same as that of "mska".

Former Member
0 Kudos
140

Houston we have a problem

Former Member
0 Kudos
140

Hi,

Look at the internal table I_MSKA, the fields which you are selecting should be same type

uwe_schieferstein
Active Contributor
0 Kudos
140

Hello Raja

If there are too many entries in itab1 the SQL statement sent to the DB may become to large resulting in a dump.

To test this possibility add the option <b>PACKAGE SIZE</b> 500 to your select statement. In this case the select will be repeated several times. Each time a bundle of 500 records is fetched. Please note that it may be necessary to use a SELECT...ENDSELECT construct.

Regards

Uwe

Former Member
0 Kudos
140

See the order of the fields in the select query and order of the fields in IT ( i_mska )are correct bcoz it gives dump when the value of one field is pushed to another field in IT (i_mska).

eg:

<b>select query i_mska</b>

matnr matnr

KALAB kalab

KAINS kains

KASPE kaspe

Reward points if its useful.

Regards,

Vimal

dev_parbutteea
Active Contributor
0 Kudos
140

Hi,

the fields in table i_mska might not ba of same lenght or type!

Former Member
0 Kudos
140

HI,

can you send your code for better understanding.

0 Kudos
140

&----


*& Report ZSAB_SPLAN

*&

&----


*&

*&

&----


REPORT ZSAB_CPLAN.

&----


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

  • Program : ZSAB_SPLAN *

  • Creation Date : 20.04.2007 *

  • Program Title : Production Plan *

  • Program Author : S.Rajaram *

  • Program Type : Report *

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

  • Technical Spec by : Mr.Elangovan *

  • Unit Test Case : Ms.Renuga & Sathya *

  • Source Code Review by : Mr.Elangovan *

  • Transport No. : SBDK903898 *

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

  • Program Description : To Display Production plan *

  • *

  • *

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

  • Inputs *

  • Tables : AFRU,RESB,VBAK,VBEP,AFPO,AFKO,AUFK,JEST, *

  • VBBE,VBUP,AFVC *

  • Parameters : Window Start Date *

  • Plant *

  • *

  • External files : N/A *

  • Outputs *

  • Reports : N/A *

  • Tables: : N/A *

  • Databases : N/A *

  • Screens : N/A *

  • Parameters : N/A *

  • External files : N/A *

  • Other objects : N/A *

  • Return code set by ABAP: N/A *

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

  • Modification ID : N/A *

  • Date : DD-MMM-YYYY *

  • Author : N/A *

  • Description : N/A *

  • Transport No. : N/A *

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

  • Include Name : N/A *

  • Description : N/A *

  • Where called from : N/A *

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

&----


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

  • Data Declaration

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

TABLES : afru,resb,vbak,vbep,afpo,afko,aufk,jest,vbbe,vbup,afvc.

TYPE-POOLS : slis.

DATA : fcat TYPE slis_t_fieldcat_alv,

ls_fcat LIKE LINE OF fcat,

fheader TYPE TABLE OF slis_listheader WITH NON-UNIQUE DEFAULT KEY

WITH HEADER LINE INITIAL SIZE 0.

DATA :i_repid LIKE sy-repid,

gs_layout TYPE slis_layout_alv,

week type n.

CONTROLS: tc1 TYPE TABLEVIEW USING SCREEN 100.

DATA: ok_code TYPE sy-ucomm.

TYPES : BEGIN OF t_mska,

matnr TYPE mska-matnr,

kalab TYPE mska-kalab,

kains TYPE mska-matnr,

kaspe TYPE mska-kaspe,

END OF t_mska.

*Internal Table

DATA : BEGIN OF itab OCCURS 0,

tddat LIKE vbep-tddat,

DWERK like afpo-DWERK,

WEMNG like AFPO-WEMNG,

PSMNG like AFPO-PSMNG,

KUNNR like vbak-KUNNR,

PLNBEZ like afko-PLNBEZ,

STLBEZ like afko-STLBEZ,

PLSVB like afko-PLSVB,

vbeln LIKE vbep-vbeln,

posnr LIKE vbep-posnr,

aufnr like afko-aufnr,

kdauf like afpo-kdauf,

KDPOS LIKE AFPO-KDPOS,

matnr like afpo-matnr,

UEBTO like afpo-UEBTO,

maktx like makt-maktx,

gamng like afko-gamng,

igmng like afko-igmng,

SBMNG like afko-SBMNG,

objnr like aufk-objnr,

stat like jest-stat,

INACT like jest-INACT,

OBJID like crhd-OBJID,

ARBPL like crhd-ARBPL,

ARBID like afru-ARBID,

aufnr1 like afru-ARBID,

VBELN1 like vbbe-VBELN, "SO for open

POSNR1 like vbbe-POSNR, "Item for open so

LFGSA like vbup-LFGSA,

AUFPL like afko-AUFPL,

AUFPL1 like afvc-AUFPL,

ARBID1 like afvc-ARBID,

AENAM like mara-AENAM, " to store 2 characters

CODE like ZMATMAS-code,

DESCRP like ZMATMAS-DESCRP,

MASTYP like ZMATMAS-MASTYP, " DEFAULT 'PRODUCT',

end of itab.

DATA : BEGIN OF itab1 OCCURS 0,

tddat LIKE vbep-tddat,

DWERK like afpo-DWERK,

WEMNG like AFPO-WEMNG,

PSMNG like AFPO-PSMNG,

KUNNR like vbak-KUNNR,

PLNBEZ like afko-PLNBEZ,

STLBEZ like afko-STLBEZ,

PLSVB like afko-PLSVB,

vbeln LIKE vbep-vbeln,

posnr LIKE vbep-posnr,

aufnr like afko-aufnr,

kdauf like afpo-kdauf,

KDPOS LIKE AFPO-KDPOS,

  • matnr like afpo-matnr,

UEBTO like afpo-UEBTO,

maktx like makt-maktx,

gamng like afko-gamng,

igmng like afko-igmng,

SBMNG like afko-SBMNG,

objnr like aufk-objnr,

stat like jest-stat,

INACT like jest-INACT,

OBJID like crhd-OBJID,

ARBPL like crhd-ARBPL,

ARBID like afru-ARBID,

aufnr1 like afru-ARBID,

VBELN1 like vbbe-VBELN, "SO for open

POSNR1 like vbbe-POSNR, "Item for open so

LFGSA like vbup-LFGSA,

AUFPL like afko-AUFPL,

AUFPL1 like afvc-AUFPL,

ARBID1 like afvc-ARBID,

AENAM like mara-AENAM, " to store 2 characters

CODE like ZMATMAS-code,

DESCRP like ZMATMAS-DESCRP,

MASTYP like ZMATMAS-MASTYP, " DEFAULT 'PRODUCT',

  • aufnr like resb-aufnr,

baugr like resb-baugr,

matnr like resb-matnr,

meins like resb-meins,

bdmng like resb-bdmng,

end of itab1.

*Internal Table

DATA : BEGIN OF it_final OCCURS 0,

DWERK like afpo-DWERK,

tddat LIKE vbep-tddat,

KUNNR like vbak-KUNNR,

PLNBEZ like afko-PLNBEZ,

vbeln LIKE vbep-vbeln,

posnr LIKE vbep-posnr,

aufnr like afpo-aufnr,

matnr like afpo-matnr,

UEBTO like afpo-UEBTO,

WEMNG like AFPO-WEMNG,

PSMNG like AFPO-PSMNG,

maktx like makt-maktx,

gamng like afko-gamng,

SBMNG like afko-SBMNG,

objnr like aufk-objnr,

stat like jest-stat,

INACT like jest-INACT,

OBJID like crhd-OBJID,

ARBPL like crhd-ARBPL,

ARBID like afru-ARBID,

aufnr1 like afru-ARBID,

VBELN1 like vbbe-VBELN, "SO for open

POSNR1 like vbbe-POSNR, "Item for open so

LFGSA like vbup-LFGSA,

  • WGBEZ60 like T023T-WGBEZ60,"prod

DESCRP like ZMATMAS-DESCRP," Product

END OF it_final.

DATA : i_mska TYPE TABLE OF t_mska.

DATA : w_mska TYPE t_mska.

SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.

SELECT-OPTIONS: zdate FOR vbep-tddat OBLIGATORY.

SELECT-OPTIONS: zpl FOR afpo-DWERK OBLIGATORY.

SELECTION-SCREEN END OF BLOCK bk1.

start-of-selection.

gs_layout-colwidth_optimize = 'X'.

  • Select statement for collect all the sale orders by given start date

SELECT vbep~tddat

vbep~vbeln

vbep~posnr

vbep~WMENG

afpo~kdauf

afpo~kdpos

afpo~aufnr

afpo~matnr

afpo~DWERK

afpo~WEMNG

from afpo

inner join vbep on vbep~vbeln EQ afpo~kdauf

and vbep~posnr EQ afpo~kdpos

INTO CORRESPONDING FIELDS OF table itab

WHERE vbep~tddat in zdate and

vbep~WMENG > 0 and

afpo~DWERK in zpl.

delete adjacent duplicates from itab.

sort itab by vbeln.

loop at itab.

if itab-matnr(1) NE 'C'.

delete itab.

endif.

endloop.

SELECT aufnr

baugr

matnr

meins

bdmng

FROM resb

INTO CORRESPONDING FIELDS OF TABLE itab1

FOR ALL ENTRIES IN itab

WHERE aufnr = itab-aufnr.

select matnr * Dump occured here only

KALAB

KAINS

KASPE

from mska

into table i_mska

FOR ALL ENTRIES IN itab1

where matnr = itab1-matnr.

loop at itab.

  • To get order no and object id

select single aufnr OBJNR

from aufk into (itab-aufnr , itab-OBJNR)

where aufnr = itab-aufnr.

  • To get sale orders

select single vbeln kunnr

from vbak into (itab-vbeln , itab-kunnr)

where vbeln = itab-kdauf.

  • To calculate the bal qty

select single PSMNG WEMNG

  • gamng igmng

from afpo into (itab-PSMNG , itab-WEMNG)

  • (itab-gamng , itab-igmng)

where aufnr = itab-aufnr.

itab-sbmng = itab-PSMNG - itab-wemng.

  • gamng - itab-igmng.

  • To get material description

select single maktx

from makt into (itab-maktx)

where matnr = itab-matnr.

itab-AENAM = itab-matnr+3(2).

ITAB-MASTYP = 'PRODUCT'.

  • To get the status of the production order

select single OBJNR STAT INACT

from jest into (itab-objnr , itab-stat , itab-INACT)

where objnr = itab-objnr and

( Stat = 'I0045' OR STAT = 'I0076') AND

INACT <> 'X'.

if sy-subrc = 0.

delete itab.

else.

modify itab.

endif.

endloop.

  • To eliminate confirmed production orders

loop at itab.

if itab-psmng = itab-wemng or

itab-wemng > itab-psmng.

delete itab.

endif.

select single code descrp MASTYP

from zmatmas into (itab-code , itab-descrp , ITAB-MASTYP)

where code = itab-aenam

AND MASTYP = ITAB-MASTYP.

modify itab.

endloop.

loop at itab.

move-corresponding itab to it_final.

append it_final.

endloop.

perform edit_mask.

i_repid = sy-repid.

call screen 100.

&----


*& Form edit_mask

&----


  • text

----


form edit_mask.

loop at it_final.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = it_final-vbeln

IMPORTING

OUTPUT = it_final-vbeln.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = it_final-aufnr

IMPORTING

OUTPUT = it_final-aufnr.

modify it_final.

endloop.

endform. "edit_mask

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'PLAN'.

SET TITLEBAR 'PLAN'.

ENDMODULE. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE USER_COMMAND_0100 INPUT.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module cancel INPUT

&----


  • text

----


MODULE cancel INPUT.

leave program.

ENDMODULE. " cancel INPUT

&----


*& Module TAB_MODIFY INPUT

&----


  • text

----


MODULE TAB_MODIFY INPUT.

MODIFY IT_FINAL

FROM IT_FINAL

INDEX TC1-CURRENT_LINE.

ENDMODULE. " TAB_MODIFY INPUT

dev_parbutteea
Active Contributor
0 Kudos
140

Hi,

i woud be better to:

copy itab1 to a temporary table and

then sort it by matnr and

do a delete adjacent duplicate comparing matnr

Regards.