设中国护士网为首页 | 中国护士网专注于知识的分享,因为专注,所以更好!
分享到:

HR中PROVIDE 与ENDPROVIDE的用法

来源:SAP HR资源网  作者:小彭

一般provide和end provide用于处理时间限制是1和2的infotype.会一笔一笔的循环该infotype.
provide endprovide 会将符合条件的记录进行分段,因此会改变pnnnn-begda 或 pnnnn-endda 的值,使用时要注意。
例如infotype里面有一笔数据是20080101到20080201,另外一笔数据是20080301到20080401
那么我们对20080115到20080315做proviede的时候,会有两次循环,这两次循环到工作区的数据除了日期字段外所有字段都和数据库中 infotype的数据一样,而日期字段会被赋值成20080115-20080201以及20080301-20080315.

Infotypes with the time constraint 1 or 2 may be processed with a PROVIDE-ENDPROVIDE loop.
All infotype records whose validity period overlaps the period selected in the selection screen (PN-BEGDA and PN-ENDDA) by at least one day (BETWEEN-AND) are placed one after the other in the header of the respective infotype table Pnnnn.
 Note: If you have entered period dates in the selection screen, the contents of the fields Pnnnn-BEGDA and Pnnnn-ENDDA are also reset in the header of the infotype table Pnnnn. For example, if the date in Pnnnn-ENDDA is after the date in PN-ENDDA, Pnnnn-ENDDA is given the value from PN-ENDDA.