Showing results for 
Search instead for 
Did you mean: 

Updating Extractors Suggestion-- What do you think?

Former Member
0 Kudos

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.


data: wa like mc11va0itm.

loop at tab into wa.

  • logic to modify data

modify tab from wa.



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


tab = c_t_data


others = 1.


Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

A reasonable mechanism, but two remarks from me, though:

1. Be careful in case you want to share variables (besides that vars in the interface) via COMMON PART logic: By your function call you are introducing a new program group, which may lead to strange effects regarding common part variables.

2. One drawback of dynamically calling function modules is, that you can not use the "Where used"-functionality of the ABAP tools with them.

Both points are no huge problems, but one should keep them in mind.

Best regards,

Bernd Sieger

Former Member
0 Kudos

Hi Kenneth,

I am following the same procedure. But, the enhanced dataSource fields are not getting populated with data.

For calling the sub-routine from the exit, i am using PERFORM statement.

PERFORM Ffname in Pname tables I_T_DATA using I_DATASOURCE.

For form in program Pname,

FORM Fname tables I_T_DATA structure extractstr_name USING I_DATASOURCE.

Could someone help.


Message was edited by: Sachin Guptha

Former Member
0 Kudos


You need not call a form routine. Simply call a FM dynamically with the convention I noted. In the FM:

"loop at tab. do your thing. modify tab. endloop."

TAB should be defined as an internal table like the transfer structure. Make sense?


Active Contributor
0 Kudos

Hi Kennet,

does it really work? The idea is great according to me, because working in CMOD requires attention when developing different extractors enhancements ... in practice?

Best Regards


Former Member
0 Kudos


Indeed, it works quite well. I hope it works for you and others that read this.


Active Contributor
0 Kudos

Good Job Kenneth!


Former Member
0 Kudos

This trick can be very useful, Ken !!!

Thank you !

(post it as a little weblog !)

Former Member
0 Kudos


Thanks. Please assign points to the entry if you like it. What do you mean by "(post it as a little weblog !)"?????


likpco @ comcast . net

Former Member
0 Kudos


as explained in

only forum "answers" (or responses) are eligible for awards under the Contributor Recognition Program!

So it's true that the thread or "question" poster is responsible for awarding points but does not earn any for himself or herself.

What do you get out of it? You get answers, first and foremost. Furthermore, by taking the time to reward SDN members for their useful contributions, you foster the SDN community. It's a good-faith system that relies on you to reward points for helpful forum replies when you are the poster, and in turn you will be rewarded by others when they are doing the "asking."

About my suggestion (post it as a little weblog), take a look to