cancel
Showing results for 
Search instead for 
Did you mean: 

Replace Special Character using conversion file

0 Kudos
1,295

Hi Gurus,

We are loading the data from flat file.  The data in one column say for Account comes with special characters ex ACCT123.$, I would like to convert it to ACCT123 (remove .$).

Tried using the conversion file for Account with below combinations

ExternalInternal
*.$*
*.$js:%external%.replace(".$","")
*.$js:%external%.toString().replace('.$','')
*.$

RG_TEST

However, it doesn't work.  It doesn't convert to "RG_TEST" as well.  It throws an error for ACCT123.$ doesn't exists in ACCOUNT dimension.

Looks like it doesn't recognise $ in External column.

We are on BPC 10NW SP6 on HANA

HANABPC SP4

SAP BW 7.31 SP8

Please suggest.

Let me know if you need more information.

Regards,

Rashmi

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Try:

js:%external%.toString().replace(/\.\$/g,"")

Vadim

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Rashmi,

In your external column enter *

in your external enter js:%external%.toString().split(".$").join("")


Remove the line Convert_internal = YES from your transformation file. you don't need that.

Andy

0 Kudos

Thanks Vadim, your solution did work, at least it did no give me any error while validating the transformation file.

However, this works with "*" in External Column, however if I use *.$ in External, it gives an error.

We has created OSS message for this error and SAP suggested to use the latest released version of  EPM Add-in (SP19 Patch 1)


Andy,

We did try this solution earlier, which did not work.

Regrards,

Rashmi

former_member5472
Active Contributor
0 Kudos

Hi,

Yes in Transformation file. Use all "CAPS.. See the help link for reference.

SAP Library - Data Manager

Prat

former_member5472
Active Contributor
0 Kudos

Hi,

Try this:

Use

Convert_internal = YES ( if you putting the in external column)

and then add your java script code.


js: %external%.replace(".$", " ")

Prat

0 Kudos

Hi Prat,

Where do we put "Convert_internal = YES " ?  I tried in Transformation file under *OPETIONS and it gave an error.

Please suggest.

Regard,

Rashmi