Skip to Content
0
Aug 19, 2009 at 04:54 PM

Error in field routine

32 Views

Please, may you help me to check what is wrong in this field routine code: By moving data from a DSO to another.

In the DTP i get this error in the first Data packet:

"The Argument '6,000' cannot be recognised as number". The message number is "Message nr. RS_EXCEPTION000

"

"One exception occurs" Message nr. SY530

Meldungsnr. RSBK231

The program just take a string and check if it contains a character different to '1234567890,' and if yes, the "EXIT" instruction stop the DO ENDDO statement. SEE the code down:

Data: istkosten(8) TYPE p DECIMALS 3,

count type i,

answer type string,

cnt type i,

richtig type i.

richtig = 1.

cnt = 0.

count = strlen( SOURCE_FIELDS-/Infoobject ).

if count is not initial.

do count times.

answer = ( SOURCE_FIELDS-/Infoobject ) - cnt.

if answer CN '1234567890,'.

  • CN Contain not only

richtig = 0.

EXIT.

ENDIF.

cnt = ( cnt + 1 ).

enddo.

endif.

if richtig = 1.

move SOURCE_FIELDS-/Infoobject to istkosten.

ENDIF.

if istkosten >= 0 and istkosten < 2.

RESULT = '<2'.

ELSEIF istkosten >= 2 and istkosten < 5.

RESULT = '<5'.

ELSEIF istkosten >= 5 and istkosten < 10.

RESULT = '<10'.

ELSEIF istkosten >= 10.

RESULT = '>=10'.

ENDIF.