Skip to Content
author's profile photo Former Member
Former Member

Generating a Generic DataSource using Function Modules

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2004 at 07:22 AM

    Hi JJ,

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

    'Help on Delta Strategy' in this forum.

    regards

    Siggi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2004 at 07:16 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2004 at 12:45 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2004 at 07:13 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.