help identifying ascii character in string field seperating data

SAP table ODLN has address field which contains address, city zip, country. There appears to be at leat one ascii character between address and city and one ascii cahracter between zip and country. I  need to determine what characters these are so I can include the appropriate function in Crystal to print the individual components (address1, City Zip) in the address line print. Need help with the function and syntax. Table is odln.address

johntmciiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mlmccConnect With a Mentor Commented:
You can use a formula to replace the characters

Replace(Replace({YourField},chr(10),' '),chr(13),' ')

If you only want a single space then replace one with ''

mlmcc
0
 
mlmccCommented:
Is it always the same character?

Can you show a sample of the data?

mlmcc
0
 
johntmciiAuthor Commented:
Please find requested information below
ODLNsample.bmp
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mlmccCommented:
As a gues the 2 characters are CR-LF or LF-CR  chr(10) and chr(13)
The single is proably LF - chr(10)

The only way to know for sure would be to search the string in Crystal or a VB app.

mlmcc
0
 
mlmccCommented:
Here is a Crystal formula that might do it

Local StrijngVar AsciiRep;
Local StringVar MyString;
Local NumberVar i;

MyString := {YourStringField};
For i := 1 to Length(MyString) do
   AsciiRep := AsciiRep & CStr(ASC(Mid(MyString,i,1),0) & ' ';
AsciiRep

Cut and paste the resukt

mlmccq
0
 
johntmciiAuthor Commented:
made changes see attached file; received error when I ran the function (A variable type 'for eaxmple 'number var', is missing)
 
Is the syntax correct on the statement?

mystring1.bmp
0
 
johntmciiAuthor Commented:
How would I go about searching the field in Crystal to look for the specific field value as you mentioned earlier which contains some special character or a LF / CR? Please provide example ofthe code.
0
 
mlmccCommented:
Where did you put the code?

To simply searcxh create a formula like

InStr({SearchString},chr(13))

Put that in the detail sectiion

mlmcc
0
 
mlmccCommented:
Bad typingon my part that word cshould be StringVar

No j in it.

mlmcc
0
 
johntmciiAuthor Commented:
I put in formula field, named addr1 I found the type, changed it now it says. The ) is missing
0
 
johntmciiAuthor Commented:
Mtype on my part too, Should have been typo instead of type
0
 
mlmccCommented:
AsciiRep := AsciiRep & CStr(ASC(Mid(MyString,i,1)),0) & ' ';

mlmcc
0
 
johntmciiAuthor Commented:
Still getting the same error, I don't see an unpaired )
0
 
johntmciiAuthor Commented:
My bad, I fat fingered a change. I found this last night. You were right it is a LF/CR actually two sets between the address line and city state. So how can I fix this?
datafile.bmp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.