Wednesday, August 31, 2016

0ASSET_ATTR_TEXT

Tables
ANLA - Asset Master Record Segment
ANLZ - Time-Dependent Asset Allocations
ANLH - Main asset number

T-code
AS01 / 02 / 03

Delta entries Table
BWFIAA_AEDAT_AS
You can edit asset in AS02 and can see entries in this table for testing purposes.

Delta Timestamp Table
BWOM2_TIMEST

Delta Working
Delta for this datasource can be run only ONCE per day. Even if there are changes added to delta table and the delta is run, it still does not pick up any data. They will all come in the run the next day.

Below are couple of points to better understand the working of delta.

Extraction depends on settings in table BWOM_SETTINGS
BWFITIMBOR - Default value '020000' ( 2:00 AM )
If the extractor is runs at 1:20 AM on 8th August, since it is before 2:00 AM, system goes back one day to get the delta values.
So it gets data from 7th and 6th August.
If it runs at 2:30 AM, it fetches data from 7th August.

BWFIOVERLA =  ' '
Default is blank value. If it is 'X' (???)


BWFISAFETY = '1'
This is used when calculating timestamp ranges.

Internally, in FM BWFIT_GET_TIMESTAMPS , the timestamps are fetched.
Basic logic is as follows.

Get the Low and High Timestamps from BWOM2_TIMEST table.
For say last run was 08/06/2012 00:00:00 - 08/06/2012 23:59:59

If there is NO Overlap, +1 to the High Date ==> New Low Date ==> 08/07/2012 00:00:00
Sy-datum - 1 ( safety )  ==> New High Date ==> 08/08/2012 23:59:59

Interval : High Date - Low Date Should not be less than 1 ( No negitive ).
Here, 08/08/2012 - 08/07/2017 = 1 -- Fetches data from delta table BWFIAA_AEDAT_AS where aedat > LowDate
Else, < 1 : System immediately raises - No Data Present flag. No selection happens.

The above logic is also the reason why delta does not get any delta when run on the same day.
For say last run was 08/08/2012 00:00:00 - 08/08/2012 23:59:59

New Low Date = 08/08/2012 + 1 ==> 08/09/2012
new High Date = Sy-datum ( 08/09/2012 ) - 1 ==>  08/08/2012
Interval = -1 ==> No Data Present Flag


After successfull run of delta , low and high dates are dependent on the run dates, but the times are always 00:00:00 to 23:59:59.
When the delta runs, it fetches all the data present in the delta table > Date of the lower limit.

In BWOM2_TIMEST, you can see all the timestamps.
However, time stamps are present in seconds format [Seconds since 1.1.1990,0:00 GMT * 10000 ].
Run FM RKE_TIMESTAMP_CONVERT_OUTPUT to convert to date and hours format. you can use TZONE and DAYST from the table to run the FM.


No comments:

Post a Comment