Archived discussions are read-only. Learn more about SAP Q&A

PROVIDE - ENDPROVIDE in HR ABAP

Hi All,

I am trying to understand how the PROVIDE - ENDPROVIDE statement in HR ABAP works.

I have gone through many of the links discussion on this but is not very clear.

Can you please correct my understanding if it.

-


I was under impression that the provide statement in the below report ZTEST gets exectuted like the following LOOP ENDLOOP statement which is not correct. Can you please help me understand how it processes the provide statement and how different is the PROVIDE statement from the LOOP ENDLOOP statement.

loop at p0002 where begda <= pn-begda

and endda >= pn-endda.

WRITE: / p0002-pernr.

...

...

endloop.

-


REPORT ZTEST.

TABLES: pernr.

INFOTYPES: 0002. "Personal Data

SELECT-OPTIONS: language FOR p0002-sprsl.

**-- Selection screen

INITIALIZATION.

pnptimed = 'D'.

*-- Processing

START-OF-SELECTION.

GET pernr.

PROVIDE * FROM p0002 BETWEEN pn-begda AND

pn-endda.

CHECK language.

WRITE: / p0002-pernr,

sy-vline,

pernr-ename,

sy-vline,

p0002-sprsl,

sy-vline,

p0002-gbdat.

ENDPROVIDE.

-


Regards,

Sanjay.

Tags:
  • SAP Employee
Not what you were looking for? View more on this topic or Ask a question