标签:included creat long sources rom because search ast business
ADMG-2.2.1.3 - BRAVO CoA Mapping - TB
Revision 7/11: If Bravo code is not numeric, need to find one level up in FAGL_011PC to find the 6 digits for bravo, look at blue colored text
Create GFS account mapped to Bravo using FAGL_011ZC, write to /tax/gfs_bravo_mapping
and go through /btb_latam/ska1 to check all 10 digit GL account can be mapped, if not, write to exception region /tax/master_data_exception
Use BTB_MDG.SKA1 (if BTB_MDG is not ingested, use BTB_LATAM.SKA1):
go to 5
bravoCode -- /btb_mdg/fagl_011qt : versn:JNJG AND spras:E AND ergsl:%bravoCode%, let it be E, E.txt45 is the bravoCode description
Validation:
6.1 If there is no match, write exceptionCode:INVALID_BRAVO_MAPPING, excepitonMessage: No Match on Bravo for GFS code % A.SAKNR%
all [B. VONKT , B. BISKT] should not have overlap, check all [B. VONKT , B. BISKT] do not overlap by sorting B. VONKT and B. BISKT and make sure B.VONKT(n+1) < B. BISKT (n), ), if there is invalid range, exceptionCode: INVALID_GFS_MAPPING, exceptionMessage overlapping range is found, [B(n). valfrom, B(n).valto] and [B(n+1). valfrom, B(n+1).valto],
6.2
Exception should be saved to /tax/master_data_exception
{
sourceSystem: btb_latam,
exceptionCode:
exceptionMessage:
timestamp
}
Example:
A.SAKNR = 111110000, it matches with B. VONK = 111110000, B. BISKT=111110999, because A.SAKNR>= B. VONK, and A.SAKNR<= B. BISKT, add <111110000, 111110> into memory map C.
If A. SAKNR = ABCD, then there is a NoMatch exception
If there are [B. VONK, B. BISKT] = [111110000, 111110999’] , [111110993, 11112000], then there is Overlap Range exception
Helper:
Algorithm can be: sort the column E (to), and use this post of search :
https://stackoverflow.com/questions/19198586/search-sorted-listlong-for-closest-and-less-than to find the E column and return column B
Business scenario:
There are many similar matching a range to a code, so if you can make it generic and not specific on the collection A and collection B, that will be better.
标签:included creat long sources rom because search ast business
原文地址:http://www.cnblogs.com/ji-xufeng/p/7422632.html