Hi,
" Getting No of key fields using FM
DESCRIBE TABLE it_key LINES lv_cnt.
DO lv_cnt times.
READ TABLE it_key into wa_key index sy-index.
" Getting Table name
ASSIGN COMPONENT 'TABNAME' OF STRUCTURE wa_key to <tablename>.
" Getting Fieldname
ASSIGN COMPONENT 'FIELDNAME' OF STRUCTURE wa_key to <val2>.
IF <val2> IS ASSIGNED.
" Excel content Internal Table
LOOP AT <ft_data> ASSIGNING <fs_data>.
" matching field name with excel field name
ASSIGN COMPONENT <val2> OF STRUCTURE <fs_data> to <val1>.
" getting excel value for the field name.
if <val1> IS ASSIGNED.
" Logic to append table name fieldname and field value.
endif.
ENDLOOP.
ENDIF.
ENDDO.
Hope it helpful.
Regards,
VenkatRamesh.V