2008 Aug 05 11:58 AM
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'
2008 Aug 05 12:14 PM
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
2008 Aug 05 12:16 PM
Narender,
i would suggest you to see SAP help by pressing F1 on provide endprovide you will get your answer.
2008 Aug 05 12:21 PM
PROVIDE ......ENDPROVIDE can only be used to process the data which is already available, it cannot be used as an replacement to SELECT....statement
2008 Aug 05 1:58 PM
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