[S4HANA -> HCI-DS -> IBP] KF_OpenOrder and Time Profile Dependencies

May 29, 2017 at 05:43 PM


avatar image
Former Member

Hi Experts,

I'm doing a template scenario OpenOrders from S4HANA to IBP. Basically I'm using a template to execute the key figure. One of the Join_Query mapping for KeyFigure date do have a mapping:

to_date((substr(to_char("2LIS_11_VAHDR".VDATU, 'yyyymmdd'), 1, 6) || '01'), 'yyyymmdd')

So I have these data from "2LIS_11_VAHDR".VDATU mapped to a target custom column VDATU then aggregated on the map. Time profile used in execution properties is -1

The result I have (with filters on other columns) is monthly with a date implied as '01', which is fine here. What I will try to populate in the output is weekly. basically results to day which monday on that week. Would the time profile also affect the final output to the STAGING table in IBP (target table for KF)

So for example from source with dates Nov 23 2016 to Nov 25 will result Nov 21 2016 on Query_Join. Would that be possible given on the predefined functional arguments and modifying the template mapping of VDATU?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member
Jun 06, 2017 at 08:57 AM

Hi R-Jay,

You can do this in HCI-DS using the day_in_week() function. Docu link: https://help.sap.com/viewer/dab65b1584e04026a132a06a711e3f5a/latest/en-US/576183036d6d1014b3fc9283b0e91070.html

This function will return 1 for Monday and 7 for Sunday. So if you construct a formula like:

(2LIS_11_VAHDR.VDATU - ( day_in_week( 2LIS_11_VAHDR.VDATU ) -1 ) )

This will substract 0, 1, 2, ... days depending of the day is Mon, Tue, Wed, ... etc. So effectively it will convert all your dates to the Monday of that week, so that you can aggregate on this Monday.

If you don't need the date itself, but the weeknumber, you could also consider the function week_in_year() : https://help.sap.com/viewer/dab65b1584e04026a132a06a711e3f5a/latest/en-US/576083ad6d6d1014b3fc9283b0e91070.html



10 |10000 characters needed characters left characters exceeded
Skip to Content