Enabling delta against the clearing doc for 2lis_13_vditm
We have enhanced our 2LIS_13_VDITM datasource to get the cleared & uncleared items against the exports. For this we take export billing documents from VBRP table based on the billing type & pass it into mkpf table where we get the BELNR against the said billing document & again pass this BELNR into the BSEG table & look for the field AUGBL. If this field is populated, then its deemed that the item is cleared. This way we get the cleared export items.
Now our BW report runs based on the billing date, and so for any given date it should show the cleared export sales. And this works fine for the scenario where the billing date & clearing date is same. But it will go wrong when the billing date in now & clearing date is at a later day. Because in BW we are pulling the data based on the billing date. Now say doc xxx is generated today so the billing date for that doc is 12.01.2015 & lets say its not cleared today. So in todays load its pulled into BW as uncleared. Later after 5 days it will eventually be cleared. Now this clearing data will get missed out in BW & hence after 5 days also if we see the cleared items in BW it wont be appearing under it and alter at end of the month when the report is run & checked for Month to date values this doc will not appear under cleared items.
So how will I have to design this so as to enable the delta when there is a clearing document against the billing document? So when a clearing happens against a billing document a delta has to be triggered.
or is there any other way of designing this whole thing.