cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10 NW - Error converting Invalid Character when loading BW Master Data

mauriciobrandon
Explorer
0 Kudos

Hi Experts,

I've been trying to load BW Master Data from BW to BPC Dimension through Transformation/Conversion File.

Transformation File:

Conversion File - NODENAME:

Conversion File - ID:

My BW InfoObject:

I've tested the command through http://www.w3schools.com/js/tryit.asp?filename=tryjs_string_replace, an it works there.

When I try to Execute through Run Package, it gives me an error:

----

Task name CONVERT:

No 1 Round: Error in Admin module or a component used by Admin module

Dimension member TOT-ADM/MG is an invalid member ID in dimension TEST_ORGSTRUC

model: TEST_PAYROLL. Package status: ERROR

----

I've tested for usual characters and the command worked. I've tested only for second record and it loaded without conversion, as intended.

What can be done to convert correctly this kind of value?

Regards,

Maurício.

former_member186338
Active Contributor
0 Kudos

Incorrect primary tag - you secondary tag has to be primary!

mauriciobrandon
Explorer
0 Kudos

Thanks for noticing. I've corrected.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

The correct js for ID:

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

And remove NODENAME - incorrect here!

mauriciobrandon
Explorer
0 Kudos

Thank you for the support, Vadim.

former_member186338
Active Contributor
0 Kudos

You can also upvote other answers if helpful 🙂

Answers (3)

Answers (3)

former_member186338
Active Contributor
0 Kudos

Also I suspect that with your ID's the following will not work correctly:

former_member186338
Active Contributor
0 Kudos

Or using [...]

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

In [] 2 symbols are defined:

\s - space

\/ - / (has to be used prefixed with \)

g - all matches of each symbol

former_member186338
Active Contributor
0 Kudos

Sorry, but what do you mean by NODENAME in CONVERSION section???

Looks like you are loading master data, not the hierarchy - 2 separate processes!

former_member186338
Active Contributor
0 Kudos

Also - if you have "*" in the conversion file all lines after first "*" will not be processed.

If you want to replace something with javascript - do it in a single line!

mauriciobrandon
Explorer
0 Kudos

Yes, I understand that. I've already read the articles.

This part of transformation file is a test to understand the transformation file actions, because I was unable to find the problem with my javascript code. I thought it was a problem looking for the correct field to convert, that's the reason for the test.

I tried removing the first replace line (removing spaces) and it worked. What is the best practice when you need to remove more than one character?

former_member186338
Active Contributor
0 Kudos

Please spend some time reading about regular expressions in JavaScript!

Look on my sample...