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

Regarding generic dat asource

Hi

I got a requirement form which i need to create a generic data source from ztable which i need to fetch the data for fields like sales org ,sales off and so on ..and now my question is i am having two fields that is document created date(aedat)and document changed date(erdat) from this two fields which i need to take for delta option and which flow i should go for now either for generic data source related table,view ,infoset query or function module can any one please throw some light on this.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2016 at 08:44 AM

    Hello,

    You should go for Generic data source based on Function Module.

    While writing the code in FM , fill the range table either with change date or created date.

    Now while selecting the records from Ztable do a selection on both changes date and created date.

    Something like below , With this part u can fill l_r_date_change with current date

    - l_r_date_change is range table

    LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'AEDAT'.

    MOVE-CORRESPONDING l_s_select TO l_r_date_change.

    ENDLOOP.

    Now use statement like below to fetch records..

    OPEN CURSOR WITH HOLD g_cursor FOR

    SELECT VBELV POSNV VBELN POSNN VBTYP_N RFMNG MEINS ERDAT AEDAT FROM VBFA

    WHERE ( ( ERDAT in l_r_date ) OR ( AEDAT in l_r_date_change ) ).

    This way it check both changed and created date in ztable and fetch the records accordingly.

    The date pointer will be set after you do init for first time.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 04, 2016 at 06:52 PM

    Hi Still

    If you are not an ABAPer, make both the Created date and the Changed Date as selections, and create two.infoPackeges

    1) Create date from (sy-datum -7) to sy-datum

    3) Change date from (sy-datum -7) to sy-datum


    Of course, the target will need to be a Standard DSO with overwrite mapping.


    Please don't forget to record your final solution and to mark the question as answered.

    Good luck,

    John Hawk

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Still,

      When creating a DataSource, you have a choice to make it based on a table, view, or function module.

      If the data you need is one table, use the table a a source.

      If the data is needed needed from multiple tables which can be connected be equal EQ types joins (like item to header) , create a custom table and use it a view type DataSource.

      If need all the data in simple manner, the table and view methods are very effective.

      Please don't forget to record your final solution and to mark the question as answered.

      Good luck,

      John Hawk

  • Posted on Aug 04, 2016 at 07:45 AM

    Hello,

    Please refer following recommend for setting safety interval:

    1. If delta field is Date (Record Create Date or change date), then use Upper Limit of 1 day. This will load Delta in BW as of

    yesterday. Leave Lower limit blank.

    2. If delta field is Time Stamp, then use Upper Limit of equal to 1800 Seconds (30 minutes). This will load Delta in BW as of 30

    minutes old. Leave Lower limit blank.

    3. If delta field is a Numeric Pointer . Leave upper limit blank, be sure this DataSources is only feeding an ODS Object.

    Regarding the flow if its just a single table with no more calculations ahead go for related table.

    Regards,

    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.