09-15-2008 8:51 AM
Hi,
I have got a task to write my BDC program such tht my end user will update the excel sheet using BDC program Txcode as and when he gets his data in his local machine EXCEL sheet.
For this the logic that i have used is i have selected my maximum value from my table and that i have holded i a local variable and that local variable i have assigned in my begin of row. But it is taking me to RUN time error.
My code...
data: SL TYPE I,
S TYPE I.
SL = 0.
S = 0.
SELECT MAX( FASLN ) INTO S FROM ZRPFORMA1.
SL = S + 1 .
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = P_FNAME
i_begin_col = 1
i_begin_row = SL
i_end_col = 44
i_end_row = 5
TABLES
intern = IT_FILE_UPLOAD
.
where u can see i have assigned SL in the begin of my row, i want to know whether this is correct or wrong.
Thks
09-15-2008 8:57 AM
Hey here i found some error in ur code.
SELECT MAX( FASLN ) INTO S FROM ZRPFORMA1.
SL = S + 1 .
Suppose this returns 15 into SL.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = P_FNAME
i_begin_col = 1
i_begin_row = SL -- here 15 is begin row
i_end_col = 44
i_end_row = 5 -- end row is 5 which is less than 15 -- ERROR
TABLES
intern = IT_FILE_UPLOAD
if your intention is to read next 5 rows from 15th row thn make i_end_row = SL + 5.
or give whtever you need
09-15-2008 8:57 AM
Hey here i found some error in ur code.
SELECT MAX( FASLN ) INTO S FROM ZRPFORMA1.
SL = S + 1 .
Suppose this returns 15 into SL.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = P_FNAME
i_begin_col = 1
i_begin_row = SL -- here 15 is begin row
i_end_col = 44
i_end_row = 5 -- end row is 5 which is less than 15 -- ERROR
TABLES
intern = IT_FILE_UPLOAD
if your intention is to read next 5 rows from 15th row thn make i_end_row = SL + 5.
or give whtever you need
09-15-2008 9:35 AM
Hello i have correct my mistake but still it is taking me dump error.
Thks
09-15-2008 9:49 AM
09-18-2008 12:07 PM
Hi today i have been working for another client i can post you my error tomorrow.
But the error i remember is like at the begin of my column i have give my local variable name which is holding my row number in my excel sheet.
Actually i_begin_row is of type I in the function model.
But the Primary key value in my table is of NUMC there it is trrowing error you cannot use with TYPE difference. I have tried to change my data type of my promary key to INT2 but still it is not working.
Have got my error.
Thks
09-23-2008 2:12 PM
09-23-2008 5:47 PM