‎2008 Feb 05 9:48 AM
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
‎2008 Feb 05 9:51 AM
‎2008 Feb 05 10:09 AM
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
‎2008 Feb 05 10:12 AM
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
‎2008 Feb 05 9:52 AM
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...
‎2008 Feb 05 9:53 AM
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 .
‎2008 Feb 05 9:57 AM
Hi,
declare c_dsn and wa_count as
data : c_dsn(1000) TYPE c,
wa_count(1000) type c.
Regards,
Nagaraj
‎2008 Feb 05 10:18 AM
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
‎2008 Feb 05 10:28 AM
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
‎2008 Feb 05 10:31 AM
It should not have type i fields .. it should be of type char ...
‎2008 Feb 05 10:40 AM
but he is doing calculations with those fields.
so what can be done.
‎2008 Feb 05 10:47 AM
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) )
‎2008 Feb 05 10:55 AM
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 ....
‎2008 Feb 05 11:13 AM
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
‎2008 Feb 05 11:18 AM
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 ...