Skip to Content
avatar image
Former Member

SAP BPC Conversion file - using JS code

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 09, 2016 at 03:12 PM

    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)

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 09, 2016 at 01:25 PM

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

    Add comment
    10|10000 characters needed 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