2007 Dec 05 8:20 PM
Hi ppl
I am building a field catalog for standard table 'API_VALI' , why am I not getting field catalog in xfield?
TYPE-POOLS: slis.
DATA: xfield TYPE slis_t_fieldcat_alv,
Code:
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'API_VALI'
CHANGING
ct_fieldcat = xfield
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
2007 Dec 05 8:23 PM
That is not an internal table.
I_STRUCTURE_NAME = 'API_VALI' instead of i_internal_table.
You will get it.
That is not an internal table.
I_STRUCTURE_NAME = 'API_VALI' instead of i_internal_table.
You will get it.
2007 Dec 05 8:23 PM
That is not an internal table.
I_STRUCTURE_NAME = 'API_VALI' instead of i_internal_table.
You will get it.
2007 Dec 05 8:30 PM
so how to declare this internal table which I can directly give it to FM?
thanks
2007 Dec 05 9:03 PM
As ABAP_TECHINCAL has written, for standard tables you don't have to send the parameter i_internal_tabname . Instead you have to send the table name in the parameter i_structure_name.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = 'API_VALI'
CHANGING
ct_fieldcat = xfield
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
See the sample program given in the link below. It shows, how to create Field Catalog for INTERNAL TABLES
http://www.erpgenie.com/abap/code/abap28.htm
Also check the link
2007 Dec 05 9:03 PM
Declare internal table as
Data I_API_VALI like API_VALI occurs 0 with header line.
Thanks,
Naveen
2007 Dec 05 9:19 PM
2007 Dec 05 9:03 PM
data: itab_api_vali type standard table of api_vali.
you can now pass itab_api_vali to i_internal_table.
reward if helpful
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |