hello,
i m trieng to upload the data in ODS. for which i want an additional field in my ODS(<b>sales doc type which is mapped with AUART of table VBAK</b>).To populate my ODS i m enhancing my function module. i m attetching the code.
case i_datasource.
types:begin of lst_vbfa,
lst_vbelv type vbfa-vbelv,
end of lst_vbfa.
data: l_wa_mc type mc12vc0hdr,
l_tabix type sy-tabix,
l_wa_vbfa type lst_vbfa.
when '2LIS_12_VCHDR'.
*find corresponding master data record
loop at c_t_data into l_wa_mc.
l_tabix = sy-tabix.
select vbelv from vbfa into l_wa_vbfa where vbeln = l_wa_mc-vbeln
and vbtyp_v ='c'.
select single * from vbak where vbeln eq l_wa_vbfa-lst_vbelv.
*fill additional fields with master data
if sy-subrc = 0.
l_wa_mc-zzauart = vbak-auart.
modify c_t_data from l_wa_mc index l_tabix.
endif.
endselect.
endloop.
this code is not working properly(i m not getting values of auart)
what is error in it.
if it is possible then plz sand me some example code