Application Development 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: 

regarding field name

Former Member
0 Kudos

Hi,

I need to find the field name of internal table programmtically. Is it possible to find the field name of internal. I need to write the internal table on application server along with header information.

Regards

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi ,

BUKU_GET_FIELD_NAMES function module will help you.

Thanks

3 REPLIES 3

Former Member
0 Kudos

hi ,

BUKU_GET_FIELD_NAMES function module will help you.

Thanks

umashankar_sahu
Active Participant
0 Kudos

Hi Aamir

If you want to write internal table in application server then use loop at internal table and inside use open dataset , Transfer and finally close dataset . in this way you can write your header as well as detail list in application server in a specified path.

Hope this will help You !!

MarcinPciak
Active Contributor
0 Kudos

type-pools abap.

data: wa_itab like line ot itab. "work area for your table
data: r_struct type ref to cl_abap_structdescr.
data: it_components type abap_component_tab.

read itab into wa_itab index 1. "read any line first

r_struct ?= cl_abap_typedescr=>describe_by_data( wa_itab ). "describe this line
it_components = r_struct->get_components( ).  "here you have all  field names 

Regards

Marcin