Skip to Content
0
Former Member
Nov 26, 2008 at 11:20 AM

DUMP : Unable to interpret "BILF " as a number.

46 Views

Hi,

When i m executing my report with any input parameter, it's working fine but when i m executing it without any parameter, gives a dump "Unable to interpret "BILF " as a number."..

i think it's error occurs on :

itab-kunnr = itab-kunnr * 1.

MODIFY itab.

**************************

plz check my code:

***************

TABLES : tvkbt, knvv, kna1, j_1imocust, tvtwt, t005u.

TYPE-POOLS : slis.

DATA : BEGIN OF itab OCCURS 0,

vkbur LIKE tvkbt-vkbur, " Sales Office

bezei LIKE tvkbt-bezei, " Branch

vtweg LIKE knvv-vtweg, " Distribution Channel

kunnr LIKE kna1-kunnr, " Customer Number

name1 LIKE kna1-name1, " Name

name2 LIKE kna1-name2,

ktokd LIKE kna1-ktokd, " Customer Account Group

erdat LIKE kna1-erdat, " Date on which the Record Was Created

stras LIKE kna1-stras, " House number and street

ort02 LIKE kna1-ort02, " District

ort01 LIKE kna1-ort01, " City

pstlz LIKE kna1-pstlz, " Postal Code

knurl LIKE kna1-knurl, " URL

regio LIKE kna1-regio,

bezei1 LIKE t005u-bezei,

vtext LIKE tvtwt-vtext, " NAME

j_1iexcd LIKE j_1imocust-j_1iexcd, " ECC Number

j_1icstno LIKE j_1imocust-j_1icstno, " CST Number

j_1ilstno LIKE j_1imocust-j_1ilstno, " LST Number

j_1ipanno LIKE j_1imocust-j_1ipanno, " Permanent Account Number

j_1iexrn LIKE j_1imocust-j_1iexrn, " Excise Registration Number

j_1iexrg LIKE j_1imocust-j_1iexrg, " Excise Range

j_1iexdi LIKE j_1imocust-j_1iexdi, " Excise Division

j_1iexco LIKE j_1imocust-j_1iexco, " Excise Commissionerate

END OF itab.

DATA g_user_command TYPE slis_formname VALUE 'USER_COMMAND'.

************************************************************************

DATA : w_container TYPE scrfname VALUE 'CL_GRID',

w_cprog TYPE lvc_s_layo,

g_repid LIKE sy-repid,

w_save TYPE c,

w_exit TYPE c,

cl_grid TYPE REF TO cl_gui_alv_grid,

cl_custom_container TYPE REF TO cl_gui_custom_container,

it_fld_catalog TYPE slis_t_fieldcat_alv,

wa_fld_catalog TYPE slis_t_fieldcat_alv WITH HEADER LINE ,

layout TYPE slis_layout_alv,

col_pos LIKE sy-cucol ,

alvfc TYPE slis_t_fieldcat_alv.

************************************************************************

SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : vkbur FOR tvkbt-vkbur.

SELECT-OPTIONS : ktokd FOR kna1-ktokd.

SELECT-OPTIONS : vtweg FOR knvv-vtweg.

SELECT-OPTIONS : kunnr FOR kna1-kunnr.

SELECTION-SCREEN : END OF BLOCK b1.

************************************************************************

PERFORM fill_catalog1 USING:

'BEZEI' 'ITAB' 'BRANCH' ,

'KUNNR' 'ITAB' 'CUSTOMER CODE' ,

'NAME1' 'ITAB' 'CUSTOMER NAME',

'NAME2' 'ITAB' 'NAME2',

'VTWEG' 'ITAB' 'DISTT. CHANNEL',

'STRAS' 'ITAB' 'HOUSE NO. & STREET',

'ORT02' 'ITAB' 'DISTRICT',

'ORT01' 'ITAB' 'CITY',

'PSTLZ' 'ITAB' 'POSTAL CODE' ,

'BEZEI1' 'ITAB' 'REGION',

'J_1IEXCD' 'ITAB' 'ECC NUMBER',

