Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Function module problem....

Hello experts,

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'

EXPORTING

t001w_exp = gv_bukrs

IMPORTING

werks_imp = it_equz-iwerk

EXCEPTIONS

not_found_werks = 1.

r_iwerk-sign = 'I'.

r_iwerk-option = 'EQ'.

r_iwerk-low = gv_bukrs.

APPEND r_iwerk.

CLEAR r_iwerk.

ENDLOOP.

Tags:
replied

Hi Viraylab,

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.

Cheers

VJ

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question