How to extract special characters from a field
Hi there.
I am a novice when it comes to Web Intelligence reports. I have been tasked with producing a final report that I can export to Excel which shows a project number and a project name. Very simple. Ultimately I need to import my final Excel file to a third party software. However, the issue is the project name field consists of special characters such as hyphens, parenthesis, asterisks, etc. I need to be able to create a formula which extracts all special characters and just leaves me with alpha-numeric characters and spaces. I also need to limit the character count to no more than 34 characters. I will not be able to import my final Excel file unless I can product those results. With the help of a very knowledgable person in the Crystal Reports forum, I was able to do that by using the following formula:
stringvar a:=left({Projects.ProjectName},34);
numbervar i;
Local StringVar fin;
for i:= 1 to len(a) do
if a[i]in ["a" to "z"] then
fin := fin & a[i]
else if a[i] in ["1" to "9"] then
fin := fin & a[i]
else if a[i] = " " then
fin := fin & a[i];
fin;
It worked amazingly well in Crystal Reports but this report now needs to move to Web Intelligence. Is there a way to do this in a Web Intelligence report? Itried but the formula is not recogizable. I tried creating a variable and using this formual but I couldn't get it to work. I appreciate all helpful responses. The version of Web Intelligence I am using is SAP Business Enterprise XI. I am working in a PC environment using Windows 7 if that helps at all.
Thank you!
Lauren
Hi Lauren, Please provide with some sample data...
In SQL, by writing some Functions/Procedures you can eliminate special characters. Ask your database team to do that.
or
Create an object with the following syntax... It Works in SQL.
= REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE
(REPLACE(REPLACE(REPLACE([String_Object],'&',' '),'*',' '),'(',' '),'^',' '),'%',' '),'!',' '),'@',' '),'#',' '),'$',' '),'~',' '),')',' '),'+',' '),'=',' ' ),'-',' '),'_',' '),'/',' '),':',' '),';',' '),',',' '),'<',' '),'.',' '),'>',' '),'?',' '),'"',' '),'''',' '),'[',' '),']',' '),'{',' '),'}',' '),'\',' '),'|',' ')
Example: Input: '~!@#$%^&*()_+{}:"<>-=[]./\|/*-+ascdfv123'
Output: ascdfv123
Similar Messages
-
How to get Special Characters from request
Hi,
I have one textarea in my jsp.
I am entering '123' in that textarea and submiting the form to the servlet.
in the servlet i am using request.getParameter to get the value in the textarea.
But it was showing
'123'
What is the prbolem..
Thanx for giving the solution
Message was edited by:
praveen_nagdocument.main_form.method="post";
document.main_form.action="CMGC_cREPORT_GEN_ENTRY?mid=<%=lStrhidMid%>&rootID=<%=lStrRootId%>";
document.main_form.hidMode.value="3";
document.main_form.submit();
through this im submiting the form to the servlet.
in servlet i am calling
lStrSqlStmt = UTIL_COMMON.fnGetValue(req.getParameter("SQL_STMT"));
SQL_STMT is my text area name....
In the text area i entered '123'
but when i am pringing lStrSqlStmt
it was showing '123'
Thanx for u reply. -
Remove special characters from incoming data
Hi Varun, You could use either of below.. REG_REPLACE(YOUR_INPUT_STR,^[A-Za-z0-9 ],NULL) -- Replaces all non-alphanumeric with null
REG_EXTRACT(YOUR_INPUT_STR,[A-Za-z0-9 ]) -- Extracts only alphanumeric data -Rajanii have special character coming in the source data and i want to remove it before loading into target, currently i am getting one special character , it may come as some other type of special character other than alpha numeric. so how to remove those special characters from data and load the alphanumeric data into target.
-
How to handle special characters in metadata?
I have an implementation in C# to call ACS webservices for a long time. Last week we realized that some special characters in metadata fields are making the package request to not work. Example characters: éë. The response from ACS contains E_ADEPT_DISTRIBUTOR_AUTH. If we remove the special character, the request works as expected.
I know that characters are working in the jar application but we can't manage to make them work from our C# application.
Any help is welcome.Doing a SHA1-HMAC is relatively simple and there are only two inputs, the key and the message.
Since you say this works correctly with lower ascii characters, but not with Unicode characters then I would assume you have the key correct and the only thing that is different is the message. Also since it works correctly with lower ascii characters then you have the XML infoset serialization correct, so assuming a similiarly sized message (ie take one character and replace with a unicode character), then your problem is going to be in the character encoding.
I would suggest some healthy paranoia about this, by verifying that the byte stream being hashed is indeed correctly UTF8 encoded by looking at the hex values (breakpoint in the SHA1-HMAC code) and comparing to a UTF8 table such as http://www.utf8-chartable.de. -
How to Extract sales document from r/3 ?
hi,
How to extract sales data from SAP R/3 considering all fields of data in different tables?
Thanks & regards,
Gopi.Hi Gopi,
It depends what data you need to extract but most of the data would be available in following tables :
Sales
VBAK - Header
VBAP - Item
VBPA - Sales Document Partner
Shipment
VTTK - Shipment Header
VTTP - Shipment Item
Delivery
LIKP - Delivery Header
LIPS - Delivery item
Customer
KNA1 - Customer Master
KNB1 - Customer Master (Company Code)
Cheers,
Vikram
Pls reward for helpful replies!! -
Extract 2 characters from string
Hello,
Can anyone help to create a formula to extract 2 characters from the left of "pp" in a field using CR XI?
Field = {MainEstimateDetails.JobDescription} (string)
Sample string details:
"Annual Report 96pp & Cover 12345" - want to be able to show only 96 (from 96pp)
"CTP A4 4pp" - want to be able to show only 4 (from 4pp)
The string length is variable and the "pp" will be in different places each time.
It is probably very simple, but I cannot get itHi,
You can use the InStr function for this. InStr returns the position of the string your are looking for.
NumberVar myPosition;
If InStr ({MainEstimateDetails.JobDescription}, "pp") > 0 Then
myPosition := InStr ({MainEstimateDetails.JobDescription}, "pp")
Else myPosition := 0;
If myPosition <> 0 Then
{MainEstimateDetails.JobDescription} [(myPosition - 2) To (myPosition - 1)]
Else "";
This is a bit longer than I would normally do it but... I use Instr to check if the field has "pp" in it. If it does it will return the character position in the field and I pass that to my variable myPosition.
If myPosition has a value then it parses out the two characters before "pp".
Good luck,
Brian -
How to remove special characters while typing data in edit cell in datagrid in flex4
Hi Friends,
I am facing this problem "how to remove special characters while typing data in edit cell in datagrid in flex4".If know anyone please help in this
Thanks,
Anderson.Removes any characters from
@myString that do not meet the
provided criteria.
CREATE FUNCTION dbo.GetCharacters(@myString varchar(500), @validChars varchar(100))
RETURNS varchar(500) AS
BEGIN
While @myString like '%[^' + @validChars + ']%'
Select @myString = replace(@myString,substring(@myString,patindex('%[^' + @validChars + ']%',@myString),1),'')
Return @myString
END
Go
Declare @testStr varchar(1000),
@i int
Set @i = 1
while @i < 255
Select
@TestStr = isnull(@TestStr,'') + isnull(char(@i),''),
@i = @i + 1
Select @TestStr
Select dbo.GetCharacters(@TestStr,'a-z')
Select dbo.GetCharacters(@TestStr,'0-9')
Select dbo.GetCharacters(@TestStr,'0-9a-z')
Select dbo.GetCharacters(@TestStr,'02468bferlki')
perfect soluction -
How to print Special Characters in Sap-Scripts
How to print Special Characters in Sap-Scripts
Thanks,
RaviHi
if u want print special characters we can use hot codes i.e ' ' (single inverted commas). in between these hot codes insert u r special characters.
write ' !@#$%^&*( ) '.
for the above write statement output is
output is !@#$%^&*( ) -
How to extract Inventory data from SAP R/3 system
Hi friends How to extract Inventory data from SAP R/3 system? What are report we may expect from the Inventory?
Hi,
Inventory management
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20handle%20inventory%20management%20scenarios.pdf
How to Handle Inventory Management Scenarios in BW (NW2004)
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
Loading of Cube
ref.to page 18 in "Upgrade and Migration Aspects for BI in SAP NetWeaver 2004s" paper
http://www.sapfinug.fi/downloads/2007/bi02/BI_upgrade_migration.pdf
Non-Cumulative Values / Stock Handling
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/93ed1695-0501-0010-b7a9-d4cc4ef26d31
Non-Cumulatives
http://help.sap.com/saphelp_nw2004s/helpdata/en/8f/da1640dc88e769e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62ebe07211d2acb80000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/80/1a62f8e07211d2acb80000e829fbfe/frameset.htm
Here you will find all the Inventory Management BI Contents:
http://help.sap.com/saphelp_nw70/helpdata/en/fb/64073c52619459e10000000a114084/frameset.htm
2LIS_03_BX- Initial Stock/Material stock
2LIS_03_BF - Material movements
2LIS_03_UM - Revaluations/Find the price of the stock
The first DataSource (2LIS_03_BX) is used to extract an opening stock balance on a
detailed level (material, plant, storage location and so on). At this moment, the opening
stock is the operative stock in the source system. "At this moment" is the point in time at
which the statistical setup ran for DataSource 2LIS_03_BX. (This is because no
documents are to be posted during this run and so the stock does not change during this
run, as we will see below). It is not possible to choose a key date freely.
The second DataSource (2LIS_03_BF) is used to extract the material movements into
the BW system. This DataSource provides the data as material documents (MCMSEG
structure).
The third of the above DataSources (2LIS_03_UM) contains data from valuated
revaluations in Financial Accounting (document BSEG). This data is required to update
valuated stock changes for the calculated stock balance in the BW. This information is
not required in many situations as it is often only the quantities that are of importance.
This DataSource only describes financial accounting processes, not logistical ones. In
other words, only the stock value is changed here, no changes are made to the
quantities. Everything that is subsequently mentioned here about the upload sequence
and compression regarding DataSource 2LIS_03_BF also applies to this DataSource.
This means a detailed description is not required for the revaluation DataSource.
http://help.sap.com/saphelp_bw32/helpdata/en/05/c69480c357354a8846cc61f7b6e085/content.htm
http://help.sap.com/saphelp_bw33/helpdata/en/ed/16c29a27db6e4d81a015be8673eb80/content.htm
These are the standard data sources used for Inventory extraction.
Hope this helps.
Thanks,
JituK -
How to extract PS data from sap r/3 to bw
Hi,
How to extract PS data from sap r/3 to bw
PS data like plans,budget,accurals&commitmnets
can any one help me regarding this..
Thanks in Advance,
Shankar.HI sankar,
you can refer the belkow link to find the details on the relevant extractors and infoproviders
http://help.sap.com/erp2005_ehp_04/helpdata/EN/17/416d030524064cb2b8d58ffb306f3a/frameset.htm
Regards,
Sathya -
How to write special characters in PDF using iText
How to write special characters encoded with UTF-8 in PDF using iText.
Regards,
Pandharinath.I don't know what your problem is but that's almost certainly the wrong question to ask about it. Java (including iText) uses only Unicode characters. (You may consider some of them to be "special" if you like but Unicode doesn't.) And when it does that, they aren't encoded in UTF-8 or any other encoding.
So can you describe your problem? That question doesn't make sense. -
How to display special characters in Script...
hi all,
Can any one tell me how to display special characters in script...
how to write in text element
thanks in advance,
prashantHi Prashant ,
What special characters would you like to include .
There are a set of characters / icons /symbols that can be included in Script , for that open a window in edit mode and in the menu there will be an option called Insert , here you can find a lot of characters/symbols that can be included .
Regards,
Arun -
How to Extract the data from R/3 Genric extractor to BW ?
How to Extract the data from R/3 Genric extractor to BW ?
hi,
step by step procedure for generic extraction delta
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
Refer:
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/content.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Extractions in BI
https://www.sdn.sap.com/irj/sdn/wiki
New to Materials Management / Warehouse Management?
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1b439590-0201-0010-ea8e-cba686f21f06
Ramesh -
The blank pop up began as I tried to access "special characters" from the finder menu. I restarted, turned off and restarted and it did not work. It interferes with any application because I cannot work fast. Every new step takes a few seconds longer such as saving, finding text, check spelling and many more. I am desperate to solve this. Thanks in advance for any help given.
Consuelo CorretjerUse the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps. -
How to extract specific line from a string
Hi guys.
I?m starting to work with java...
i have the following data inside a string variable:
0 rows inserted.
0 rows updated.
0 rows ignored.
98 rows marked as deleted.
0 rows have no country.
3345 rows have no geo.
0 rows are invalid.
what i want to do i to extract the number of rows marked as delete.
I think that i figured out how to extract the number from this line :"98 rows marked as deleted."
but how do i get to that line?
I hope you can Help me. Thanks.the string is the result from a Function... this function gets the info from a store procedure...
rta = "Results for " + dh.getSource() + " source:\n" +
dh.getInsertedCount() + " rows inserted.\n" +
dh.getUpdatedCount() + " rows updated.\n" +
dh.getIgnoredCount() + " rows ignored.\n" +
dh.getDeletedCount() + " rows marked as deleted.\n" +
dh.getNoCtryCnt() + " rows have no country.\n" +
dh.getNoGeoCnt() + " rows have no geo.\n" +
dh.getInvalidCnt() + " rows are invalid.\n";
i can?t change this function...
so i need to work with the returned value...
i what thinking to use the following method to extract te number...
private int GetNumericValue(string sVal)
int iFirst, iCharVal, iEnd;
int iMult = 1, iRet = 0;
char[] aNumbers = "1234567890".ToCharArray();
iFirst = sVal.IndexOfAny(aNumbers);
iEnd = sVal.LastIndexOfAny(aNumbers);
if (iEnd < 0)
return 0;
string subStr = sVal.Substring(iFirst, iEnd - iFirst + 1);
iEnd = subStr.Length - 1;
while (subStr.Length > 0)
iCharVal = int.Parse(subStr[subStr.Length-1].ToString());
iRet += iMult * iCharVal;
iMult *= 10;
if (iEnd <= 0)
break;
subStr = subStr.Substring(0, subStr.Length - 1);
iEnd = subStr.LastIndexOfAny(aNumbers);
subStr = sVal.Substring(iFirst, iEnd + 1);
return iRet;
but i still need the 4rd line to extract the number
Maybe you are looking for
-
Issues in exporting data from SAP tables in SE16 to excel
1.How can I save an sap table (displayed through SE16) in ECC6 into a pivot table in excel. [ I have seen this option in R/3 4.7, but do not see it in ECC.] 2.How can I copy all the rows of a 3000 row SAP table in SE16 and paste the values into excel
-
Call forwarding when I didn't request it?
If you call our home phone, it rings once, then goes to busy. If you call back immediately thereafter, you get a fax machine tone (!). One the home end, if you pick it up i after the first ring, you might get the caller, but otherwise you get a dia
-
Hi, Newbie here. I'm trying to figure out how to add a hyperlink to a field in a report. There are five fields in the table and I'm trying to allow the user to click on one of the fields to bring up a new report or a page. I've looked into using srw.
-
my tablet pen is not working. when i tried to find the driver it gives me option to open the file with "dat". ca anyone help me to fix this problem.
-
Is there an add-on to allow the color laserjet CP3505n to print on both sides? Thanks.