Handling of special charactersin a conversion file
I am using
js:%external%.toString().replace("-","_") in a conversion file
to replace dashes with underscore.
The code only works for one instance of a dash. If there's another dash on same record, it doesnot replace it.
Can someone give me a suggestion to handle this issues so that all the dashes are replaced?
Thanks
Kara.
Hi Kara,
The Javascript string replace method will only replace the first instance of a string. I'm not completely sure if it is supported by the NW javascript interpreter, but you should be able to replace all occurrences of a string by using a global regular expression instead of a string, like:
js:%external%.toString().replace(/-/g,"_")
Ethan
Similar Messages
-
How to deal with special character in source file
Hi experts,
i am doing a file to file scenario in which my source file contains many special characters when i am puting this file into moni its going with the special character .My source file is a fixed length file so in content conversion i have specified the file length but due to these special charcters these field lenght is also varing.So please guide me how to deal with these special characters in sender adapter
regards,
Saurabhyou could try using a Java Mapping to change the encoding manually. For that, set the encoding of the OutputFormat of the XML you'll serialize. Try the following code piece for the mapping (inside a try/catch declaration):
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
Document input = documentBuilder.parse(in);
OutputFormat format = new OutputFormat(XML, "ISO-8859-1", false);
XMLSerializer serializer = new XMLSerializer(out, format);
For more details check this guide:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42 -
How to reve Extra special characters from source file
Hi all
I am doing an file to idoc scenario in which i am using SEEBURGER BIC adapter for converting flat file to xml.My input file contain HEADER ,ITEMHEAD AND FOOTER.When i am processing an error is coming extra charcterYP persent before header.While in input file its not visible,it might be some special controll character
my file is with utf-16 format( little endian) encoding.
Plz share if u have any idea about the sudden occurence of special character and how to overcome it.
Regards
Saurabh Sharmasorry, i meant the code for removing the special character.
Just a quick clarification about what i read in your previous post: that you are using a SEEBURGER adapter and in this adapter there is a module deployed called BIC which does the file to xml conversion.
So the plan is to insert the custom adapter which will remove the extra space before the BIC adapter in Seeburger adapter right. my only assumption here is that we can add this custom adapter before bic module in Seeburger adapter module tab.
Basically i dont no whether you have the option of adding a new adapter module in SEEBURGER ADPTER BIC MAPPING DESIGNER just like there is one in File adapter.
Please confirm -
Regd: Handling of special characters in XML
Hi ALL,
i am using java mapping to conevrt IDOC XML to Flat file using SAX parse and then reading the whole content into a single Filed,the output of the java mapping is the input for graphical mapping .
My problem is there may be some special characters in the input IDOC. when ever these special characters come my java mapping is not able to Parse the IDOC.
Please let me know how can handle this special characters.
Thanks,
hemanth.Hi ,
Java has some characters reserved which is normally used to declare the Entity Name. To handle such kind of situations, you can replace these characters with these special characters, which get substituted automatically while parsing the XML file.
Refer:
http://www.javacommerce.com/displaypage.jsp?name=saxparser3.sql&id=18232
I hope it helps.
Regards,
Anurag Gargh
Edited by: Anurag Gargh on Aug 11, 2009 3:41 PM -
How to read no value(conversion file)
hI Friends,
i'm loading actuals data from bw to bpc application. some of records in bw cube are not having data for one characterstic (eg: master cost center).
1. i want to drop those records which are not having data, how can i achieve this through conversion file,what content can i put in external column? and in internal column i will use *skip.
2. if i want to put some new value for records having no value for one characterstic(eg: master cost center). how can i assign that in conversion file? i.e what can i put in external col.
Above 2 question relates to conversion file, that same characterstic which is having no value in bw cube. For many records i have master cost center value, but here i want to handle no value.
Thanks,you are correct, i want to handle no value situation(alv cell is having no value) for master cost centre infoobject of bw cube.
I also get similar idea like you as follows
External col: *
Internal col: *if(js:%external%.length=0 then CC_A, dummny parameters). But i haven't tested and now analysing data in bw cube.
I would like to know any other keywords are there, why because in my bw cube around 3 characterstics are having no value(similar) to above. Yes by above way, one can maintain 3 conversion files.
Regards,
Naresh -
In a Conversion file, Using Java Script - IF statement with Greater,Less definitions
Hail to All Gurus,
Well, I've been trying to make a conversion file by using if statement of Java script with < , > definitions. unfortunately i got "Evolution error" over and over again.
Actually i want to convert all dates before 2009 as 2008.12. And the dates which is greater than 2009 will be converted as they are (e.g. 2009.01 or 2010.02 etc.).
Code is:
js:if(%external%.toString().substring(0,4)<"200900"){"2008.12"}else{%external%.toString().substring(0,4) + "." + %external%.toString().substring(4,6)}
SAP EPM version 10.0 SP15 Patch 2
Build 8586
Thanks for your help in advanceSadi,
You can write if Statement in transformation not conversion.
Look at this docs,
How to Import Master Data and Hierarchies into SAP BusinessObjects BPC 7.5 from SAP NetWeaver BW
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c02d0b47-3e54-2d10-0eb7-d722b633b72e?QuickLink=index&…
Thanks -
How to search a special string in txt file and return it's position in txt file?
How to search a special string in txt file and return it's position in txt file?
I just posted a solution for a similar question here: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=362699#M362699
The top portion can search for the location of a string, while the bottom portion is to locate the position of a character. Both can search for a character.
The position of the character within the file is displayed in the indicator(s).
R -
While Installing adobe reader and acrobat im getting error 1406 this error. I had already tried every possible step including special permission in registry file. Please help..
What is your operating system? Is there anything else beside the number 1406?
-
Conversion File - Getting one record and skip the rest
Hi Experts,
I have one issue using conversion file. Is it possible to get only the records that we want without using SKIP? Example below:
Product
Partner
Invoice No
P1111
PA1
INV1
P2222
PA2
INV2
P5555
PA3
INV3
P9999
PA1
INV4
Let's say I want to get all the product number for partner - PA1.
Instead of using skip in the conversion file as below, is there another way to do in conversion file?
Internal
External
PA2
*SKIP
PA3
*SKIP
The reason is because I might have partner PA4, PA5 in future and i will need to modify the conversion file to include to SKIP PA4 and PA5.
Is there a way to get the data for partner PA1 only?
Appreciate your advice.
Thank you!
Best regards,
NgHi Bishwajit,
Thank you for the response. I actually tried to use java script previously but I can't get it working. I am not really good at it. I tried several ways using if condition and SKIP but it keeps on fail with error saying "Java scription JS:IF(%EXTERNAL%!=PA1 THEN *SKIP) evaluation error".
Followings are the list of sample I have tried so far:
Internal - *
External - JS:IF(%EXTERNAL%!=PA1 THEN *SKIP) or
JS:IF(%EXTERNAL%.string!=PA1 THEN *SKIP) or
JS:IF(%EXTERNAL%!=PA1 THEN SKIP) or
JS:IF(%EXTERNAL%.string!=PA1 THEN SKIP) or
JS:IF(%EXTERNAL%.string()!=PA1 THEN *SKIP) and etc.
I am not sure if we can use SKIP in that way. Appreciate if you can advice on this.
Thank you.
Best regards,
Ng -
How to READ/SAVE Transformantation / Conversion File in BPC with ABAP
hi Experts
I would like to READ/SAVE Transformantation / Conversion File in BPC with ABAP
When I interface Transaction File From Other Cube,
I want to run Interface test from ABAP using Transformantation / Conversion File before run DM.
and, l want to Manage files with ABAP Program ,if need to modify Transformantation / Conversion File
Thank you.Hi Young,
In addition to the above suggestions, would like to inform you that, if your requirement can be met by running those files in BPC Excel itself, what is the point in running ABAP program for the same?
It would be much more easier for you to run those files in BPC Excel itself and that is how BPC is designed.
Hope this clarifies further.
Rgds,
Poonam -
Increase number of rows in a Conversion File
Hi Experts,
I´m setting up a huge conversion file (around 25000 rows), and when I`m going to validate it, Only the first 3568 rows are safe.
Does anybody know how to modify the conversion file, in order to allow more rows?
Thank`s in advance.Hi,
Isnt it very tedious to maintain such a huge conversion file? Can you consider to use some java scripts or some wild characters to reduce the number of rows in your file.
Hope this helps. -
A question for transformation/conversion file
Hi Guru:
I load data from a file for a dimension.
For one member, I want to set the value to blank if the source value is equal to "1000".
How to write the conversion/tranformation file to achieve this?
Thanks.
EricHi,
What Nilanjan said is correct. You cannot have any member as blank in BPC.
I can suggest you a workaround, have a member BLANK in your dimension with no description and maintain the conversion file to map the source value 1000 to this member.
So when you report on this, end user is going to see only the description(if you hide the key values) which is going to be empty without any value for it. So they have the feel of no ID is assigned to it.
Hope this helps,
Regards,
G.Vijaya Kumar -
Huge Conversion File - Too many lines
Hi Experts,
Is there any way to split a Conversion File?
I have a Conversión file with too many lines, so when I save it, it takes a lot of time, (11.000 rows, more than half an hour) and sometimes the Excel hand up (froze).
It is becaming a problem, because everytime I save the Conversion file, I can not use the excel for a while.
Any idea?
Thanks in advance.
IriaIria and Patrick,
I want to give an information about this.
BPC transformation file can be multiple steps in one file.
For example,
*Options
*Transformation
*Conversion
*Options
*Transformation
*Conversion
*Options
*Transformation
*Conversion
Therefore, If you only has a problem with conversion, you can do it as below
*Options
*Transformation
*Conversion
conversion part1
*Options
*Transformation
*Conversion
conversion part2
*Options
*Transformation
*Conversion
conversion part3
Note 1 : If you don't need multiple transformation, you only need to specifiy it in the first transformation.
Note 2 : Conversion file can have multiple Tabs in one conversion excel workbook but I am not sure about the performance
when you do that. So please try two things.
1. Split it into multiple worksheet
2. Split it into multiple workbooks.
Please update your result for others.
Note3 : You don't need multiple Convert task, it will be executed in a convert task.
I hope it will help you
Thank you.
James Lim
Edited by: James Lim on Mar 4, 2010 4:31 PM -
Remove zero in conversion file
Hi experts
Can you help me with a way to remove zero in conversion file, let me explain, I want to load transactional data from BW but I have a charateristic with 10 character but in BPC side my dimension have 8 character, technicaly in BW the file is like this:
BW
0012345678
BPC
12345678
How can I remove left zeros for the characteristic?
any input will be apreciated.
regards
Lucio Martinez!!Hi Lucio,
I will present my scenario. I want to remove the leading Zeros from the Customer ID and while transferring the values in BPC, I want to prefix the value (after removing the zeros) with 'C_'. eg: 000012345 so I want to transfer that as 'C_12345'.
In transformation file, I had done the mapping as
ID=*str(C_)+ID
which works fine, if I dont have to remove the zeros. I added code in the Conversion file
EXTERNAL INTERNAL
js:PARSEINT(%external%)
But it is giving me an error message that validation has failed for transformation file and it is giving a message that:
Line 1 :Detected duplicate member ID 'NaN' .. Line 3560 :Detected duplicate member ID 'NaN'
Can you please help me out in this situation? Any suggestions how can I achieve this?
Your replies will be much appreciated.
Thanks,
Abhishek -
BPC Conversion File - Same External ID for different Dimensions
Hello Experts,
I hope you can help me.
We are running BPC NW V10.0 SP13
I have a Conversion File for External to Internal Mapping on the DATASRC Dimension.
See Image 01
I would now like to use the same 'External ID' to identify the mapping rules for two Dimensions, DATASRC and CATEGORY Member ID
See Image 02
The rules that determine how the External ID is mapped are subjective rather than derived from patterns present in ID. This means I cannot use any conditional logic to determine the mapping rules. For example, I cannot assume that all IDs that start with 99Z19 will need to be mapped the same way.
So the CATGORY Member ID needs to be hard-coded somehow.
Although it is simple enough to copy the entire worksheet and hold the mapping for each Dimension as separate w/sheets, this duplicates the amount of ongoing maintenance and turns 80 rules into 160 (a number which will rise!)
Is there a way of using javascript in the Formula column to identify the Internal Member ID for the CATEGORY Dimension.
If so, how would the Transformation File reference this?
Any help would be much appreciatedSorry Vadim, I was having problems uploading the actual files.
So I have had to screenshot instead...............
Transformation File
Conversion File
As you can see, the Trans file assumes the CATEGORY is fixed to one Member.
But I want to use the External ID in the the DATASRC Conversion w/sheet and specify different CATEGORY Member IDs.
Maybe you are looking for
-
Color change after 10.4.8 update
After the update, my eyes are picking up a universally light, bluish tinge (not as in light-blue, but as in a small amount of blue in the white) on my display (which is just the Macbook's LCD display, not an external one). Has anyone encountered this
-
Issue Saving Between Multiple Systems
Hi all, perhaps this has been answered before, but I'm not having much luck with my phrasing in order to find it, if so. I work in a multi-station editing setup on a university campus, with three separate Mac systems sharing projects and footage/elem
-
Solaris 8 4/01 Intel Instalation/Boot Problems
I am TRYING to install the Solaris 8 for Intel and i am having several problems. I managed to solve some of them but now i am stuck. I am running a PII with a an Adapetc 2940 and a scsi disk. I am using interactive instalation one software cd 1. I am
-
I have a gpib read that spits out two values at a offset. This is in a loop thats defined by the initial , final and step size parameters. My question is, why does the gpib read freezes (or doesn't exectue; whenever I turn the debug light on(after it
-
Test Repository - Use of our own business process model as structure
We want to use our own business process model as structuring element in the test repository. I entered my hierarchy by the transaction STWBM using environment/application hierarchy / Customer. But my hierarchy is not visible in the test repository. I