Skip to Content
0
Former Member
Jun 17, 2008 at 08:33 AM

error when running customized batch input

32 Views

i recorded a batch input for transaction SM30 - just simply entering data,pressing 'save' and thats all...

afterwards i created a program using this record. it runs fine with the values i entered originally.

now i modified the program so that it runs in a loop, replacing my original values with the data structures corresponding fields.

for fields with type character it works fine. But when i run the program with numerical data fields in my table (and of course the table-field i want to enter it is also numerical) i receive a CONVT_NO_NUMBER error which comes from the 2nd line of this:

FORM BDC_FIELD USING FNAM FVAL.

IF FVAL <> NODATA.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDIF.

ENDFORM.

this method was created by my record,i didnt change it...

so my question finally is: is there any -smart- other way to replace it other than:

FORM BDCFIELD USING FNAM FVAL.

data _fval(255) type c.

_fval = fval.

IF _FVAL <> NODATA.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

ENDIF.

ENDFORM.