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

Hexa deimal

Former Member
0 Likes
1,696

Hi Everyone,

i would like to know the hexadecimal value for SPACE and it would be kind enough to give some lines regarding the Concept of Hexa Decimal values.

Thanks in advance.

Hi Everyone,

i would like to know the hexadecimal value for SPACE and it would be kind enough to give some lines regarding the Concept of Hexa Decimal values.

Thanks in advance.

11 REPLIES 11
Read only

Former Member
0 Likes
1,670

the hexadecimal value of space is 20.

some chracters are stored in the CLASS CL_ABAP_CHAR_UTILITIES.

as attributes

HORIZONTAL_TAB

VERTICAL_TAB

NEWLINE

CR_LF

FORM_FEED

BACKSPACE

SPACE_STR

SPACE_STR_LANGU

so for space you can declare a constant with value equal to CL_ABAP_CHAR_UTILITIES=>NEWLINE for eg.

Regards,

Ravi

Message was edited by: Ravi Kanth Talagana

Read only

0 Likes
1,670

Hi Ravi,

Thanks for ur reply,

i am trying to upload file using GUI_UPLOAD my file has a seprator as space and i am getting a problem with respect to name as FIRST name and SECOND NAME

First name XXXXX vvvv

LAST name yxyxyxy

and the system is putting rest of the values in my next value irrespective of the lenght and space.

i am working on 4.6c and not able to find the class CL_ABAP_CHAR_UTILITIES

Message was edited by: aima sufi

Read only

0 Likes
1,670

HI Aima,

I don't think you need to give the field separator at all in your case.

Just declare the internal table of the same structure of the file to be uploaded and pass that itab to the FM.

Try that.

Regards,

Ravi

Read only

0 Likes
1,670

Hi Ravi,

if i am passing directly the itab then it is storing first name last name in the same field as the field length can accomodate both and from that field onwards it is storing rest of the values accroding to the length of the field in internal table which are bigger the the value and hence i am not able to get the right values in right field.

Read only

0 Likes
1,670

Hi,

pls post your complete syntax with respect to

file handling

Andreas

Read only

0 Likes
1,670

Hi Aima,

As already mentioned by others, You should declare the length of the first name field in the internal table as the maximum length of the first name field in the file.

and the same with even the last name field also.

If there is no fixed length mainatained for those fields, there is no way to determine, which is the first field ans which is the second.

For example

In Ravi Kanth Talagana,

how can you tell what is the first name and what is the last name?

Hope it is clear for now.

Thanks,

Ravi

Read only

Former Member
0 Likes
1,670

HI,

Chek out this link:

Best Regards,

Anjali

Read only

Former Member
0 Likes
1,670

Hi Aima,

For uploading any data into internal table, either you should know the length of fields or you should have some specific delimiter between the fields.

Any of the case will survive.

If there is any delimiter, you can split the whole record based on this delimter and then pass the values into the fields of internal table.

If the length of each field in the file is known, then we can split the record at those respective positions and put them in an internal table.

Check if your file for uploading meet any of these requirements.

Regards,

Sailaja.

Read only

0 Likes
1,670

Hi,

<b>For uploading any data into internal table, either you should know the length of fields or you should have some specific delimiter between the fields.

Any of the case will survive.</b>

In my case my field lenght are greater then defined in file and SPACE is the seprator used

when iam retriving data from file in internal table i am using simple line

Data: ln(2000) type c,it_ln like table of ln with header line.

from this i am filling my internal table but when i am filling the field first name and last name i am getting 3 spaces and system is filling the value in next field hence there after system is not filling using spaces but according to the length of the field

Read only

0 Likes
1,670

Hi Aima,

If the file structure is something like this

Name1 Name2 Field3

Aima Sufi Test

Ravi Kanth Talagana Test2

Then declare the internal table as

Data: Begin of itab occurs 0,

name1(18),

name2(18),

Field3(10),

End of itab.

In this case you don't even need to pass the separator.

And The Internal table will get automatically Populated.

Regards,

Ravi

Read only

Former Member
0 Likes
1,670

Hi,

Count the number of characters of each field in the input file and declare internal table with the lenght of those respective fields. Dont specify delimiter as we already know the length of fields.

Then data gets uploaded correctly.

If you dont know the lenght of the fields or if there is no delimiter, then how can the system get to know which values belong to which field? So, it can not upload the values correctly.

Regards,

Sailaja.