Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Provide statement.

Former Member
0 Likes
856

When we use the following statement.......

PROVIDE * FROM p0015 BETWEEN pybegda AND pyendda.

here pybegda = 01.01.2008 and

pyendda = 30.10.2008.

does this provide statement take those records too where endda is 31.12.9999.

5 REPLIES 5
Read only

Former Member
0 Likes
813

Hi,

No think your statement will not include the date 31.12.9999....Becoz that date is beyond the condition.....

Actually in PROVIDE key word...... WHERE log_exp effects...

You can use the WHERE addition to specify a condition for every table itab1 itab2 ... involved. After WHERE, you can specify any logical expression log_exp1 log_exp2 ... ; the first operand of every comparison must be a component of the internal table. As such, all logical expressions except for IS ASSIGNED, IS REQUESTED, and IS SUPPLIED are possible. You can only specify components that are in the list after FIELDS. Here, it is not possible to specify a component using character-type data objects in brackets. The table entries for which the condition is not met are ignored by the PROVIDE loop. You can leave the PROVIDE loop following the instructions in the section Leaving loops.

Regards,

Arunima

Read only

Former Member
0 Likes
813

hi,

Provide statement is generally used in HR ABAP.

To read infotype data, provide statement is used.

eg...Provide * from p9012 between pnpbegda and pnpendda.

It means that

Retrive data of infotype '9012'

into internal table p9012

and retrive only those records

which fall between these two dates (pnpbegda, pnpendda)

Instead of using raw sql statements ,

SAP recommends using provide

and also the FM - HR_READ_INFOTYPE.

Hope it helps.

Regards,

Lokesh

Read only

Former Member
0 Likes
813

Hi,

I dont think so it will include.

Provide statement defines a loop through a statement block. In this loop, any number of internal tables itab1 itab2 ... are processed together

Thanks & Regards

Read only

KK07
Contributor
0 Likes
813

Hi,

i don't think that it will include the records of 31.12.9999.

but instead of py-endda if u use pn-endda then it will include because the value of pn-endda is 31.12.9999

and pn-begda is 01.01.1800

thanks,

Read only

Former Member
0 Likes
813

>

> When we use the following statement.......

>

> PROVIDE * FROM p0015 BETWEEN pybegda AND pyendda.

>

> here pybegda = 01.01.2008 and

> pyendda = 30.10.2008.

>

>

> does this provide statement take those records too where endda is 31.12.9999.

It depends on whether the record with endda = 31.12.9999 is valid in the date range(pybegda and pyendda), i.e.,

if the start and enddates are 01.01.2008(or less than 30.10.2008) and 31.12.9999 then the PROVIDE statement will procees that record, however if the start date of the PA0015 record is greater than 30.10.2008 then the PROVIDE statement will not process that record.