07-12-2015 8:37 AM
Hi,
Please help me,I can not find what is error is my code,I have always error message "Field catalog not found" .
report z01.
type-pools: slis .
tables:skat.
data:begin of wa_skat,
ktopl like skat-ktopl,
saknr like skat-saknr,
txt20 like skat-txt20,
end of wa_skat.
data:i_skat like standard table of wa_skat with header line.
data: fieldcat type slis_t_fieldcat_alv.
select-options:zacc for skat-saknr.
select * into corresponding fields of wa_skat
from skat
for all entries in zacc
where saknr = zacc-low.
append wa_skat to i_skat.
endselect.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = sy-repid
i_internal_tabname = 'I_SKAT'
* I_STRUCTURE_NAME = 'wa_SKAT'
i_inclname = sy-repid
i_bypassing_buffer = 'X'
changing
ct_fieldcat = fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = fieldcat
tables
t_outtab = i_skat.
07-12-2015 9:57 AM
Hi,
easy: you pass sy-repid (by reference) to the function module. As soon as REUSE_ALV_FIELDCATALOG_MERGE is processed, sy-repid changes value and your itab is not found.
use data lv_repid type sy-repid. lv_repid = sy-repid. and pass lv_repid to the function.
Regards Clemens
07-12-2015 1:11 PM
Dear Gacia,
Attached is the code in the Notepad.
Use it and it will work.
Attached is the file.
Regards
Shaik
07-12-2015 3:18 PM
Hi,
just change the name of i_internal_tabname
i_internal_tabname = 'WA_SKAT'
it should be worked,
Regards
Ibrahim
07-13-2015 5:25 AM
Hi,
just you have to correct in fm 'REUSE_ALV_FIELDCATALOG_MERGE'
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = sy-repid
i_internal_tabname = 'WA_SKAT' "'I_SKAT' << change internal table name
* I_STRUTURE_NAME = 'wa_SKAT'
i_inclname = sy-repid
i_bypassing_buffer = 'X'
changing
ct_fieldcat = fieldcat
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.