cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add system date field to Generic DataSource?

Former Member
0 Kudos

Hi all,

We want to add a field to a Generic DataSource containing the system date (so that we can use this field in the transformation(s) on the BW side)?

My Generic DataSource is based on database view, I have tried adding SYST-DATUM to the view, but then I get an error that the SYST table is "not transparant" and so the view cannot be activated.

Can anybody help me out here?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jeppe,

By just adding a date field to the generic data source will not have the system date automatically filled up during data extraction and transfer to BI.

You still need some coding to populate the system date to this field. As you need the system date in the BI transformation rules, you need not add this field to the generic data source and the necessary coding (in the source system). Unless you anticipate that there will be day(s) difference between the point of data extraction and data loading, and you want to get hold of the system date at the point of data extraction.

How do you want to use the system date in your transformation?

Former Member
0 Kudos

Hi TP,

In the transformation I need the date when the data was loaded by the DataSource, so I cannot just use the system date in the transformation, because if I re-process the old requests from my DataSource at a later time, then I will get the current date instead of the date when the data was loaded by the DataSource.

Can you tell me what coding I need to do to populate a date field like this in the DataSource (or in the database view that my DataSource is based on)?

Former Member
0 Kudos

Hi,

Since the data source is already based on view you can enhance the extract structure with the date field and then you can write a code in CMOD to populate this through Sy-datum.

its in the same way as it is done with enhancement of other BW data sources.

Never enhanced a view so not sure it will work or not.

Give it a try.

Thanks

Ajeet

Former Member
0 Kudos

>

> Hi,

>

> Since the data source is already based on view you can enhance the extract structure with the date field and then you can write a code in CMOD to populate this through Sy-datum.

> its in the same way as it is done with enhancement of other BW data sources.

>

> Never enhanced a view so not sure it will work or not.

> Give it a try.

>

>

> Thanks

> Ajeet

Have not used CMOD's before ... (and done very few ABAP coding for that matter), maybe this is a nice one to start with, I will be back with the results.

Thanks

Jeppe

Former Member
0 Kudos

Have it working, surprisingly straight-forward, thanks for your help (have awarded points).

Answers (1)

Answers (1)

former_member205352
Active Contributor
0 Kudos

Just add your date infoobject to your datatarget (cube or DSO).

In the transformation go to field level routine and write code.

RESULT = SY-DATUM.

for your date infoobject.

You neednot bring sy-datum from your datasource.

Hope this helps.