cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Delta (pseudo) upload: Only Current and Previous Months data with CDS view S4HANA to SAC

DasamaneniMahendra
Discoverer
0 Kudos
301

Delta (pseudo) upload: Only Current and Previous Months data with CDS view S4HANA to SAC

As of now data import to SAC from S4HANA or ECC systems with delta upload is not supported, so its mandatory to upload whole Fiscal/Cal year data. Filtering on Fiscal/Cal period dynamically is also not possible in import jobs query filters. To handle following scenarios it would be good to reduce number of records during data import to SAC..

  • Number of records will increase period by period which would increase time and effort on data import process.
  • As of now import job rejected records are restricted to 2000 records only, if number of rejections are more than 2000 records not matching from public dimension master data then difficult to understand which entries are missing when the transaction is uploaded from source.

To overcome this scenario, I have developed a solution to upload from source only for Current and Previous periods so number of records imported will be reduced which helps to limit rejections also.

Upload for Current and/or Previous periods worked out from S4HANA system with CDS view using the System Date and Factory calendar.  Usually in organizations, Fiscal year and Periods with Start and End (closing) Dates are maintained in the system factory calendar as per the Calendar dates especially when companies are doing Financial Closing.

These Start and End (closing) dates with Fiscal Year and Periods are captured in the standard CDS views which reads data from Factory Closing Calendar. One of the CDS view is I_FiscalCalDatePrevFsclPeriod which captures Current/Previous periods and Year with Start and End dates.

As in below example, suppose in a company for the calendar date 12th March 2025, current Fiscal year and Periods are 2025 and 005, Previous Year and Periods are 2025, 004. 

DasamaneniMahendra_0-1744377802812.png

If the Fiscal year starts on November 1st week Monday i.e. on 3rd November 2025, then current Fiscal year and Periods are 2025 and 001, Previous Year and Periods are 2024, 012.

DasamaneniMahendra_1-1744377802817.png 

Considering above date, year and period entries, I have created following custom CDS view logic using the standard CDS view I_FiscalCalDatePrevFsclPeriod, which can be used to import data from S4HANA table ACDOCA to SAC for Current and Previous periods only. 

DasamaneniMahendra_2-1744377802820.png

DasamaneniMahendra_3-1744377802820.png

DasamaneniMahendra_4-1744377802822.png 

In the above code 2nd row, system date has been passed to the CDS view with inner Join (Association also can be used), so only one record for the current system date will be read as below.

DasamaneniMahendra_5-1744377802823.png 

Used Case command and created following  logic with conditions:

  • If the system date matches with Calendar Date from I_FiscalCalDatePrevFsclPeriod CDS view and then Fiscal Year and current Period matches from ACDOCA transaction data then curr_period field will be populated as Y (yes). 
  • Usually in some companies’ postings could be still going on after Fiscal period end date also but for these entries Posting date should be less than or equal to Fiscal Period End Date.      In this scenario still these entries also need to be captured for current Fiscal Period.               In the second condition If the system date matches with Calendar Date from I_FiscalCalDatePrevFsclPeriod CDS view and Current Fiscal Year and Previous Fiscal Period matches with ACDOCA transaction data Current Fiscal year and Current Fiscal Period then curr_period field will populated as Y (yes). 

The output for the above conditions will be populated as below, for period 4 and 5 curr_period has been populated as Y. 

DasamaneniMahendra_6-1744377802829.png

DasamaneniMahendra_7-1744377802831.png 

 

  • Same as in the 2nd point, if the postings are going on still for period 012 when new Fiscal year starts as per calendar date then still these postings also need to be captured.

In the third condition, If the system date matches with Calendar Date from I_FiscalCalDatePrevFsclPeriod CDS view and Previous Fiscal Year and Previous Fiscal Period matches with ACDOCA table transaction data Current Fiscal year and Current Fiscal Period then curr_period field will be populated as Y (yes).

 

  • Group by command is also useful to aggregate the number of records based on all fields in CDS view. 

CDS view once ready for SAC import then in import job query filter curr_period field needs to be restricted as Y then only 60 rows for period 4 and 5 have been extracted.

DasamaneniMahendra_21-1744378011557.png

Note: Incase all records need to be extracted for whole Fiscal Year 2025 then curr_period field needs to be removed from query filter then all records for whole Fiscal Year 2025 will be extracted as below. There is a clear difference for period 4 and 5 extraction with field restriction curr_period Y which extracted 60 records but whole 2025 Fiscal year 303 records.

 

DasamaneniMahendra_22-1744378081333.png

 

This solution is applicable as mentioned in the beginning if the factory calendar is maintained in source systems for the financial closings or any other closings.

Accepted Solutions (0)

Answers (0)