cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Uploading text nodes: conversion file does not work | BPC 10.0

Former Member
0 Likes
943

Hi gurus,

I am uploading master data and hierarchy from infoobject 0COSTCENTER to my BPC dimension ZCECO.

I've followed the "How To - Import Master Data and Hierarchies into SAP BusinessObjects BPC 7.5 from SAP NetWeaver BW".

I am in BPC 10.0 NW SP 21.

I am facing with a problem with the import of text nodes, which have an ID concatenated with the Controlling Area. I want to import them without Controlling Area. For example: in BW I have a text node "P0011ES401P" and I need to convert it in "1ES401P" for BPC dimension. The Controlling Area is "P001".


The cost center's ID does not have concatenated the Controlling Area. For example: In BW I have the ID "3401111001" and when I upload, I see in the dimension sheet "3401111001" as a member (without Controlling Area prefix)

I am using the package /CPMB/IMPORT_IOBJ_MASTER to upload master data and text nodes. When I run it, the text nodes are imported with the Controlling Area prefix. The conversion file does not work.

This is my transformation file:

This is my conversion file "CECO_CONVERSION.xls":

This conversion file should work. But not.

When I run el package /CPMB/IMPORT_IOBJ_MASTER, this is my set selection for 0COSTCENTER:

I've tried to import in several ways, with external/internal format and with update/overwrite option. I've tried all combinations and the result is the same. I don't manage to remove the Controlling Area prefix.

Due to I could not convert data with conversion file level, I also tried to make the conversion data at transformation file level. But my problem is that my text nodes do not have the same lenght in their ID's. For this reason, I can not put something like this in *MAPPING:

ID=*IF(ID(1:4)=*STR(P001) Then ID(5:14);ID)

I get an error of "command failed: end position is out of record index". I explored about this error and the solution was using the conversion file instead the transformation file, but neither.

I make sure that I put the correct transformation file into the prompt of the package and I have the correct name of my conversion file in *CONVERSION part of transformation file.

The fact is that I am able to import text nodes without Controlling Area prefix (as I want), but I have to run again the package and using another transformation file. But I want to get it in one step, as the How To explains.

I would appreciate any help,

Kind regards,

Manu



Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi there,

As Vadim and Prashant say to me, I've tried the following javascripts:

  • js:%external%.toString().substr(0,4)=="P001" ? %external%.toString().substr(4) : %external%.toString()

  • js:(%external%.toString()).substr("P001".length, %external%.toString().length)

  • js:(%external%.toString()).substr(4, %external%.toString().length)

  • js:(%external%.toString()).substr(4)

All of them do not work.

This is the result of the validation and process of the transformation file for all the attempts shown above.

As you can see, the text nodes keep being with the Controlling Area prefix.

Definitely,i think that the conversion file is not being called. It is like conversion file does not exist.

Manu

former_member186338
Active Contributor
0 Likes

Looks like you are not using conversion file at all! Have you properly referenced it?

P.S. And it's absolutely strange to test all variants, one is enough!

Former Member
0 Likes

In your transformation file in conversion section use 'ID' instead of 'ZCECO'

*CONVERSION

ID = CECO_CONVERSION.xls

Thanks

Prashant

former_member186338
Active Contributor
0 Likes

Yes, if you have ZCECO = CECO_CONVERSION.xls, then Prashant is absolutely correct!

Answers (3)

Answers (3)

Former Member
0 Likes

Hi again,

Yes, you are right! I got it

Infinite thanks to all of you.

Kind regards,

Manu

Former Member
0 Likes

Hi Manuel,

As Vadim said you can make use of java scripts in your conversion file like

js: %external%.replace("apples", "oranges");

For Help go through the following links

Data Conversions - SAP Documentation

Data Conversion Maintenance - SAP BusinessObjects Planning and Consolidation - SAP Library

Aravind

former_member186338
Active Contributor
0 Likes

Why not to use simple javascript in the conversion file? A lot of examples are available if you search this forum.

Vadim

Former Member
0 Likes

Here is one blog -

Since long time was wondering why we dont have any document / blog, at last got one...

Thanks

Prashant

former_member186338
Active Contributor
0 Likes

Instead of this blog it's better to read ANY online JavaScript tutorial! And in most cases the online tutorial provide testing sandbox for script experiments!

Vadim

former_member186338
Active Contributor
0 Likes

Smth like this: js:%external%.toString().substr(0,4)=="P001" ? %external%.toString().substr(4) : %external%.toString()

Equivalent of:

ID=*IF(ID(1:4)=*STR(P001) Then ID(5:14);ID)

Former Member
0 Likes

Vadim,

I am confused about how to type these javascripts in the columns External and Internal of conversion file.

Can you write exactly these js?

I appreciate this very much.

Manu

Former Member
0 Likes

Hi Prashant,

I already read that document, but I could not find a javascript for my requirement of removing Controlling Area prefix.

I will search the tutorials that Vadim says. It looks interesting.

Thanks,

Kind regards,

Manu

former_member186338
Active Contributor
0 Likes

Put it in internal (the whole line starting with js)! And * in external

Vadim

Former Member
0 Likes

Hi Manu,


Certainly you need to build your own javascript for your requirement referring existing artifacts and online tutorials.

you can try the one suggested by Vadim already.


o/w please try out these -

js:(%external%.toString()).substr("P001".length, %external%.toString().length)

or

js:(%external%.toString()).substr(4, %external%.toString().length)

or simply

js:(%external%.toString()).substr(4)

in column 'Internal' instead of '*' keeping external as is 'P001*'

Thanks

Prashant

former_member186338
Active Contributor
0 Likes

The first link if you search Google for "javascript tutorial" will be:

JavaScript Tutorial

And it's OK

Former Member
0 Likes

You can make it more dynamic by

js:%external%.toString().substr(0,4)=="A001" ? %external%.toString().substr(4,%external%.toString().length):%external%.toString()

Thanks,

Surya