Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Runtime Error CONVT_NO_NUMBER

Former Member
0 Kudos

Dear all,

I am calling transaction F-02 for posting G/L Account from an FM. I tried with the Header Data and Account and Cost Centre but it says ABAP Runtime Error CONVT_NO_NUMBER. I undersood that its because of the Number interpretation and coded accordingly but still it throws the same error.

Can you please help me in this....

With Regards

Jay

4 REPLIES 4

naimesh_patel
Active Contributor
0 Kudos

Hello,

remove ',' from your amount values and then pass it to the FM.

Regards,

Naimesh

Former Member
0 Kudos

Hi,

if u have any amount fields u need to do this...

data : w_char_amt(16) -> 16 or 18 based on ur amt field output length.

write <amt field > to w_char_amt.

pass this w_char_amt to BDC.

Sreedhar

Former Member
0 Kudos

Hi,

Consider amt is your amount field.

Then pass it without any '<b>,</b>' and check the no of decimal places allowed.

Try doing this before passing the field.


  TRANSFER amt using ', '.
  CONDENSE amt NO-GAPS .

Then pass the value to the transaction.

Regards,

AS

0 Kudos

Dear all,

Thanks for giving me some hope. I tried the possiblities but still it says the same error. I have pasted the FM in nutshell. Can you please see that and help me.

FUNCTION ZUPLOAD_XLS.

*"----


""Local interface:

*" IMPORTING

*" REFERENCE(P_BUKRS) LIKE BKPF-BUKRS

*" REFERENCE(P_BLDAT) LIKE BKPF-BLDAT

*" REFERENCE(P_BUDAT) LIKE BKPF-BUDAT

*" REFERENCE(P_MONAT) LIKE BKPF-MONAT

*" REFERENCE(P_WAERS) LIKE BKPF-WAERS

*" REFERENCE(P_BKTXT) LIKE BKPF-BKTXT

*" TABLES

*" IN_JE_XLS STRUCTURE ZFGI_JE_STR

*"----


*

ITAB-BSCHL = 40.

ITAB-SAKNR = '812070'.

ITAB-WRBTR = '30881.00'.

ITAB-KOSTL = '11620009'.

APPEND ITAB.

MOVE P_BUDAT(4) TO TEM+4(4).

MOVE P_BUDAT+4(2) TO TEM(2).

MOVE P_BUDAT6(2) TO TEM2(2).

MOVE P_BUDAT(4) TO TEM+4(4).

MOVE P_BUDAT+4(2) TO TEM(2).

MOVE P_BUDAT6(2) TO TEM2(2).

MOVE P_BLDAT(4) TO TEM1+4(4).

MOVE P_BLDAT+4(2) TO TEM1(2).

MOVE P_BLDAT6(2) TO TEM12(2).

MOVE P_BLDAT(4) TO TEM1+4(4).

MOVE P_BLDAT+4(2) TO TEM1(2).

MOVE P_BLDAT6(2) TO TEM12(2).

WRITE ITAB-WRBTR TO WRBTR.

CONDENSE WRBTR NO-GAPS.

WRITE ITAB-BSCHL TO T_BSCHL NO-GROUPING LEFT-JUSTIFIED.

IF ITAB-KOSTL+8(2) EQ SPACE.

MOVE ITAB-KOSTL TO HOLD_KOSTL+2(8).

MOVE '00' TO HOLD_KOSTL(2).

ELSE.

MOVE ITAB-KOSTL TO HOLD_KOSTL.

ENDIF.

FIELD_LENGTH = STRLEN( ITAB-SAKNR ).

IF FIELD_LENGTH EQ 10.

MOVE ITAB-SAKNR TO HOLD_SAKNR.

ELSE.

MOVE ITAB-SAKNR(6) TO HOLD_SAKNR+4(6).

MOVE '0000' TO HOLD_SAKNR(4).

ENDIF.

PERFORM NEW_DYNPRO USING 'SAPMF05A' '0100'.

PERFORM NEW_FIELD USING 'BKPF-BUDAT' TEM.

PERFORM NEW_FIELD USING 'BKPF-BLDAT' TEM1.

PERFORM NEW_FIELD USING 'BKPF-MONAT' P_MONAT.

PERFORM NEW_FIELD USING 'BKPF-WAERS' 'USD'.

PERFORM NEW_FIELD USING 'BKPF-BUKRS' P_BUKRS.

PERFORM NEW_FIELD USING 'BKPF-BKTXT' P_BKTXT.

PERFORM NEW_FIELD USING 'RF05A-NEWBS' T_BSCHL.

PERFORM NEW_FIELD USING 'RF05A-NEWKO' HOLD_SAKNR.

PERFORM NEW_FIELD USING 'BDC_OKCODE' '/11'.

PERFORM NEW_DYNPRO USING 'SAPMF05A' '0300'.

PERFORM NEW_FIELD USING 'BSEG-WRBTR' WRBTR.

PERFORM NEW_FIELD USING 'RF05A-NEWKO' ' '.

PERFORM NEW_FIELD USING 'RF05A-NEWBS' ' '.

  • PERFORM NEW_FIELD USING 'BDC_OKCODE' '/11'.

PERFORM NEW_DYNPRO USING 'SAPLKACB' '0002'.

PERFORM NEW_FIELD USING 'COBL-KOSTL' HOLD_KOSTL.

CALL TRANSACTION 'F-02' USING BDCDATA MODE 'A' UPDATE 'S'.