cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Commas from HIER_NAME

Former Member
0 Kudos

Hi,

In the transfer of hierarchy nodes names to BPC from SAP BW I want to manipulate the Hiearchy Node Name (description rather than the unique ID)

I think that this the HIER_NAME name in the transformation file,

I have used a conversion file and populated it as below but it hasnt removed the comma?

EXTERNALINTERNAL
*js: %external%.replace(",", " ")

Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi - I got it working with original js: %external%.replace(",", " ")

Not sure why it didnt work in the first place. Might have been my mapping.

thanks for your responses

former_member186338
Active Contributor
0 Kudos

This syntax will work for single comma only!

To remove all commas - %external%.toString().replace(/,/g,"")

Former Member
0 Kudos

Oh!!! let me try the syntax you have mentioned...

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Leo,

you map the hierarchy name in the conversion file, you don't need to use the wild card *

eg,

EXTERNAL       INTERNAL

HIER_name      PARENTH1

Andy

former_member186338
Active Contributor
0 Kudos

Hi Leo,

Please post the error result!

Vadim

P.S. Try this syntax with sting conversion, escaped comma, search for all commas and replacement to no character:

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

Message was edited by: Vadim Kalinin - P.S. added

former_member186338
Active Contributor
0 Kudos

P.P.S Not necessary to escape comma:

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

Former Member
0 Kudos

Hi,

I tried using

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

and

I tried using

EXTERNALINTERNAL
*js:%external%.toString().replace(/,/g,"")

by using EVDESCRIPTION=CONV.xls

It doesnt work there are still lines with the description where it has a comma still coming accross?

Effectively, the problem is in the master data extract if a description has a comma it treats it as a delimiter and a column goes missing in the extract as the comma adds a column in the extract. I have tried changing the delimiter to TAB with no success.


Cheers,

former_member186338
Active Contributor
0 Kudos

"I have tried changing the delimiter to TAB with no success." - please describe!

Vadim

Former Member
0 Kudos

Hi Leo,

Which package did you run to upload the text?

Are you talking about loading text for master data or hierarchy nodes?

Andy

sap_user62
Active Participant
0 Kudos

Please check this thread