mibuso.com

Microsoft Business Solutions online community
It is currently Thu May 23, 2013 10:09 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Strange Import Error
PostPosted: Fri Nov 03, 2006 2:31 pm 
Offline

Joined: Thu Oct 19, 2006 3:26 pm
Posts: 149
Location: Castellón de la Plana
Country: United Kingdom (uk)
I'm still going through an upgrade process, and for the current database have exported the objects as text, run them through the conv-ml tool and am currently trying to import it back into Navision, fixing the errors on the way when this error appeared about 15 minutes ago and I cannot work it out at all.

Hay un error sintáctico en la importación en la línea 326903 en la posición 25:

OnPostDataItem=BEGIN.

El código AL no tiene la misma indentación que la primera línea


In English that would be something such as:

There is a syntax error in importing line 326903 in position 25

OnPostDataItem=BEGIN.

The AL code does not have the same indentation as the first line.

Has anyone come across this before or got a clue what this means? Looking at the text object file, there doesn't seem to be anything wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 2:41 pm 
Offline

Joined: Thu Apr 07, 2005 3:01 pm
Posts: 243
Location: Bydoszcz
Country: Poland (pl)
HI

open this txt file in editor, go to line no 25

this line probably started from the begining of line.
You must insert few space before line.

Check intendation of other trigger and set the same for your error line


Regards


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 2:52 pm 
Offline

Joined: Thu Oct 19, 2006 3:26 pm
Posts: 149
Location: Castellón de la Plana
Country: United Kingdom (uk)
JedrzejT wrote:
HI

open this txt file in editor, go to line no 25

this line probably started from the begining of line.
You must insert few space before line.

Check intendation of other trigger and set the same for your error line


Regards


Thanks for the reply, but this is what I do not understand, the error is occuring on line 326903, a custom built report 50077, where would position 25 be?

Code: Select all
        OnPostDataItem=BEGIN
                         //IF "C¢d. Operaci¢n"="C¢d. Operaci¢n"::"Pagar‚ del Ordenante" THEN
                         //BEGIN
                         //CLEAR(TextoSalida);
                         //TextoSalida :=
                         //  '06' + "C¢d. Opr" + PADSTR(NoCIF,10,' ') + PADSTR(Proveedor."CIF/NIF",12,' ') +
                         //  '910' + FORMAT(Efecto."Fecha vencimiento",6,5) {36 en total} + PADSTR('',7,' ');
                         //ArchSalida.WRITE(TextoSalida);
                         //END;



                         CLEAR(TextoSalida);
                         TextoSalida :=
                           '0806' + PADSTR(NoCIF,10,' ') + PADSTR('',12,' ') +
                           PADSTR('',3,' ') + CONVERTSTR(FORMAT(Efecto."Remaining Amt. (LCY)",10,Text004),' ','0') +
                           '00' {s¢n els 0's dels decimals} +
                           CONVERTSTR(FORMAT(TotalEfecs,8,Text004),' ','0') + CONVERTSTR(FORMAT(TotalRegtdo + 4 + 1,10,Text004),' ','0') +
                           PADSTR('',6,' ') + PADSTR('',7,' ');
                         ArchSalida.WRITE(TextoSalida);
                       END;


Surely it cannot mean line 25 of the whole file, that reads:

Text005 : TextConst 'ESP="HOY"';

a text constant of CodeUnit1


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 5:42 pm 
Offline

Joined: Thu Oct 19, 2006 3:26 pm
Posts: 149
Location: Castellón de la Plana
Country: United Kingdom (uk)
I've found what the problem is.

Indentation in this case does not refer to the number of spaces on the line in question, it refers to the level of logical indentation between {}

In this case, and after solving it, the error also appears in other objects later in the file, the original programmer of the custom objects in this database has been placing comments using {...comment...} inside expressions. This leads to the real error actually being created 100 lines previously than the reported line number, with the real the error being in the code of the previous trigger, yet only after running the conv-ml tool, because it was fine before then.

This strange use of comments inside expressions (100 or so lines before the reported error line)

Code: Select all
TextoSalida :=
  '06' + "Cód. Opr" + PADSTR(NoCIF,10,' ') + PADSTR(Proveedor."VAT Registration No.",12,' ') +
  '010' + CONVERTSTR(FORMAT(Efecto."Remaining Amt. (LCY)",10,'<integer>'),' ','0') +
  '00' {són els 0's dels decimals} + Proveedor2 + ProveCCCNoSucBanco + TotalCod + '1' { variar si es factible } +
  '9' {variar si es factible} + PADSTR('',2,' ') + ProveCCCDigControl +
  FORMAT(Efecto."Due Date",6,5) + PADSTR('',1,' ');


has clearly caused the conv-ml tool to become very confused, as it totally destroyed the 4th line shown above, turning it into:

Code: Select all
  '00' {són els 0Text0051' { variar si es factible } +


Obviously leaving an open curly brace with no ending curly brace. The import did not like this for obvious reasons.

I think the moral of this tale is never to use block comments inside expressions.


Top
 Profile  
 
 Post subject: Re: Strange Import Error
PostPosted: Tue Nov 18, 2008 12:09 pm 
Offline

Joined: Sat Nov 15, 2008 1:55 pm
Posts: 8
Location: Pontevedra
Country: Spain (es)
Thank you for your post.

Actually the problem is not in indentation. It's just a sintax error in any line before the line number that error message shows.

_________________
Felipe Crespo


Top
 Profile E-mail  
 
 Post subject: Re: Strange Import Error
PostPosted: Wed May 30, 2012 6:25 pm 
Offline

Joined: Tue Mar 22, 2011 5:15 pm
Posts: 12
Country: Ukraine (ua)
fcrespo wrote:
Thank you for your post.

Actually the problem is not in indentation. It's just a sintax error in any line before the line number that error message shows.


That is exactly true, what 'fcrespo' wrote. For instance, in my case I was missing an 'END;' statement in the middle of the object. Had to exclude the code piece-by-piece to realize what leads to the issue.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: