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

dump error in program

Former Member
0 Likes
1,538

Hi all,

i am getting a dump error like

" The current statement is only defined for character-type data objects."

The error show at this place.

<code>

  • OPEN DATASET C_DSN FOR INPUT. "APPENDING.

OPEN DATASET C_DSN FOR INPUT IN TEXT MODE ENCODING DEFAULT. "APPENDING.

DO.

READ DATASET C_DSN INTO WA_COUNT.

IF SY-SUBRC NE 0.

EXIT.

ENDIF.

LOOP AT ERDAT.

IF WA_COUNT-ERDAT IN ERDAT.

APPEND WA_COUNT TO IT_COUNT.

ENDIF.

ENDLOOP.

the error is at bolded place.

Thanks,

satish

14 REPLIES 14
Read only

Former Member
0 Likes
1,513

Hi,

how is your definition from C_DSN and wa_count.

Read only

0 Likes
1,513

C_DSN : C_DSN(50) VALUE '/batch/out/stats/sta1/',

WA_COUNT LIKE IT_COUNT( Its an internal table)

frnds help me.

what shuld be done.

regards,

satish

Read only

0 Likes
1,513

Please look to that your internal table IT_COUNT

does not contain any non-character fields ...

WA_COUNT LIKE IT_COUNT( Its an internal table

Read only

Former Member
0 Likes
1,513

Hello,

Maybe a problem with the type of "wa_count": is it a char? I think that you typed it as Integer...

Wa_count should be the buffer used to transfer a line of your file into a workarea...

Read only

Former Member
0 Likes
1,513

Please check what is WA_COUNT ...

It should be of character type ...

WA_COUNT would be an integer ...

or declare WA_COUNT as ..

DATA: BEGIN OF WA_COUNT ,

data(500) TYPE c.

DATA: END OF WA_COUNT .

Read only

former_member404244
Active Contributor
0 Likes
1,513

Hi,

declare c_dsn and wa_count as

data : c_dsn(1000) TYPE c,

wa_count(1000) type c.

Regards,

Nagaraj

Read only

Former Member
0 Likes
1,513

HI.

refer this .

IGNORING CONVERSION ERRORS

Effect:

This addition can be used to suppress a treatable exception defined by the class CX_SY_CONVERSION_CODEPAGE. This exception can be triggered during reading or writing if conversion between codepages takes place and a character cannot be converted to the target codepage.

This addition is possible when opening text files, legacy text files, or legacy binary files, but not when opening binary files.

Notes

Each unconvertible character is replaced during conversion either by the character "#", or with the character defined by the addition REPLACEMENT CHARACTER. The addition IGNORING CONVERSION ERRORS controls whether or not the user is notified of this by an exception.

This setting can be changed in an opened file using the statement SET DATASET.

To be rewards if its helpfull.

Regards,

JNJ

Read only

Former Member
0 Likes
1,513

Hi frnds,

IT_COUNT Table consists only type "i" fields.

It doesnt contain any charter type fields.

so wht shuld i do to get things working.

regards,

satish

Read only

0 Likes
1,513

It should not have type i fields .. it should be of type char ...

Read only

0 Likes
1,513

but he is doing calculations with those fields.

so what can be done.

Read only

0 Likes
1,513

put it on a buffer (like wa_count(100) ) ; then extract the numbers that you need (if you know the position; use the + and (); fg: my_integer = wa_count+4(5) )

Read only

0 Likes
1,513

Get all the data into a work area and move into your internal table as declared previously with type i's ...

Data : begin of wa_count occurs 0,

field1 type i,

field2 type i,

end of wa_count.

Data : outrec(200) type c

open dataset ....

read dataset c_sdn into outrec.

  • now move from outrec to wa_count ....

U can do the calculations on wa_count ....

Read only

0 Likes
1,513

Hi srinivas,

TAHNKS FOR UR REPLY.

now move from outrec to wa_count .... ( But how we will now which data will move to which field.)

please help me regarding this.

regards,

satish

Read only

0 Likes
1,513

U need to count the characters and move .. say

move : outrec+0(8) to wa_count-field1

outrec+8(8) to wa_count-field2.

append wa_count.

now you have the values in wa_count ...