cancel
Showing results for 
Search instead for 
Did you mean: 

provide and endprovide

Former Member
0 Kudos
78

Hi,

can any one spot light on the significance of PROVIDE - ENDPROVIDE in LDB?

what situation i have to use provide ....... endprovide and loop and endloop ?

regards,

kumar

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi ,

Provide and endprovide is used when u have defined logical database in your program attribute.

se38->attribute

Generally it is used in HR module.

In HR there are many infotypes (for time bing consider infotype as a transparent table )

In program we define infotype by INFOTYPES statement

this creates internal table automatically

to get data from these infotype into internal table we use GET event .

at the execution of this event all data are fetched into int.table via logical database.

Now here is your answer !

if you want to process data inside infotype u can use Provide - End provide and also Loop Endloop.

But In provide -Endprovide differs from normal loop statement in these way.

1 : you can give start date and END date in Provide statement itself so no need of seperation of data within required dates.

2: you can join several Infotypes (internal table here) in one loop

E.G .provide * from p0001 p0001 ...

Endprovide.

3: you can Project one/several field in loop via Provide statement.

E.G your table contains 50 records

there is one field in table say ABC

out of 50 records value of ABC is changed only two times so

logically loop will execute only 2 times if u have projected the field in Provide statement.

E.G

Provide ABC from p0000 ...

ENdprovide.

4: there are many other advantages too - but i have counted the major one.

Thanx.

May this help u in understanding PROVIDE loop better.

McF
Advisor
Advisor
0 Kudos

Hi Kumar,

Provide is a special language element for HR specifics like Date handling.

First of all you should go to the really go F1 help for this statement.

Also note that the data sets must be sorted and the dates must not contain any gaps.

Regards,

Michael

suresh_datti
Active Contributor
0 Kudos

It is a matter of choice.. both loop..endloop AND provide..endprovide can be used in a Report tied to the PNP/PNPCE LDB. With Provide, you have the option of using JOIN similar to the SELECT statements. ie retrieve records from multiple infotypes in one statement.

~Suresh

Former Member
0 Kudos

Hope It is useful link for you http://www.planetsap.com/HR_ABAP_LDB.htm

Kiran.

Former Member
0 Kudos

Hi Pals,

U can use Provide ...Endprovide while u do programming using LDB's

if u r not using LDB's than u can use loop and endloop with select query.

Useful than Reward Points.

Regards,

Manian.