Skip to Content
0
Feb 20 at 09:42 AM

Loading data with overlapping time intervals using generic datasource

264 Views

Dear gurus,

I've an issue/question with loading time-dependent master data from HCM-Infotype to ZEMPLOYEE via generic datasource based directly on Infotype table.

HCM Infotype-Data

PERNR; VALID_TO; VALID_FROM; SUBTYPE; VALUE
88888888; 99991231; 20140502; 9001; ABC
88888888; 99991231; 20230101; 9002; 123

Requirement:

  • When Subtype 9001, I need VALUE (= ABC) in Attribute X in InfoObject ZEMPLOYEE
  • When Subtype 9002, I need VALUE (= 123) in Attribute Y in InfoObject ZEMPLOYEE

Problem/Issue

As InfoObject only has PERNR and VALID_TO as keys, VALID_FROM information is lost when loading to InfoObject. Therefore time intervals overlap (both records with VALID_TO: 99991231) and are not created/inserted correctly with DTP-setting "handling duplicate data records".

Expected result

MasterData Table of ZEMPLOYEE should look like this after load:

/BIC/ZEMPLOYEE; DATETO; DATEFROM; /BIC/ZATTRBT_X; /BIC/ZATTRBT_Y

88888888; 01.05.2014; 01.01.1000; ;

88888888; 31.12.2022; 02.05.2014; ABC;

88888888; 31.12.9999; 01.01.2023; ABC; 123

Any ideas or best practise for this scenario?

Thanks!