Skip to Content
0
Former Member
May 03, 2005 at 02:47 PM

Updating Extractors Suggestion-- What do you think?

15 Views

A great idea for adding custom code to populate enhanced extractors via CMOD works like this. Get into the exit function and put the code below in. Any time you need to enhance a DataSource like 2LIS_11_VAITM, simply create a function module, ZBW1_2LIS_11_VAITM. This way, nobody needs to keep updating the CMOD function.

FUNCTION CODE SAMPLE:

data: wa like mc11va0itm.

loop at tab into wa.

  • logic to modify data

modify tab from wa.

endloop.

EXIT FUNCTION CODE SAMPLE

data : fm_name type rs38l_fnam.

data : fm_place_holder type rs38l_fnam.

clear fm_name.

concatenate 'ZBW1_' i_datasource into fm_name.

condense fm_name no-gaps.

Select single funcname

into fm_place_holder

from tfdir

where funcname = fm_name.

if sy-subrc is initial.

call function fm_name

tables

tab = c_t_data

exceptions

others = 1.

endif.