Application Development 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: 

provide endprovide

Former Member
0 Kudos

hi all,

i just need to modify the select query by using provide and endprovide.

please tell me how can i change this statement from select to provide and endprovide.

SELECT sobid

FROM hrp1001

INTO lwa_hrp1001-sobid

WHERE otype = c_person AND

objid = pernr-pernr AND

rsign = c_topdown AND

relat = c_holder.

APPEND lwa_hrp1001 TO li_hrp1001.

CLEAR lwa_hrp1001.

ENDSELECT.

where CONSTANTS : c_person TYPE hrp1001-otype VALUE 'P',

c_position TYPE hrp1001-otype VALUE 'S',

c_topdown TYPE hrp1001-rsign VALUE 'B',

c_bottomup TYPE hrp1001-rsign VALUE 'A'

4 REPLIES 4

Former Member
0 Kudos

Hi

Check links

http://help.sap.com/search/highlightContent.jsp

Syntax

PROVIDE <f1>... <fn> FROM <itab1>

<g1>... <gm> FROM <itab2>

... FROM <itabn>

... BETWEEN <f> AND <g>.

The contents of the specified fields of the internal tables <itab1> u2026 <itabn> are placed in their header lines. The processing block between PROVIDE and ENDPROVIDE is then executed for each interval.

Aditya

former_member181995
Active Contributor
0 Kudos

Narender,

i would suggest you to see SAP help by pressing F1 on provide endprovide you will get your answer.

Former Member
0 Kudos

PROVIDE ......ENDPROVIDE can only be used to process the data which is already available, it cannot be used as an replacement to SELECT....statement

Former Member
0 Kudos

Hi Narender,

I dont think v can use provide...endprovide for HRP tables.This is a sample code...Try this out..

TABLES: objec.

INFOTYPES: 1001.

GET objec.

IF objec-otype = 'S'.

CLEAR stabs.

LOOP AT p1001 WHERE begda LE pc-endda

AND endda GE pc-begda.

IF <condition>.

ur code......

ENDIF.

ENDLOOP.

For this use LDB PCH.

Regards

Mamtha