'J_1IEXRN' 'ITAB' 'E/R NO.',

'J_1IEXRG' 'ITAB' 'Ex. RANGE',

'J_1IEXDI' 'ITAB' 'Ex. DIVISION',

'J_1IEXCO' 'ITAB' 'Ex. Commissionerate' ,

'J_1ICSTNO' 'ITAB' 'CST NUMBER' ,

'J_1ILSTNO' 'ITAB' 'LST NUMBER' ,

'J_1IPANNO' 'ITAB' 'PAN NO.' ,

'KTOKD' 'ITAB' 'ACC. GROUP',

'ERDAT' 'ITAB' 'CREATED ON',

'KNURL' 'ITAB' 'E-MAIL ID',

'VTEXT' 'ITAB' 'NAME' .

*********************************************

SELECT DISTINCT a~kunnr a~name1 a~name2 a~ktokd a~erdat a~stras a~ort02 a~ort01 a~pstlz a~knurl a~regio b~vtweg

c~j_1iexcd c~j_1iexrn c~j_1iexrg c~j_1iexdi c~j_1iexco c~j_1icstno c~j_1ilstno c~j_1ipanno d~vkbur d~bezei

INTO CORRESPONDING FIELDS OF TABLE itab

FROM kna1 AS a

INNER JOIN knvv AS b ON a~kunnr = b~kunnr

INNER JOIN j_1imocust AS c ON a~kunnr = c~kunnr

INNER JOIN tvkbt AS d ON b~vkbur = d~vkbur

WHERE a~kunnr IN kunnr

AND a~ktokd IN ktokd

AND b~vtweg IN vtweg

AND d~vkbur IN vkbur.

IF sy-subrc <> 0.

MESSAGE 'DATA NOT FOUND.' TYPE 'I'(001).

ENDIF.

SORT itab BY kunnr.

LOOP AT itab.

SELECT bezei FROM t005u INTO itab-bezei1 WHERE bland = itab-regio AND spras EQ 'EN' AND land1 EQ 'IN'.

MODIFY itab INDEX sy-tabix TRANSPORTING bezei1.

ENDSELECT.

itab-kunnr = itab-kunnr * 1.

MODIFY itab.

ENDLOOP.

ENDIF.

************************************************************************

layout-zebra = 'X' .

layout-colwidth_optimize(1) = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = 'ZCUST_MASTER'

i_callback_user_command = g_user_command

is_layout = layout

it_fieldcat = it_fld_catalog

i_default = 'X'

i_save = 'A'

TABLES

t_outtab = itab

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

&----


*& Form FILL_CATALOG1

&----


  • text

----


  • -->P_FIELDNAME text

  • -->P_REF_TABLE text

  • -->P_SCRTEXT text

----


FORM fill_catalog1 USING p_fieldname TYPE any

p_ref_table TYPE any

p_scrtext TYPE any.

CLEAR : wa_fld_catalog.

wa_fld_catalog-fieldname = p_fieldname.

wa_fld_catalog-tabname = p_ref_table.

wa_fld_catalog-seltext_s = p_scrtext.

wa_fld_catalog-seltext_m = p_scrtext.

wa_fld_catalog-seltext_l = p_scrtext.

wa_fld_catalog-outputlen = 15.

APPEND wa_fld_catalog TO it_fld_catalog.

ENDFORM. " fill_catalog1

*----


  • FORM user_command

*----


  • ........

*----


  • --> r_ucomm

  • --> rs_selfield

*----


FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

DATA: l_ta(4) TYPE c VALUE 'XD03'.

CASE r_ucomm.

WHEN '&IC1'. "dobbleclick

READ TABLE itab INTO itab INDEX rs_selfield-tabindex.

CHECK sy-subrc = 0.

IF rs_selfield-fieldname = 'KUNNR'.

SET PARAMETER ID 'KUN' FIELD itab-kunnr.

CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN. "# EC*

ENDIF.

CLEAR r_ucomm.

ENDCASE.

ENDFORM. "user_command

***************

Thanks