Quantcast
Channel: SCN : Discussion List - SAP Business Warehouse
Viewing all articles
Browse latest Browse all 6437

SAP BW End Routine Help

$
0
0

Hello friends

 

I have a new requirement, but I am unable to resolve it with minimum time spent in a loop and/or the requirement per say.

 

We have a PSA source with the following fields

TagService No.    ERDAT
A12320150401
A34520150402
A56720150420

 

Now we move this in a DSO (key field: Service no.). The user wants another field namely RDR which should populate it according to the following logic:

If for the same tag the ERDAT is within 7 days of previous ERDAT, then RDR = 'yes', else RDR='no'. Also, the first occurrence must be RDR='blank'.


Hence, after end routine, the DSO should look like this:-

TagService No.     ERDAT           RDR
A12320150401
A34520150402   Yes
A56720150420       No

 

 

Now, the problem is that the source brings in 7 days of data. Hence, all the 7 day old records/line items come up every time DTP fetches the records.

 

Can you please let me know the logic atleast to handle this scenario. Ive tried several ways but it doesnt give the correct results or in the shortest period of time.


Viewing all articles
Browse latest Browse all 6437

Trending Articles