cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a Generic DataSource using Function Modules

Former Member
0 Kudos

I am attempting to create a generic DataSource using a function module. All of our DataSources are business content or custom generated that involve views. At least in our company this is true. Is there any resources available to me with examples on how to do this. I have looked at SAP's 'simple example' and would need a ABAP/BW Guru to figure it out! Any help would be greatfull. Thanx. JJ

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi JJ,

I discussed this one with Anoop C M. Check out the issue

'Help on Delta Strategy' in this forum.

regards

Siggi

Former Member
0 Kudos

Siegfried,

Thanx for your reply and as you can see I will take this information and give it a try. Thanx again. JJ

Answers (3)

Answers (3)

Former Member
0 Kudos

You're right, you may need an ABAP 'Guru' to create a function module data source that is able to do more than a view can give you. But the simple sample shows you most of the things you need to know. I'd suggest to ask an experienced programmer to explain the coding and you should get an understanding of the function module.

Best regards

Dirk

Former Member
0 Kudos

Dirk,

Thanx for your reply and I will get together with a ABAP 'GUGU' today. Thanx again. JJ

Former Member
0 Kudos

Hi Jerry,

The simple example should provide you with the necessary requisite. All what you need to do is to

create your own extract structure and assign that as type for the table parameter e_t_data.

Now you will get the selection criteria, as well as the fields selected in the datasource from the 2 incoming tables. You need to write the necessary abap code to execute a query and populate your extract struture.

Once important peculiarity of this function module is that it is called several times, or as many times as the MAX parameter + 1. ie, once for each row fetched. Hence you will find a persistence method of using a CURSOR with HOLD property to retain the data between the function calls.

The help in generic datasource explains the 3 modes,

initialize, first call and the repeat call for the

function module. The simple function module example actually provides the necessary logic to deal with these modes and the example uses the sflight table.

Hope that is some information that could help u begin with.

Anoop C M

Former Member
0 Kudos

Hi JJ,

The following is a discussion on generic datasource using function modules I had with Siggi, some days ago which he has mentioned above,

it contains a code snippet that siggi has posted.

regs

Anoop C M

Former Member
0 Kudos

Anoop,

Thanx for your reply and I have gone to the link you supplied. I will take all this into my endever to create the fm. Thanx again for your help. JJ

Former Member
0 Kudos

Hi JJ,

I discussed the same issue with another guy in this forum and gave him an example for the fm. I will search for that post and let you know.

regards

Siggi