cancel
Showing results for 
Search instead for 
Did you mean: 

CDS View second extraction has null values in coloums

andreasben
Discoverer
0 Kudos

Dear all,

I'm trying to extract data from S/4 ABAP CDS View based on a Timestamp. In the source the TimeDate value is stored as a char 14, which is not beeing accepted as delta.byElement. Field for the delta pointer. So I converted it from CHAR to DATS and TIMS and then to tstmp. However I have with this approach two issues.

1. The typecast gives me a timestamp two hour before real value. E.g. Last change of a record was on 13.10.2022 18:07:02 the values shows 16:07:02. How can I adjust it? below the cast:

cast ( dats_tims_to_tstmp(cast(left(lastchanged, 😎 as abap.dats), cast(substring(lastchanged, 9, 6) as abap.tims), abap_system_timezone( $session.client, 'NULL' ), $session.client, 'NULL') as rvlsttstmp) as lastChangedAt,

2. When I import the data into BW4 as ABAP CDS Data Source, the first load runs fine with valid records. When I execute a second time the DTP shortly afterwards I receive incorrect data. I would expect to receive a zero record package, as in the meanwhile no records have been updated in source system. Howver I receive a bounch of records. I see that the LastChangedAt Field of this records is 00.00.00 00:00:00 (see screenshot) even though in first load everything was correct filled with valid dates and not data has changed in source system.

The IO from picture are all NUMC 14 referencing 0TCTTIMSTMP (conversion routine TIMES). The IO "Gültig ab" seems not to be affected.

Any ideas which would help me on question 1 or 2 are appreciated!

Many thanks,

Andreas

andreasben
Discoverer
0 Kudos

Hi all,

In the meanwhile I could solve point 2. from my question. Even though I'm not 100% sure about the cause of the issues I want to share the steps.

1. Deleting all tables of target aDSO

2. Cleaning the Delta Queue in Source system with TA: ODPQ

3. Deleting and recreating the ABAP CDS View and the Data Source, Transformation and DTP

4. One record within the CDS view didn't had a Timestamp, but instead Null. I was filtering it out in DTP

Without the faulty record and a tidy ODP Ques the issue doesn't occur anymore.

However I still have issue 1. from post, the time gap of 2 hours because of my type cast. Anyone able to help me how I can adjust the time zone in the type cast to reflect the CET time in the data?

Accepted Solutions (0)

Answers (0)