on 08-19-2009 5:54 PM
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.
A ABAP expert just help me in the whole programming code
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think the problem is with the below line of code.
answer = ( SOURCE_FIELDS-/Infoobject ) - cnt.
The source_field should be a CHAR and since you are trying to subtract char with number, it is throwing an error.
Assign the data of this field to sum numeric field and then subtract.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.