Function module problem....
I am having a problem with my function module below. What I want to do is to convert the werks found in my itab to their respective bukrs and put it in a range so I may later use them in my select statement. My code below does not run I dont know why. Help would be greatly appreciated. Thanks a lot and have a nice day!
LOOP AT it_equz.
CALL FUNCTION 'CF_TA_T001W_READ'
t001w_exp = gv_bukrs
werks_imp = it_equz-iwerk
not_found_werks = 1.
r_iwerk-sign = 'I'.
r_iwerk-option = 'EQ'.
r_iwerk-low = gv_bukrs.
You can select distinct fields from the database directly. I would prefer using delete adjacent duplicates after sorting the table. This makes it even faster.
Again it depends on which table you are using to select data from.