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: 

Problem with the length of the field........

anupam_srivastava2
Participant
0 Kudos

Hi all

I have defined a internal table

TYPES : BEGIN OF DHNS,

RECTYPE(2) TYPE C,

ORDNO(25) TYPE C,

SEQ(3) TYPE C,

INSTYPE(2) TYPE C,

INSTTEXT(255) TYPE C,

END OF DHNS.

DATA: T_DHNS TYPE STANDARD TABLE OF DHNS.

DATA: H_DHNS TYPE DHNS.

I am uploading the data into internal table.........

transfer H_DHNS TO FILEPATH length 287.

but when I check the lenght of the H_DHNS it shows 289.....I want it to be 288.......

any suggestion what could be the cause of the problem

AJ

8 REPLIES 8

anupam_srivastava2
Participant
0 Kudos

Which data type accepts £ or other signs........

AJ

0 Kudos

Hi All

there is a £ sign in my standard text, when i reading through read_test FN and passing that filed to text file .DAT, its takes a extra character.

How can I resolve this problem

AJ

0 Kudos

If you don't need it, remove it and perhaps shift the remaining part after that sign to the left.

0 Kudos

Hi Anup,

How are you opening the dataset.

Try additions ENCODING DEFAULT,ENCODING UTF-8,ENCODING NON-UNICODE.

OPEN DATASET XXXX FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

this takes the default encoding to that perticular version.

In case of unicode version it takes as UTF-8.

Try these different encodings beore passing the data.

Thank you

0 Kudos

Hi Kumar

I have tried using all, ENCODING DEFAULT,ENCODING UTF-8,ENCODING NON-UNICODE.

actully I am on ECC5 and it si unicode complaint..........

AJ

0 Kudos

thanks every body, closing this request.....

former_member182426
Active Contributor
0 Kudos

hi,

declare a constant variable and assing 288 to variable and use it.

Regards,

shankar.

Former Member
0 Kudos

You are right, that character gets written as unicode, so it takes up double space. So it's either don't use it or reserve extra space for it.