Skip to Content
author's profile photo Former Member
Former Member

error when running customized batch input

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jun 17, 2008 at 08:43 AM

    Why don't u move ur numerical data into a char field before doing the further processing?

    data: l_char type c length ....

    l_num type i.

    l_char = l_num.

    perform BDC_FIELD XXXX l_char.

    FORM BDC_FIELD USING FNAM FVAL.

    IF FVAL NODATA.

    CLEAR BDCDATA.

    BDCDATA-FNAM = FNAM.

    BDCDATA-FVAL = FVAL.

    APPEND BDCDATA.

    ENDIF.

    ENDFORM.

    Regards,

    Joy.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Joyjit Ghosh:

      thats exactly what my workaround is doing, just you do it outside the method and i do it inside for just defining it once (but needing to change the method's name everywhere).

      i wouldnt prefer one of those two 'workarounds' to the other but i thought there was some mistake in my program or things i didnt consider or maybe a smarter solution....

      (if i, btw when running the program choose a nodata-sign 0 instead of / it doesnt give the error,of course)

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.