Skip to Content
0
Jan 29, 2009 at 11:53 PM

Fox Code: Error adding 1 to variable declared to characteristic NUMC 10

24 Views

Using a parameter group, I'm trying to complete the very simple task of adding a sequential number to new records being created.

The fox code goes something like this.....

1. Set starting sequential number based on Planning Area variable

2. If a record has '#' within a characteristic field declared as NUMC 10, copy record and place value from variable into the field. So far so good... no issues here.

3. New record is created successfully.

4. Increase value of variable by adding one. Not working! I get the message, "Formula error: Formula element 1 could not be recognized"

The variable in question is...

DATA EXISTBPSID TYPE ZTA_BPSID.

ZTA_BPSID is a cube characteristic of Data Type: NUMC (Character string with only digits) and Length: 10

Why can I not add one to this variable? Or the more broad question, how can add a sequential number to a characteristic when creating a new copied record?

Thank you in advance for any input on this! It's driving me nuts!!!

THE FOLLOWING IS THE EXISTING CODE

DATA EXISTBPSID TYPE ZTA_BPSID.

DATA BPSIDNO TYPE ZTA_BPSID.

BPSIDNO = VARV(BPSTAS2).

IF EXISTBPSID = '#'.

= .

BPSIDNO = BPSIDNO +1.

ENDIF.

Edited by: Vinay Reddy Ravoola on Jan 31, 2009 1:32 AM

Edited by: Vinay Reddy Ravoola on Jan 31, 2009 1:35 AM