Application Development and Automation 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: 
Read only

Field catalog issue

former_member156446
Active Contributor
0 Likes
920

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.

1 ACCEPTED SOLUTION
Read only

former_member191735
Active Contributor
0 Likes
902

That is not an internal table.

I_STRUCTURE_NAME = 'API_VALI' instead of i_internal_table.

You will get it.

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.

6 REPLIES 6
Read only

former_member191735
Active Contributor
0 Likes
903

That is not an internal table.

I_STRUCTURE_NAME = 'API_VALI' instead of i_internal_table.

You will get it.

Read only

0 Likes
902

so how to declare this internal table which I can directly give it to FM?

thanks

Read only

0 Likes
902

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

Read only

0 Likes
902

Declare internal table as

Data I_API_VALI like API_VALI occurs 0 with header line.

Thanks,

Naveen

Read only

0 Likes
902

hi thanks Abhi solved the problem.. thanks point added to all

Read only

former_member191735
Active Contributor
0 Likes
902

data: itab_api_vali type standard table of api_vali.

you can now pass itab_api_vali to i_internal_table.

reward if helpful