Flipkart.com

Thursday, October 23, 2008

PNP Macro RP_SET_DATA_INTERVAL

Like other PNP related macros, this macro is defined in DBPNPMAC.

Purpose: As you know, when GET PERNR occurs, each infotype internal table, for example: p0002, will get filled with ALL the records in the database. The number of records fetched is not automatically limited by 'Data selection period' or Person selection Period'.

This macro can be used before GET PERNR to limit the number of records fetched.

Example:
RP_SET_DATA_INTERVAL 'P0001' pn-begda pn-endda.
GET pernr.

When GET pernr occurs, P0001 will be filled with IT0001 records, which overlap atleast one day with data selection period. (pn-begda, pn-endda)

Using this macro can greatly enahance the performance of your program.

4 comments: