Welcome Guest Login SignUp

Home

Technical

Functional

CNC

AS400

DB2

    Citrix

JDE News

Live Radio

Feedback

JDE Forum Comments/Reviews/Queries
1805 day(s) ago   #198
Name: Nick
Category: Technical
Location: India
Date: 2015-06-16 03:08:51
Replies(3)

Status:
  #198

How To Replace Carriage Return With a Space Character in a Text Field

When we need to fetch media object attachment specially the text attachment we use ER system function to retrieve media object text. The text is made up of several lines which may contain carriage return and linefeed characters at the end of every line so it is needed to replace the carriage return and linefeed characters at the end of every line with a space so that the text is in a single line for data export.

There are two solutions available to acheive this -

Solution#1 -

Within business function B7900008-String functions, Variable Length Strings, there are 2 function names available that converts (carriage return, linefeed, tab) characters to a space character and replace consecutive spaces to a single space within a text :-
1. Function "Strip Hex and Blanks" only converts text up to 300 characters long.
2. Function "Strip Hex and Blanks from 30,000 Variable string" converts text up to 30,000 characters long and is only available in release EnterpriseOne 8.9 and higher.

NOTE: Function "Strip Hex and Blanks" will NOT work on the AS/400 platform in release Xe/ERP8 because the function is coded to look for the ASCII character representation of the (carriage return, linefeed, tab) characters.

Function "Strip Hex and Blanks from 30,000 Variable string" will work on the AS/400 platform because of Unicode in release EnterpriseOne 8.9 and higher.

Solution#2 -

In Event Rule design, code the following :
1. Call "B0800207 Get New Line Character" to get the ASCII character representation of linefeed
2. Use Expression Manager Advanced Function TEXT length( ) to get the length of the text
3. Execute the next 3 functions in a While loop condition that does not exceed the length of the text
-Call B7500150-Find a char position in a string to find the position of the linefeed character for each line
-Use TEXT ER system function substr( , , ) to retrieve the text before the (carriage return + linefeed)
-Use TEXT ER system function concat( , ) to assemble the text in a single line

B7500150 is limited to string of 400 characters long, for longer string, you will have to create a custom business function.

NOTE:Only for non-AS/400 platform in Xe/ERP8; for All platforms in 8.9 and higher

Refer to Oracle Support Document Doc ID 644562.1 for more details.
1349 day(s) ago   #233
Name: Malisetty
Category: Technical
Location:
Date: 2016-09-14 23:20:25
Replies(3)

Status:
  #233

How To Replace Carriage Return With a Space Character in a Text Field

Thanks for Nick and JDE Thread / CrazzyBulls. its helps me to clear one of my issue.
1177 day(s) ago   #255
Name: Lorrinefem
Category: Technical
Location:
Date: 2017-03-05 21:20:46
Replies(3)

Status:
  #255

How To Replace Carriage Return With a Space Character in a Text Field

I needed to thank you for this good read!! I certainly enjoyed every little bit of it. I`ve got you bookmarked to check out new stuff you post
1000 day(s) ago   #294
Name: suja
Category: Technical
Location:
Date: 2017-08-29 01:08:34
Replies(3)

Status:
  #294

How To Replace Carriage Return With a Space Character in a Text Field

...
Post Comments/Queries
Email:*
Name:*
Details:*
 
   
* Required Entry Field(s).  * Your comments may subject to varification.  * Your email ID will not appear in the forum.
 
Disclaimer: Most of the posts in this blog cater solutions/suggestions/workaround to issues for specific tools release or JDE E1 version and are just information only. Please be carefule while applying it in your environment. JDEthread will not be responsible for any data loss or spec corruption (if any).
Copyright © 2010 - 2020 JDEthread.in