Skip to Content
0

SAP BPC Conversion file - using JS code

Nov 09, 2016 at 01:04 PM

361

avatar image
Former Member

Hi All,

Please help us with the following scenario.

When we tried to load the transaction data from BW object to BPC, we have one field 'FISCALPER' that we need to convert to BPC format. Conversion logic for the same is as follows:

2006001 --> 2006.07

2006002 --> 2006.08

2006003 ---> 2006.09

2006004 --> 2006.10

2006005 --> 2006.11

2006006 --> 2006.12

2006007 ---> 2007.01

2006008 --> 2007.02

Is it possible to achieve the same using conversion file Java script.?

If so, please guide us.

Thanks and Regards,

Sreeja V

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Vadim Kalinin Nov 09, 2016 at 03:12 PM
2

Easy:

js:(((parseInt(%external%.toString().slice(0,4))*12+parseInt(%external%.toString().slice(-2))+5)/12)^0).toString()
+"."+("0"+((parseInt(%external%.toString().slice(0,4))*12+parseInt(%external%.toString().slice(-2))+5)%12+1).toString()).slice(-2)

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Nov 09, 2016 at 01:25 PM
0

Easy, just search forum. This question was answered many times.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Incrementing the year using conversion file is not found in any forum. It wont be 2006 all the time.. This number may change and we cannot hard code the same as well.

????007 ---> (???? year + 1).01

Thanks and Regards,

Sreeja V

0