Skip to Content
Former Member
Mar 01, 2007 at 07:57 PM

Field name retrieval from field symbols after assigning to field in a struc


We have an internal table of about 100 columns. First 7 of them have key values and other fields are data fields. Out of remaining 93 fields, any 2 to 3 fields have data stored in it in each record. Using field symbols in a loop (93 fixed iterations), we are identifying which fields has a data in it. Once we identify the field, how do we retrieve the name of the field / column of the table. We are performing further processing based on name of the field.

Any ideas how to get the name of the column assigned to field symbols?

sample raw code piece is as below:

clear n.

Do 93 times.

n = n + 1.

assign component n of structure itab to <fs>.

if not <fs> is initial.

  • Get name of the field in cfname.

perform process_record using cfname.