Skip to Content
avatar image
Former Member

Unexpected ' ' at position XX in transformation file. *IF THEN formula

In order to avoid error for unfilled fields, we use sentence BU = *IF(0DIVISION=*STR() THEN *STR(_NA_BU);0DIVISION).

Transformation file mapping validation ends with this message

[line 15] Unexpected ' ' at position 21 in the mapping formula [*IF(0DIVISION=*STR() THEN *STR(_NA_BU);0DIVISION)]

So, the space before THEN should be eliminated.

If we do that, the validation ends with:

Command error: COL(101 )=

that seems to be related to SAP NOTE 2456763 - Command error: COL() when running BPC data package. The solution of this note is to put a space before and after the THEN, but then we have the previous error missage.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Jun 22, 2017 at 07:37 AM

    The mentioned note recommend to insert a lot of spaces!

    BU = *IF( 0DIVISION = *STR() THEN *STR(_NA_BU); 0DIVISION )

    Also ensure that you use TAB delimiter.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 22, 2017 at 07:53 AM

    Thanks Vadim.

    I tried with different combinations, including the one in the SAP note, but every space after the *IF sentence give us an error, no matter where it is. We have TAB delimiter.

    This is the transformation file

    *OPTIONS

    FORMAT = DELIMITED

    HEADER = YES

    DELIMITER = TAB

    AMOUNTDECIMALPOINT = .

    SKIP = 0

    SKIPIF =

    VALIDATERECORDS=YES

    CREDITPOSITIVE=YES

    MAXREJECTCOUNT=

    ROUNDAMOUNT=

    *MAPPING

    SP_ACCOUNT = *MVAL(0G_AVV010|*NEWCOL(S001)||0G_QVV001|*NEWCOL(S002))

    BU = *IF(0DIVISION=*STR()THEN*STR(_NA_BU);0DIVISION)

    CATEGORY = *NEWCOL(Actual)

    CHANNEL = 0DISTR_CHAN

    COMPANY = 0COMP_CODE

    COUNTRY = 0COUNTRY

    SORG = 0SALESORG

    CUSTOMER_SH = 0SHIP_TO

    CUSTOMER_SH_COMP = 0SHIP_TO+0COMP_CODE

    CUSTOMER_SH_SORG = 0SHIP_TO+0SALESORG+0DIVISION+0DISTR_CHAN

    MATERIAL = 0MATERIAL

    MAT_H = Z_WPAPH4

    MAT_PLANT = 0MATERIAL+0PLANT

    PROFITC = 0PROFIT_CTR

    RPTCURRENCY = 0CURRENCY

    TIME = 0FISCPER(1:4)+*STR(.)+0FISCPER(6:7)

    *CONVERSION

    bpc-error.png

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 26, 2017 at 02:35 PM

    Just a working sample from BPC 10.1 included in BW 750 SP06:

    BPC_COMPANY_CODE=*IF(0COMP_CODE=*STR() THEN *STR(CO_NONE);*STR(CO_)+0COMP_CODE)

    only spaces before and after THEN are required!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 26, 2017 at 07:57 PM

    Hi Vadim,

    thanks again for your answer, but I've tried this combination, too.

    BU=*IF(0DIVISION=*STR() THEN *STR(_NA_BU);0DIVISION)

    [line 15] Unexpected ' ' at position 21 in the mapping formula [*IF(0DIVISION=*STR() THEN *STR(_NA_BU);0DIVISION)]
    Validation of mapping failed; check the worksheet for highlighted errors
    Add comment
    10|10000 characters needed characters exceeded

    • May be something was changed in BW 750 SP06.

      I can confirm that this line is working absolutely fine in my system:

      BPC_COMPANY_CODE=*IF(0COMP_CODE=*STR() THEN *STR(CO_NONE);*STR(CO_)+0COMP_CODE)

      or another:

      BPC_PROFIT_CENTER=*IF(0PROFIT_CTR=*STR() THEN *STR(PC_NONE);*STR(PC_)+0CO_AREA+0PROFIT_CTR)
  • avatar image
    Former Member
    Aug 24, 2017 at 02:13 PM

    Hi Edim

    I'm running into this same issue and I was wondering if you were able to identify a solution for this issue?

    Thanks,

    Cory

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 27, 2017 at 02:05 PM

    Please test with EPM SP29 and see if same issue persists

    Add comment
    10|10000 characters needed characters exceeded