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: 

I need a small help

Former Member
0 Kudos

Hello i have used the following code i have declared the structure and from the structure i have made a work are and from that i have to pass the values but my progrma is going into dump please helo i am sending the example code

data : begin of itab,

matnr like mara-matnr,

ersda like mara-ersda,

end of itab.

data : i_itab type itab occurs 0,

wa_itab type itab.

select matnr

ersda

from mara

into table i_itab." upto single row.

loop at i_ITAB into itab.

write : ITAB-MATNR.

endloop.

the dump error is

The current ABAP program "ZIM_TEST1" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

analisys is

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not

caught and therefore caused a runtime error.

The reason for the exception is:

In a SELECT access, the read file could not be placed in the target field provided.

Either the conversion is not supported for the type of the target field, the target field is too small to include the value, or the data does not have the format required for the target field.

THE ROFRAM IS GOING IN TO DUM IN THE SELECT STATEMENTS

>>>>> select matnr

ersda

from mara

into table i_itab." upto single row.

6 REPLIES 6

Former Member
0 Kudos

Hi,

change your code to

select matnr ersda from mara into corresponding fields of table i_itab.

Regards

Nicole

Former Member
0 Kudos

types : begin of itab,

matnr like mara-matnr,

ersda like mara-ersda,

end of itab.

data : i_itab type standard table of itab ,

wa_itab type itab.

select matnr

ersda into corrspondin field of table table i_itab

from mara." upto single row.

loop at i_ITAB into wa.

write : wa-MATNR.

endloop.

Former Member
0 Kudos

Hi Soni,

Do like this

Types : begin of itab,
matnr like mara-matnr,
ersda like mara-ersda,
end of itab.

data : i_itab type table of itab,
wa_itab type itab.


select matnr
ersda
from mara
into table i_itab." upto single row.


loop at i_ITAB into wa_itab.
write : wa-MATNR.
endloop.

Regards,

Satish

Former Member
0 Kudos

helo plz can u help me to solve the problem to write in a manual way i mean the values to be displayed for a and b

TYPES : begin of itab,

a(10) type c,

b(8) type n,

end of itab.

data : i_itab type itab occurs 0.

data : wa_itab like itab.

wa_itab-a = '1000'.

wa_itab-b = '10102007'.

append wa_itab to itab.

wa_itab-a = '1001'.

wa_itab-b = '11102007'.

append itab to wa_itab .

loop at I_ITAB into itab.

write : / wa_itab-a = '1000',

wa_itab-b = '10102007'.

endloop.

if i do so am getting the error as wa does not have a comonent a

0 Kudos

Change data : wa_itab like itab.

to

data : wa_itab type itab.

itab is a type and not a data object.

Regards,

abhishek

0 Kudos

if i do so like that am getting the erroe as it is not an internal table ofcourse it is not an internal table its a structure