Skip to Content

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

Related questions

6 Answers

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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


    bpc-error.png (20.4 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a 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)
  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 27, 2017 at 02:05 PM

    Please test with EPM SP29 and see if same issue persists

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.