cancel
Showing results for 
Search instead for 
Did you mean: 

fields in an internal table

Former Member
0 Kudos

How to find number of fields in an internal table ?

my requirement is i have 20 internal tables and the data is being uploaded into an application server. so how to find no of fields in a particular internal table

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

concatenate all the fields and move them to final internal table , call the function module "GET_COMPONENT_LIST" and pass the work area of the final internal table in the parameter fieldname

***For getting no of FIELDS in an internal table ********

CALL FUNCTION 'GET_COMPONENT_LIST'

EXPORTING

PROGRAM = syrepid

FIELDNAME = 't_payr'

TABLES

COMPONENTS = fieldlist.

describe table fieldlist lines pyr_no_fields.

********end of getting no of fields**********

  • TRANSFER wa_mat_out_head TO P_FNAME.

LOOP AT GT_PAYR.

MOVE: GT_payr-LIFNR TO T_payr-lifnr,

GT_payr-ZBUKR TO T_payr-zbukr,

GT_payr-LAUFD TO T_payr-LAUFD,

GT_payr-CHECT TO T_payr-CHECT,

GT_payr-RWBTR TO T_payr-RWBTR.

Concatenate T_payr-lifnr t_payr-zbukr T_payr-laufd T_payr-chect

T_payr-rwbtr into wa_mat_out-rec SEPARATED by ',' .